[med-svn] r5649 - in trunk/packages/biomaj/trunk: . debian debian/biomaj debian/biomaj/DEBIAN debian/biomaj/etc debian/biomaj/etc/biomaj debian/biomaj/etc/biomaj/db_properties debian/biomaj/etc/biomaj/db_properties/workflow_without_process debian/biomaj/etc/biomaj/db_properties/workflow_withprocess debian/biomaj/usr debian/biomaj/usr/bin debian/biomaj/usr/share debian/biomaj/usr/share/biomaj debian/biomaj/usr/share/biomaj/bin debian/biomaj/usr/share/biomaj/conf debian/biomaj/usr/share/biomaj/conf/process debian/biomaj/usr/share/biomaj/lib debian/biomaj/usr/share/biomaj/sql debian/biomaj/usr/share/biomaj/src debian/biomaj/usr/share/biomaj/src/org debian/biomaj/usr/share/biomaj/src/org/gmod debian/biomaj/usr/share/biomaj/src/org/gmod/ant debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net debian/biomaj/usr/share/biomaj/src/org/inria debian/biomaj/usr/share/biomaj/src/org/inria/biomaj debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils debian/biomaj/usr/share/biomaj/workflows debian/biomaj/usr/share/biomaj/xslt debian/biomaj/usr/share/biomaj/xslt/images debian/biomaj/usr/share/biomaj/xslt/images/menu debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes debian/biomaj/usr/share/doc debian/biomaj/usr/share/doc/biomaj debian/biomaj/usr/share/doc-base debian/biomaj/usr/share/man debian/biomaj/usr/share/man/man1 debian/biomaj/var debian/biomaj/var/lib debian/biomaj/var/log debian/po debian/source
olivier sallou
osallou-guest at alioth.debian.org
Tue Jan 11 12:30:22 UTC 2011
Author: osallou-guest
Date: 2011-01-11 12:30:18 +0000 (Tue, 11 Jan 2011)
New Revision: 5649
Added:
trunk/packages/biomaj/trunk/debian/
trunk/packages/biomaj/trunk/debian/README.Debian
trunk/packages/biomaj/trunk/debian/README.source
trunk/packages/biomaj/trunk/debian/biomaj.debhelper.log
trunk/packages/biomaj/trunk/debian/biomaj.doc-base
trunk/packages/biomaj/trunk/debian/biomaj.manpages
trunk/packages/biomaj/trunk/debian/biomaj.postrm.debhelper
trunk/packages/biomaj/trunk/debian/biomaj.substvars
trunk/packages/biomaj/trunk/debian/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/conffiles
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/config
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/control
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/md5sums
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postinst
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postrm
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/prerm
trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/templates
trunk/packages/biomaj/trunk/debian/biomaj/etc/
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/alu.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/global.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/sts.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Anopheles_gambiae.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Apis_mellifera.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Arabidopsis_thaliana.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bacteria.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bos_taurus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Caenorhabditis_elegans.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Canis_familiaris.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/D_rerio.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Drosophila_melanogaster.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Felis_catus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Fungi.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Gallus_gallus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/H_sapiens.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/M_musculus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Macaca_mulatta.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Monodelphis_domestica.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Pan_troglodytes.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Plasmodium_falciparum.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/R_norvegicus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Saccharomyces_cerevisiae.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Schizosaccharomyces_pombe.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Strongylocentrotus_purpuratus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Tribolium_castaneum.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/alu.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/astral.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/dbest.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/drosoph.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/ecoli.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/env.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/enzyme.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/est.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/genbankRelease.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/geneontology.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/go.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/gss.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/htgs.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic_transcript.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/igSeq.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/interpro.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/mouse_genomic_transcript.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nr.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nt.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/omim.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/other_genomic.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/patent.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pdb.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pfam.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/prosite.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseq.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseqRelease.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/rfam.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/sts.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/swissprot.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/taxonomy.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/tgi.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/unigene.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniprot.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref100.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref50.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref90.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/vector.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/wgs.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/yeast.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Anopheles_gambiae.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Apis_mellifera.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Arabidopsis_thaliana.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bacteria.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bos_taurus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Caenorhabditis_elegans.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Canis_familiaris.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/D_rerio.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Drosophila_melanogaster.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Fungi.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Gallus_gallus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/H_sapiens.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/M_musculus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Macaca_mulatta.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Monodelphis_domestica.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Pan_troglodytes.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Plasmodium_falciparum.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/R_norvegicus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Saccharomyces_cerevisiae.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Schizosaccharomyces_pombe.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Strongylocentrotus_purpuratus.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Tribolium_castaneum.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/alu.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/astral.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/dbest.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/drosoph.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/ecoli.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/env.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/enzyme.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/est.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/genbankRelease.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/geneontology.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/go.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/gss.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/htgs.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic_transcript.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/igSeq.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/interpro.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/mouse_genomic_transcript.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nr.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nt.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/omim.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/other_genomic.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/patent.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pdb.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pfam.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/prosite.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseq.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseqRelease.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/rfam.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/sts.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/swissprot.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/taxonomy.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/tgi.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/unigene.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniprot.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref100.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref50.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref90.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/vector.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/wgs.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/yeast.properties
trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/general.conf
trunk/packages/biomaj/trunk/debian/biomaj/usr/
trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/
trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/biomaj
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/INSTALL
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-citrina-en
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-en
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-fr
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/MANIFEST
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/README
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/RELEASE
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/TODO
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/Configurator.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/antRunAsync.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/biomaj.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/create_database.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/env.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/import_statefiles.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/shutdown_dbserver.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/start_dbserver.sh
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/build.xml
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/ProcessBiomajLib.pm
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/fastacmdTLSE.pl
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/formatdbTLSE.pl
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/indexSrsTLSE.pl
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/sendMailTLSE.pl
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/unix_command_system.cfg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/commons-cli-2.0-SNAPSHOT.jar
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/jakarta-oro-2.1-dev-1.jar
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/hsql.sql
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/migration/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/mysql.sql
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/log4j.properties
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternExcludeSelector.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternSelector.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/selectors-i.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/DirectoryHasFilesCondition.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/InputValidation.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/SymlinkList.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FileCheck.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FtpListingParser.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/org.gmod.biomaj.ant.task.net.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajConsoleLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajMirrorListenerHandler.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajProcessListenerHandler.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBBankLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBProcessLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBWriter.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/SimpleLoggerHistoric.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/org.inria.biomaj.ant.logger.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajAddLocalFile.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFreeSpace.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFrequency.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCopy.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCreateListLinkFileName.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajDelete.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExecute.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExtract.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajGetRelativePath.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajLink.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajMove.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajSymlink.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajVersionManagement.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/XIncludeTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/ajout_info_file_in_statefile.usd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajDownload.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajGetRelease.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRemoteListing.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRsync.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajSftp.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajWget.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/DownloadThread.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/HttpListingParser.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/ListingParser.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RSyncListingParser.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RemoteCommand.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/SftpThread.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/WgetThread.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/org.inria.biomaj.ant.task.net.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/org.inria.biomaj.ant.task.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajCopy.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajDelete.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajExtract.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajLink.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajMove.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajVersionManagement.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankFactory.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankSet.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BiomajBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputeBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputedBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/RemoteBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/SingleBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/VirtualBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/org.inria.biomaj.exe.bank.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/Biomaj.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test/RunTests.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/HSQLDumpToMySQL.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/Parser.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BioMAJLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajCleanDB.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajImport.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajMoveProductionDirectories.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajRemoveBank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ChangeDbName.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/GenStatistiquesChart.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/IndexXmlDescription.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ObjectStat.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/PrintLogInBioMAJLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/StatusInformation.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/org.inria.biomaj.exe.options.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestChangeDbNameOption.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestImportOption.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestRemoveOption.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestUpdateOption.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BankSetWorkflowEngine.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajAntProject.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajThread.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ComputedBankWorkflowEngine.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ProcessSequentielHandler.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/RemoteBankWorkflowEngine.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/VirtualBankWorkflowEngine.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngine.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngineFactory.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/global_workflow.uad
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/org.inria.biomaj.exe.workflow.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/rebuild_workflow.uad
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/workflow_simple.uad
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/FtpImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/HttpImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/LocalImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteCommandImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteFile.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RsyncImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/SftpImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/org.inria.biomaj.internal.ant.task.net.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/SftpImplTest.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/TestSftpImpl.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/AddLocalFilesTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Bank.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/BiomajSQLQuerier.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/CheckTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Configuration.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DeploymentTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DownloadTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ExtractTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/FileDesc.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/GeneralWorkflowTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/MakeReleaseTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PostProcessTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PreProcessTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ProductionDirectory.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ReleaseTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/RemoveProcessTask.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Session.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/SubProcessDesc.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/bank-i.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank_2.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/BiomajProcess.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/DecisionWorkflowPostProcess.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/MetaProcess.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/org.inria.biomaj.session.process_2.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajInformation.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajLogger.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajSession.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/org.inria.biomaj.singleton.ucd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/CreateDB.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/MySQLConnection.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnection.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnectionFactory.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/ShutdownHSQLDB.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test/TestSQLConnection.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajBuildException.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajConst.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajException.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajMessages.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajUtils.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/HttpAuthenticateProxy.java
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/package.html
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank.xsd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank_statefile.xsd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/biomaj_common.xml
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/handle_process.xml
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/messages.properties
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/mirror.xml
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/process.xsd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/session.xsd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Closed_Folder_yellow.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/DNA-biomaj.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/HeaderToolsBox.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Untitled-1.psd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/asc.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/background_rnaback.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.tif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/bmenu1_t.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/clickhere.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/col.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/colbleu.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/comment.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/cycle_biomaj.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/degra.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/delete.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/des.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna2.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna3.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna4.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna5.jpg
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/email.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/env.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/exe.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fondbleu.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/header.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/headerbkg.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/help.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_dep.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_post.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_pre.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_remove.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync_dep.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-anglais.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-francais.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/lignebleu.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/loading.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo-inra.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logoBio.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa_petit.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes/dwsync.xml
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about_o.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile_o.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/minus.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/misc.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/obsolete.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/pdficon.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/plus.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/quote.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccro.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccrobleu.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow_w.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/rightbar.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/shortblackbar.psd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/spacer.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/star.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/tagline.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/text.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.psd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.png
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.psd
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/trash.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/updating.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/uptodate.gif
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/xmlToSql.xsl
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc-base/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc-base/biomaj
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/README.Debian
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.odt.gz
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.odt.gz
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.pdf.gz
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/biomaj.1
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/changelog.Debian.gz
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/copyright
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/man/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/man/man1/
trunk/packages/biomaj/trunk/debian/biomaj/usr/share/man/man1/biomaj.1.gz
trunk/packages/biomaj/trunk/debian/biomaj/var/
trunk/packages/biomaj/trunk/debian/biomaj/var/lib/
trunk/packages/biomaj/trunk/debian/biomaj/var/lib/biomaj/
trunk/packages/biomaj/trunk/debian/biomaj/var/log/
trunk/packages/biomaj/trunk/debian/biomaj/var/log/biomaj/
trunk/packages/biomaj/trunk/debian/changelog
trunk/packages/biomaj/trunk/debian/compat
trunk/packages/biomaj/trunk/debian/config
trunk/packages/biomaj/trunk/debian/control
trunk/packages/biomaj/trunk/debian/copyright
trunk/packages/biomaj/trunk/debian/files
trunk/packages/biomaj/trunk/debian/po/
trunk/packages/biomaj/trunk/debian/po/POTFILES.in
trunk/packages/biomaj/trunk/debian/po/fr.po
trunk/packages/biomaj/trunk/debian/po/templates.pot
trunk/packages/biomaj/trunk/debian/postinst
trunk/packages/biomaj/trunk/debian/postrm
trunk/packages/biomaj/trunk/debian/prerm
trunk/packages/biomaj/trunk/debian/rules
trunk/packages/biomaj/trunk/debian/source/
trunk/packages/biomaj/trunk/debian/source/format
trunk/packages/biomaj/trunk/debian/templates
Log:
First import Add debian dir
Added: trunk/packages/biomaj/trunk/debian/README.Debian
===================================================================
--- trunk/packages/biomaj/trunk/debian/README.Debian (rev 0)
+++ trunk/packages/biomaj/trunk/debian/README.Debian 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,5 @@
+Biomaj for Debian
+-----------------
+
+ Biomaj configuration file has been adapted to Debian file structure
+
Added: trunk/packages/biomaj/trunk/debian/README.source
===================================================================
--- trunk/packages/biomaj/trunk/debian/README.source (rev 0)
+++ trunk/packages/biomaj/trunk/debian/README.source 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,3 @@
+To recompile the Biomaj application, simply execute the ant task to produce the biomaj.jar file. The jar file is produced at installation time.
+
+To recreate the debian package structure, a script biomaj_deb.sh is available in packaging directory in svn structure. It copies necessary files from svn to a debian structure. For BmajWatcher, the war file must have been uploaded to a repository. The scripts define 2 versions for each element (biomaj/bmajwatcher) at the beginning of the file. It must be updated to the required version prior to execution.
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/conffiles
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/conffiles (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/conffiles 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,133 @@
+/etc/biomaj/db_properties/alu.properties
+/etc/biomaj/db_properties/global.properties
+/etc/biomaj/db_properties/sts.properties
+/etc/biomaj/db_properties/workflow_withprocess/pdb.properties
+/etc/biomaj/db_properties/workflow_withprocess/nt.properties
+/etc/biomaj/db_properties/workflow_withprocess/R_norvegicus.properties
+/etc/biomaj/db_properties/workflow_withprocess/prosite.properties
+/etc/biomaj/db_properties/workflow_withprocess/Saccharomyces_cerevisiae.properties
+/etc/biomaj/db_properties/workflow_withprocess/est.properties
+/etc/biomaj/db_properties/workflow_withprocess/Gallus_gallus.properties
+/etc/biomaj/db_properties/workflow_withprocess/interpro.properties
+/etc/biomaj/db_properties/workflow_withprocess/alu.properties
+/etc/biomaj/db_properties/workflow_withprocess/yeast.properties
+/etc/biomaj/db_properties/workflow_withprocess/drosoph.properties
+/etc/biomaj/db_properties/workflow_withprocess/uniref100.properties
+/etc/biomaj/db_properties/workflow_withprocess/tgi.properties
+/etc/biomaj/db_properties/workflow_withprocess/Bos_taurus.properties
+/etc/biomaj/db_properties/workflow_withprocess/igSeq.properties
+/etc/biomaj/db_properties/workflow_withprocess/go.properties
+/etc/biomaj/db_properties/workflow_withprocess/astral.properties
+/etc/biomaj/db_properties/workflow_withprocess/swissprot.properties
+/etc/biomaj/db_properties/workflow_withprocess/enzyme.properties
+/etc/biomaj/db_properties/workflow_withprocess/human_genomic.properties
+/etc/biomaj/db_properties/workflow_withprocess/rfam.properties
+/etc/biomaj/db_properties/workflow_withprocess/Strongylocentrotus_purpuratus.properties
+/etc/biomaj/db_properties/workflow_withprocess/vector.properties
+/etc/biomaj/db_properties/workflow_withprocess/nr.properties
+/etc/biomaj/db_properties/workflow_withprocess/uniref.properties
+/etc/biomaj/db_properties/workflow_withprocess/Macaca_mulatta.properties
+/etc/biomaj/db_properties/workflow_withprocess/Schizosaccharomyces_pombe.properties
+/etc/biomaj/db_properties/workflow_withprocess/Arabidopsis_thaliana.properties
+/etc/biomaj/db_properties/workflow_withprocess/geneontology.properties
+/etc/biomaj/db_properties/workflow_withprocess/uniref50.properties
+/etc/biomaj/db_properties/workflow_withprocess/H_sapiens.properties
+/etc/biomaj/db_properties/workflow_withprocess/gss.properties
+/etc/biomaj/db_properties/workflow_withprocess/Plasmodium_falciparum.properties
+/etc/biomaj/db_properties/workflow_withprocess/pfam.properties
+/etc/biomaj/db_properties/workflow_withprocess/mouse_genomic_transcript.properties
+/etc/biomaj/db_properties/workflow_withprocess/Caenorhabditis_elegans.properties
+/etc/biomaj/db_properties/workflow_withprocess/wgs.properties
+/etc/biomaj/db_properties/workflow_withprocess/Canis_familiaris.properties
+/etc/biomaj/db_properties/workflow_withprocess/Pan_troglodytes.properties
+/etc/biomaj/db_properties/workflow_withprocess/htgs.properties
+/etc/biomaj/db_properties/workflow_withprocess/refseq.properties
+/etc/biomaj/db_properties/workflow_withprocess/Bacteria.properties
+/etc/biomaj/db_properties/workflow_withprocess/human_genomic_transcript.properties
+/etc/biomaj/db_properties/workflow_withprocess/env.properties
+/etc/biomaj/db_properties/workflow_withprocess/omim.properties
+/etc/biomaj/db_properties/workflow_withprocess/Drosophila_melanogaster.properties
+/etc/biomaj/db_properties/workflow_withprocess/Fungi.properties
+/etc/biomaj/db_properties/workflow_withprocess/ecoli.properties
+/etc/biomaj/db_properties/workflow_withprocess/other_genomic.properties
+/etc/biomaj/db_properties/workflow_withprocess/D_rerio.properties
+/etc/biomaj/db_properties/workflow_withprocess/uniprot.properties
+/etc/biomaj/db_properties/workflow_withprocess/sts.properties
+/etc/biomaj/db_properties/workflow_withprocess/dbest.properties
+/etc/biomaj/db_properties/workflow_withprocess/Apis_mellifera.properties
+/etc/biomaj/db_properties/workflow_withprocess/Anopheles_gambiae.properties
+/etc/biomaj/db_properties/workflow_withprocess/uniref90.properties
+/etc/biomaj/db_properties/workflow_withprocess/unigene.properties
+/etc/biomaj/db_properties/workflow_withprocess/refseqRelease.properties
+/etc/biomaj/db_properties/workflow_withprocess/genbankRelease.properties
+/etc/biomaj/db_properties/workflow_withprocess/Tribolium_castaneum.properties
+/etc/biomaj/db_properties/workflow_withprocess/M_musculus.properties
+/etc/biomaj/db_properties/workflow_withprocess/Monodelphis_domestica.properties
+/etc/biomaj/db_properties/workflow_withprocess/patent.properties
+/etc/biomaj/db_properties/workflow_withprocess/taxonomy.properties
+/etc/biomaj/db_properties/workflow_without_process/Felis_catus.properties
+/etc/biomaj/db_properties/workflow_without_process/pdb.properties
+/etc/biomaj/db_properties/workflow_without_process/nt.properties
+/etc/biomaj/db_properties/workflow_without_process/R_norvegicus.properties
+/etc/biomaj/db_properties/workflow_without_process/prosite.properties
+/etc/biomaj/db_properties/workflow_without_process/Saccharomyces_cerevisiae.properties
+/etc/biomaj/db_properties/workflow_without_process/est.properties
+/etc/biomaj/db_properties/workflow_without_process/Gallus_gallus.properties
+/etc/biomaj/db_properties/workflow_without_process/interpro.properties
+/etc/biomaj/db_properties/workflow_without_process/alu.properties
+/etc/biomaj/db_properties/workflow_without_process/yeast.properties
+/etc/biomaj/db_properties/workflow_without_process/drosoph.properties
+/etc/biomaj/db_properties/workflow_without_process/uniref100.properties
+/etc/biomaj/db_properties/workflow_without_process/tgi.properties
+/etc/biomaj/db_properties/workflow_without_process/Bos_taurus.properties
+/etc/biomaj/db_properties/workflow_without_process/igSeq.properties
+/etc/biomaj/db_properties/workflow_without_process/go.properties
+/etc/biomaj/db_properties/workflow_without_process/astral.properties
+/etc/biomaj/db_properties/workflow_without_process/swissprot.properties
+/etc/biomaj/db_properties/workflow_without_process/enzyme.properties
+/etc/biomaj/db_properties/workflow_without_process/human_genomic.properties
+/etc/biomaj/db_properties/workflow_without_process/rfam.properties
+/etc/biomaj/db_properties/workflow_without_process/Strongylocentrotus_purpuratus.properties
+/etc/biomaj/db_properties/workflow_without_process/vector.properties
+/etc/biomaj/db_properties/workflow_without_process/nr.properties
+/etc/biomaj/db_properties/workflow_without_process/uniref.properties
+/etc/biomaj/db_properties/workflow_without_process/Macaca_mulatta.properties
+/etc/biomaj/db_properties/workflow_without_process/Schizosaccharomyces_pombe.properties
+/etc/biomaj/db_properties/workflow_without_process/Arabidopsis_thaliana.properties
+/etc/biomaj/db_properties/workflow_without_process/geneontology.properties
+/etc/biomaj/db_properties/workflow_without_process/uniref50.properties
+/etc/biomaj/db_properties/workflow_without_process/H_sapiens.properties
+/etc/biomaj/db_properties/workflow_without_process/gss.properties
+/etc/biomaj/db_properties/workflow_without_process/Plasmodium_falciparum.properties
+/etc/biomaj/db_properties/workflow_without_process/pfam.properties
+/etc/biomaj/db_properties/workflow_without_process/mouse_genomic_transcript.properties
+/etc/biomaj/db_properties/workflow_without_process/Caenorhabditis_elegans.properties
+/etc/biomaj/db_properties/workflow_without_process/wgs.properties
+/etc/biomaj/db_properties/workflow_without_process/Canis_familiaris.properties
+/etc/biomaj/db_properties/workflow_without_process/Pan_troglodytes.properties
+/etc/biomaj/db_properties/workflow_without_process/htgs.properties
+/etc/biomaj/db_properties/workflow_without_process/refseq.properties
+/etc/biomaj/db_properties/workflow_without_process/Bacteria.properties
+/etc/biomaj/db_properties/workflow_without_process/human_genomic_transcript.properties
+/etc/biomaj/db_properties/workflow_without_process/env.properties
+/etc/biomaj/db_properties/workflow_without_process/omim.properties
+/etc/biomaj/db_properties/workflow_without_process/Drosophila_melanogaster.properties
+/etc/biomaj/db_properties/workflow_without_process/Fungi.properties
+/etc/biomaj/db_properties/workflow_without_process/ecoli.properties
+/etc/biomaj/db_properties/workflow_without_process/other_genomic.properties
+/etc/biomaj/db_properties/workflow_without_process/D_rerio.properties
+/etc/biomaj/db_properties/workflow_without_process/uniprot.properties
+/etc/biomaj/db_properties/workflow_without_process/sts.properties
+/etc/biomaj/db_properties/workflow_without_process/dbest.properties
+/etc/biomaj/db_properties/workflow_without_process/Apis_mellifera.properties
+/etc/biomaj/db_properties/workflow_without_process/Anopheles_gambiae.properties
+/etc/biomaj/db_properties/workflow_without_process/uniref90.properties
+/etc/biomaj/db_properties/workflow_without_process/unigene.properties
+/etc/biomaj/db_properties/workflow_without_process/refseqRelease.properties
+/etc/biomaj/db_properties/workflow_without_process/genbankRelease.properties
+/etc/biomaj/db_properties/workflow_without_process/Tribolium_castaneum.properties
+/etc/biomaj/db_properties/workflow_without_process/M_musculus.properties
+/etc/biomaj/db_properties/workflow_without_process/Monodelphis_domestica.properties
+/etc/biomaj/db_properties/workflow_without_process/patent.properties
+/etc/biomaj/db_properties/workflow_without_process/taxonomy.properties
+/etc/biomaj/general.conf
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/config
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/config (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/config 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,64 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# jdk_home
+db_input critical biomaj/jdk_home || true
+db_go
+
+# admin login
+#db_input critical biomaj/login || true
+#db_go
+
+# admin passwd
+#db_input critical biomaj/password || true
+#db_go
+
+# db type
+#db_input critical biomaj/db_type || true
+#db_go
+
+# Configure mysql ?
+#db_get biomaj/db_type
+#if [ $RET = "MySQL" ]; then
+ db_input critical biomaj/mysql || true
+ db_go
+ db_get biomaj/mysql
+ if [ $RET = "true" ]; then
+ # MySQL server
+ db_input critical biomaj/mysql_host || true
+ db_go
+
+ # MySQL login
+ db_input critical biomaj/mysql_login || true
+ db_go
+
+ # MySQL password
+ db_input critical biomaj/mysql_passwd || true
+ db_go
+ fi
+#fi
+
+# Configure LDAP ?
+#db_input critical biomaj/ldap || true
+#db_go
+#db_get biomaj/ldap
+#if [ $RET = "true" ]; then
+ # LDAP server
+# db_input critical biomaj/ldap_server || true
+# db_go
+
+ # LDAP dn
+# db_input critical biomaj/ldap_dn || true
+# db_go
+
+ # LDAP filter
+# db_input critical biomaj/ldap_filter || true
+# db_go
+#fi
+
+# Tomcat port
+#db_input critical biomaj/tomcat_port || true
+#db_go
+
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/config
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/control
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/control (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/control 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,15 @@
+Package: biomaj
+Version: 1.1.0-1
+Architecture: all
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Installed-Size: 20052
+Depends: openjdk-6-jdk, ant, libmysql-java, debconf, debconf (>= 0.5) | debconf-2.0, libhsqldb-java, ant-contrib, liblog4j1.2-java, libcommons-net-java (>= 1.4), libcommons-dbcp-java (>= 1.2), libgnumail-java, libcommons-pool-java (>= 1.5), libgnujaf-java, libjgoodies-forms-java (>= 1.2), liboro-java (>= 2.0), libregexp-java (>= 1.4), libjfreechart-java (>= 1.0), libjcommon-java (>= 1.0), libjsch-java (>= 0.1.42), libjdom1-java (>= 1.1), junit4, libsaxonb-java (>= 0.9)
+Suggests: mysql-community-server-5.0, ncbi-tools-bin, blast2
+Section: science
+Priority: optional
+Homepage: http://biomaj.genouest.org
+Description: Biological banks updater
+ BioMAJ downloads remote data banks, check their status and apply transformation
+ workflows, with consistent state,to provide ready-to-use data to biologists and
+ bioinformaticians. For example, it can transform original fasta files to blast
+ indexes. It is very flexible and post-processes can be extended very easily.
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/md5sums
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/md5sums (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/md5sums 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,299 @@
+8cd3a6d1e25d74f5b347a58cc492d82c usr/bin/biomaj
+43d90975b63b7bf731f258a5d4767fcf usr/share/biomaj/INSTALL
+a3c5e329b92ee5c7cbbdfacd1ff4730e usr/share/biomaj/License-citrina-en
+36097c266be46cdcef3e3d1974b26049 usr/share/biomaj/License-en
+91346202ece95fa18ade872402a5aa00 usr/share/biomaj/License-fr
+e52f54499e23f4514e20f87973476dc1 usr/share/biomaj/MANIFEST
+7d88c52997c7c92248e92735a21bb000 usr/share/biomaj/README
+e740aed5fd8cd48b4ed2893a4e16589f usr/share/biomaj/RELEASE
+df5c7129dbd8deae024d669db658e16a usr/share/biomaj/TODO
+27f9c14304ec371a2465852c209416b8 usr/share/biomaj/bin/Configurator.java
+615cca11aa275590b5b34f8adbd5bbd7 usr/share/biomaj/bin/antRunAsync.sh
+b2b1480d0852cb93d7c91b92bde93f36 usr/share/biomaj/bin/biomaj.sh
+c37f27269a53a6b6f630a374509f8502 usr/share/biomaj/bin/create_database.sh
+a799af800978cbd6045632d531e38eee usr/share/biomaj/bin/env.sh
+fe8860729910bbd96c7872c0bc93dc3e usr/share/biomaj/bin/import_statefiles.sh
+6f88f9ed32b0891c585ef3d555dd0f60 usr/share/biomaj/bin/shutdown_dbserver.sh
+e8ba0ba283880e18e6b5f89afe09c2fd usr/share/biomaj/bin/start_dbserver.sh
+27009c3958da0cf2663d8cdd876e79fd usr/share/biomaj/build.xml
+4c7846506553d9db0045302af2325df5 usr/share/biomaj/conf/process/ProcessBiomajLib.pm
+1f53d180cf328049dca3cc8373a60526 usr/share/biomaj/conf/process/fastacmdTLSE.pl
+d8eb836d1baa70ff52068b2d76469fd0 usr/share/biomaj/conf/process/formatdbTLSE.pl
+3b398f287059fda73af1d8b30f231189 usr/share/biomaj/conf/process/indexSrsTLSE.pl
+52e950dd623fefe48de78d2853861d05 usr/share/biomaj/conf/process/sendMailTLSE.pl
+df7475ed14e1a9d33fdc3b2026f618d3 usr/share/biomaj/conf/process/unix_command_system.cfg
+2b5ca243e09f2e495a84ec77f8093985 usr/share/biomaj/lib/commons-cli-2.0-SNAPSHOT.jar
+b5f812ab930331854fd07765f992d433 usr/share/biomaj/lib/jakarta-oro-2.1-dev-1.jar
+17082c7df31ab5bcfcac43a91ff4b4d7 usr/share/biomaj/sql/hsql.sql
+d171dead4d64ec8b0bf26fadc9ad53b0 usr/share/biomaj/sql/mysql.sql
+73635adca9818ac398a18ed373e8b5c9 usr/share/biomaj/src/log4j.properties
+0b44c0e3b8fcdc369debfa350daf66c0 usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternExcludeSelector.java
+69a53ec959fb0b3e379547048bcde499 usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternSelector.java
+4b74af93e1bfbb9bea472b8596e5d142 usr/share/biomaj/src/org/gmod/ant/selectors/package.html
+c5e50b1d7a1c2dcc28c74090e54d84f3 usr/share/biomaj/src/org/gmod/ant/selectors/selectors-i.ucd
+1550d7bf71635b5aeb858088cb62f510 usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/DirectoryHasFilesCondition.java
+cab44a1f0d122bf255b7f077b88b301d usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/package.html
+c50c010512490901b6ec9b02d8041c60 usr/share/biomaj/src/org/gmod/biomaj/ant/task/InputValidation.java
+bfc6269fe3113133c1d5a77f73ce9d51 usr/share/biomaj/src/org/gmod/biomaj/ant/task/SymlinkList.java
+2ff86231550fe2a1bf3dccc91fa3b822 usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FileCheck.java
+d055b98a8396ece7d91138287c80f20e usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FtpListingParser.java
+712a9f4c082305b47e3e514050b7bd2f usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/org.gmod.biomaj.ant.task.net.ucd
+c2c67ea54fcd7e8468ae860f5e722394 usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/package.html
+a301043a6cb4222af9256dc58bb88427 usr/share/biomaj/src/org/gmod/biomaj/ant/task/package.html
+b122aacdf30937d79eeafb5d5b50ab32 usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajConsoleLogger.java
+fd567c3e17774b144376247eaae6b3b7 usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajMirrorListenerHandler.java
+5dc16f0f465bb70509fe4d9b44193513 usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajProcessListenerHandler.java
+7edf3bcda01501e6f8df6f638667dbc5 usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBBankLogger.java
+2edfdca7658f22e8b498f1cc0d31b8f2 usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBProcessLogger.java
+01ab57e855940c9d19c99857a9cdf9cc usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBWriter.java
+c52f71d12d13f2d54339130af99fd257 usr/share/biomaj/src/org/inria/biomaj/ant/logger/SimpleLoggerHistoric.java
+40217ea0a2ca373bb25bd92527c079aa usr/share/biomaj/src/org/inria/biomaj/ant/logger/org.inria.biomaj.ant.logger.ucd
+d6b459b01dc2b89750284c35fc53a226 usr/share/biomaj/src/org/inria/biomaj/ant/logger/package.html
+80b477b6da52784604538757458ecb7f usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajAddLocalFile.java
+4efad31befd4f09fc4e74d149a86fd86 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFreeSpace.java
+a9adf84059833047fa44e59e8e6997b2 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFrequency.java
+cbbe7aa31ed7f1bc7e89337cd8ee0b43 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCopy.java
+65ebdc09f1f20acd0f6cf60135e82d1f usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCreateListLinkFileName.java
+e7c90e71d20dfe1b0ffa82282b09f203 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajDelete.java
+3b6e1d0367f258ad2219c7bc341e571d usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExecute.java
+5841e826ad82d5905bb24935473779d6 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExtract.java
+adb6407fb297d912027faa7e7d340140 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajGetRelativePath.java
+d2965c0ee67d1295f80c58cdbef7972d usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajLink.java
+e3394a9fa0eb36026b2101e583ffa3b1 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajMove.java
+1d42abdaac7497f3ba37b927960e9a3f usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajSymlink.java
+83abdfe236deda15e9776b11160fda27 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajTask.java
+bb987fdf3a2ef638493ac060270d67b0 usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajVersionManagement.java
+23cc23b30a729fb4b047699b0c5c01a0 usr/share/biomaj/src/org/inria/biomaj/ant/task/XIncludeTask.java
+f65355ebf6bb7a93d5abe15fadbee16b usr/share/biomaj/src/org/inria/biomaj/ant/task/ajout_info_file_in_statefile.usd
+cf0eff8cd415839487d0bc2de775bd12 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajDownload.java
+e8f964a5aff9483b6cc17f360850cde3 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajGetRelease.java
+86071e7fbd4c23980e75c21109501b39 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRemoteListing.java
+53e30720e0da0077afd29ddaa3599f33 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRsync.java
+45f382a4ec0dcb35d8e6dd19facaaa8e usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajSftp.java
+b28fada9a0a8bad18c6ab74f4a2b91ff usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajWget.java
+23fa78b016a60d2bd59129b0c1975bd3 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/DownloadThread.java
+b382179b3d81efb404f8bf1c09c7a46b usr/share/biomaj/src/org/inria/biomaj/ant/task/net/HttpListingParser.java
+01157d4382b65833053ba3bcefda3601 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/ListingParser.java
+1a9f442c53a802f480034e465ed9c6a3 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RSyncListingParser.java
+a531e9949e34ce7fb250fa7576457f2d usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RemoteCommand.java
+ab8d1a8c585605062e89c23fcdceb502 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/SftpThread.java
+ca40abe169f6c268ef17545858362be0 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/WgetThread.java
+41b66ef5aee6a0bfa7e430dc15be9065 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/org.inria.biomaj.ant.task.net.ucd
+d647f43dffbd4b085c2c3aca2a733890 usr/share/biomaj/src/org/inria/biomaj/ant/task/net/package.html
+e11f8dacb11f9868da3c1080988abe8e usr/share/biomaj/src/org/inria/biomaj/ant/task/org.inria.biomaj.ant.task.ucd
+ea4c1a7d21fa9d91c35074f21577eaa0 usr/share/biomaj/src/org/inria/biomaj/ant/task/package.html
+8677aa85f1a0a2ced324869ebf4640db usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajCopy.java
+e6267a1a64db6d505da06d9feb0e4dd6 usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajDelete.java
+b403129bd756c21b740e8926440e9465 usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajExtract.java
+2b2730c9e09952b3c798a336f43fe3a4 usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajLink.java
+1123e39805f450fcd608caeedb4e514f usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajMove.java
+b084203c6762b2bbfe21df545c458e10 usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajVersionManagement.java
+a8be5eefd9cde7e9892e8cb7573e5826 usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankFactory.java
+eb73174a19e8ffffe539b01bd05de427 usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankSet.java
+51c06a44a456655c91f5f49f6866b9f3 usr/share/biomaj/src/org/inria/biomaj/exe/bank/BiomajBank.java
+60cee9820cd63dd4aab4421fe29a2b62 usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputeBank.java
+70c4dcf22efa4df8316888563dfc10e3 usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputedBank.java
+6ea1a4f4f7b90b4a8651b378fadff000 usr/share/biomaj/src/org/inria/biomaj/exe/bank/RemoteBank.java
+c9854c26401c987e5b937f459010ea42 usr/share/biomaj/src/org/inria/biomaj/exe/bank/SingleBank.java
+9d6198b6b85c9842e9f7c86a7f7b43bd usr/share/biomaj/src/org/inria/biomaj/exe/bank/VirtualBank.java
+667a321bc86a34b578bf0a15dff4dd2f usr/share/biomaj/src/org/inria/biomaj/exe/bank/org.inria.biomaj.exe.bank.ucd
+f7e0902fa1613a9dd76d709a7bcf9726 usr/share/biomaj/src/org/inria/biomaj/exe/bank/package.html
+b6671fb0132b42463f099bad6850ec96 usr/share/biomaj/src/org/inria/biomaj/exe/main/Biomaj.java
+8f50b7baefb43a8ab9ccec6a06e05d9f usr/share/biomaj/src/org/inria/biomaj/exe/main/package.html
+a239af24da9925f17b96338bd9a9d319 usr/share/biomaj/src/org/inria/biomaj/exe/main/test/RunTests.java
+9204ff617b27bdf6c63432f84815a278 usr/share/biomaj/src/org/inria/biomaj/exe/migration/HSQLDumpToMySQL.java
+419eb22ca6cc5c6335f26e83bfdccf81 usr/share/biomaj/src/org/inria/biomaj/exe/migration/Parser.java
+6a7891b651f57960b01aa08c86d02e33 usr/share/biomaj/src/org/inria/biomaj/exe/options/BioMAJLogger.java
+e94852874cd5c9dc6a77dbe90608dc10 usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajCleanDB.java
+c60467bca6019dfd958ce644f3c5bfcb usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajImport.java
+72c3d71b15c16723fdd6907d6538b473 usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajMoveProductionDirectories.java
+1eb569056a5c37ee16ddf836118ae747 usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajRemoveBank.java
+a50dca68e37c0293cf91473033062e43 usr/share/biomaj/src/org/inria/biomaj/exe/options/ChangeDbName.java
+294a6a5eed84b9bede511c93f4eb673f usr/share/biomaj/src/org/inria/biomaj/exe/options/GenStatistiquesChart.java
+ff57d7667f1189ed5b1627b9e8d1e862 usr/share/biomaj/src/org/inria/biomaj/exe/options/IndexXmlDescription.java
+858a972d9e26db37ea5ebd5d51f1d1cd usr/share/biomaj/src/org/inria/biomaj/exe/options/ObjectStat.java
+0e03a91ac1c9d649b441951839e8f211 usr/share/biomaj/src/org/inria/biomaj/exe/options/PrintLogInBioMAJLogger.java
+c8a688c36bb8661fb012b4e85c9283e6 usr/share/biomaj/src/org/inria/biomaj/exe/options/StatusInformation.java
+6f504856f9b7441f1a89d8905e593059 usr/share/biomaj/src/org/inria/biomaj/exe/options/org.inria.biomaj.exe.options.ucd
+1f37464282beacbfe725971ad1455acf usr/share/biomaj/src/org/inria/biomaj/exe/options/package.html
+319cd3b93d672bb9fb9a9cf59a2a107e usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestChangeDbNameOption.java
+acd8f7bcc4bb3dca605b4b86bdf051a8 usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestImportOption.java
+1499f1f7f5005072687bd97f852eacab usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestRemoveOption.java
+68dd83b39333fc69a5f7c75bf53771dd usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestUpdateOption.java
+48f001898990303cea535318dec20c10 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BankSetWorkflowEngine.java
+addf397570a784eb44297d30548d31f4 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajAntProject.java
+3d9a2c19626d54e582da25eb90253d76 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajThread.java
+db55a30d420d225f8efd4a4f24adf9e0 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ComputedBankWorkflowEngine.java
+913e56d510d28057f38c64f676fcf11a usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ProcessSequentielHandler.java
+5c2c1293db339f2aaf7984b1f79a7504 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/RemoteBankWorkflowEngine.java
+d6d32dc149810dfd62d76c0f0ec6dfe9 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/VirtualBankWorkflowEngine.java
+61c2a569339d730c8f6996968e72ef4f usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngine.java
+f24aab20187c51d4e9c2b88354b86673 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngineFactory.java
+e6f578c49a236261cd103920457616db usr/share/biomaj/src/org/inria/biomaj/exe/workflow/global_workflow.uad
+b2c57a1a9770e8a1d66ab3fa2f574da7 usr/share/biomaj/src/org/inria/biomaj/exe/workflow/org.inria.biomaj.exe.workflow.ucd
+def647617cb8a5b46321c841878c03cd usr/share/biomaj/src/org/inria/biomaj/exe/workflow/package.html
+3fe04d950923ab091f94c87f569fbe0c usr/share/biomaj/src/org/inria/biomaj/exe/workflow/rebuild_workflow.uad
+50fdedd35e7a308a4f1c46bd5b77d50c usr/share/biomaj/src/org/inria/biomaj/exe/workflow/workflow_simple.uad
+3773df760ef7d8ae85f6a475c8b2d8fd usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/FtpImpl.java
+6edbddb7197e921f65aee88325bd020c usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/HttpImpl.java
+e1967d4ca51d3e64f052892ddcfd5ab0 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/LocalImpl.java
+9e4d974940b37d45a7c720b650ec9361 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteCommandImpl.java
+6daadbc98a1bbd7db64bf31411f04998 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteFile.java
+096a75b92bb58f1439687e07bd297c28 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RsyncImpl.java
+2466bfa53915b899ce70e0e4e1a7a8d3 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/SftpImpl.java
+6fbf0f1e85370999dc1ef66cd95e505b usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/org.inria.biomaj.internal.ant.task.net.ucd
+d647f43dffbd4b085c2c3aca2a733890 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/package.html
+1b8209efa9d61c1f15b57e83b90cc3d9 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/SftpImplTest.java
+5e2e93aeb419cdc8aa357e4b12a9e1b9 usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/TestSftpImpl.java
+1f4a3108a9532a5290c4daf8e137268d usr/share/biomaj/src/org/inria/biomaj/session/bank/AddLocalFilesTask.java
+b46222a7ec747fe3484e88e08d6ab6e9 usr/share/biomaj/src/org/inria/biomaj/session/bank/Bank.java
+c92dfc9324a9927b8890349db853091d usr/share/biomaj/src/org/inria/biomaj/session/bank/BiomajSQLQuerier.java
+1c626a6b8e4398088e7e7a22801f3882 usr/share/biomaj/src/org/inria/biomaj/session/bank/CheckTask.java
+2e04f669136e3cf1069add5e1b00455e usr/share/biomaj/src/org/inria/biomaj/session/bank/Configuration.java
+24e763095ac0b3d0be65d2650b750be6 usr/share/biomaj/src/org/inria/biomaj/session/bank/DeploymentTask.java
+c49b480c8952549ca0d307d50d86e710 usr/share/biomaj/src/org/inria/biomaj/session/bank/DownloadTask.java
+46514a1899ba5b6d6380c3d42136c0b4 usr/share/biomaj/src/org/inria/biomaj/session/bank/ExtractTask.java
+aa6003694facc67a2647aa050cb7c990 usr/share/biomaj/src/org/inria/biomaj/session/bank/FileDesc.java
+b10710c56f702591218dc883a1a008e7 usr/share/biomaj/src/org/inria/biomaj/session/bank/GeneralWorkflowTask.java
+1e281889d5e59173f65ae13fb1321918 usr/share/biomaj/src/org/inria/biomaj/session/bank/MakeReleaseTask.java
+ef3242a7bea24a1e1561bae10839b387 usr/share/biomaj/src/org/inria/biomaj/session/bank/PostProcessTask.java
+f10a97c8344e95608bcbabedfa1799a1 usr/share/biomaj/src/org/inria/biomaj/session/bank/PreProcessTask.java
+fdf28bbee8b2c34abd164ec6e06513f0 usr/share/biomaj/src/org/inria/biomaj/session/bank/ProductionDirectory.java
+0b94347ef988cf08521103522b027ade usr/share/biomaj/src/org/inria/biomaj/session/bank/ReleaseTask.java
+d7f6e46a760f0eebf656533f95dd88d4 usr/share/biomaj/src/org/inria/biomaj/session/bank/RemoveProcessTask.java
+a538920a1b10d3f614d110c7d45cfa17 usr/share/biomaj/src/org/inria/biomaj/session/bank/Session.java
+b0925ff42f59c7496ac72be1ff6f469c usr/share/biomaj/src/org/inria/biomaj/session/bank/SubProcessDesc.java
+86c515cdab7bff46552a28f1c0b5fc19 usr/share/biomaj/src/org/inria/biomaj/session/bank/bank-i.ucd
+c8a4cdf7ef99edd10b5d81cde1f5f7f1 usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank.ucd
+132c0fcc472206a74fb53d7fce31467c usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank_2.ucd
+e8498a76c0a9e5c77b3884bbceef8b13 usr/share/biomaj/src/org/inria/biomaj/session/bank/package.html
+8a5d56c828de39f6b6637e394ba6c619 usr/share/biomaj/src/org/inria/biomaj/session/process/BiomajProcess.java
+d4516311d50219b9a67d385258812145 usr/share/biomaj/src/org/inria/biomaj/session/process/DecisionWorkflowPostProcess.java
+5eb852e46c0fb1a70e80fec6758d4673 usr/share/biomaj/src/org/inria/biomaj/session/process/MetaProcess.java
+a839b5d598a012cdd704b63edf82c26c usr/share/biomaj/src/org/inria/biomaj/session/process/org.inria.biomaj.session.process_2.ucd
+d404932113fb6a0360d631b5dcb95306 usr/share/biomaj/src/org/inria/biomaj/session/process/package.html
+44d5d2b00d27bea076922dfdfc030f74 usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajInformation.java
+ba16ff66961b5286e03e569548ea645a usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajLogger.java
+faf20654e1eea18cf5c440bd2d3eb13c usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajSession.java
+25912841f1fdfc8720acc49aa97c5be0 usr/share/biomaj/src/org/inria/biomaj/singleton/org.inria.biomaj.singleton.ucd
+ce60cbdc5794afc115f6163d02aefaa2 usr/share/biomaj/src/org/inria/biomaj/singleton/package.html
+daca256e7102ad9141a82035450073e5 usr/share/biomaj/src/org/inria/biomaj/sql/CreateDB.java
+cd11b93cd4fd19b67e8b634c80c0204f usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java
+dd26b3981194565bf8fb365c24702e60 usr/share/biomaj/src/org/inria/biomaj/sql/MySQLConnection.java
+943bd825b2c111f8392e69dc9f2ce869 usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnection.java
+225092147e5f5c981dd55425ff88fd8a usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnectionFactory.java
+a1c742a7d55b1b08108a3d045170328c usr/share/biomaj/src/org/inria/biomaj/sql/ShutdownHSQLDB.java
+616576314b4f14f5c46c657a36a5d4c5 usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java
+41d0fd3a19c3fb2b36ffdf7777e99c4b usr/share/biomaj/src/org/inria/biomaj/sql/test/TestSQLConnection.java
+c60035d3f330b06f34ac9dde79a58231 usr/share/biomaj/src/org/inria/biomaj/utils/BiomajBuildException.java
+64785ae9ca67991eac1adc0943b8562e usr/share/biomaj/src/org/inria/biomaj/utils/BiomajConst.java
+08fc242f157b6481a5fd5ccfc6e46072 usr/share/biomaj/src/org/inria/biomaj/utils/BiomajException.java
+ce10a53d8ca5fbf98529b0201f128d6e usr/share/biomaj/src/org/inria/biomaj/utils/BiomajMessages.java
+e81582d60b7e14f1f69a0fe8b02a6256 usr/share/biomaj/src/org/inria/biomaj/utils/BiomajUtils.java
+a5b0c7237c9790ea2c55ffbf63028e51 usr/share/biomaj/src/org/inria/biomaj/utils/HttpAuthenticateProxy.java
+2f86288ddef314a3bafc936c49908f26 usr/share/biomaj/src/org/inria/biomaj/utils/package.html
+65f5d5e20e3ba1d4fd23d678679d8a42 usr/share/biomaj/workflows/bank.xsd
+cbf5bd45bd99b783a4b9883a041d891d usr/share/biomaj/workflows/bank_statefile.xsd
+42fcb7bbdf4b451ae9c03409dc515fff usr/share/biomaj/workflows/biomaj_common.xml
+9085857cc1b6083986dd193c812c56fb usr/share/biomaj/workflows/handle_process.xml
+5d48c04e3218cc9875dd3eeb8bfb1e09 usr/share/biomaj/workflows/messages.properties
+ef98c399938298683471f6f2cc0087d8 usr/share/biomaj/workflows/mirror.xml
+b5d15b2810fae732bfe4ff06aa3792e0 usr/share/biomaj/workflows/process.xsd
+748efb5045f08f3886fec5809dcb04be usr/share/biomaj/workflows/session.xsd
+a8c08b0bd4a002e2ab7bb5b2a4f723e3 usr/share/biomaj/xslt/images/Closed_Folder_yellow.gif
+873d2a42b1ca5f6b38c6fc9967efd2c9 usr/share/biomaj/xslt/images/DNA-biomaj.jpg
+79ee5d7e3e64f4fe8d631093c5ad8504 usr/share/biomaj/xslt/images/HeaderToolsBox.png
+c4893739657fbd7229669b9be2b6592f usr/share/biomaj/xslt/images/Untitled-1.psd
+0b27ef17fd96d8b74dde6497da9193e7 usr/share/biomaj/xslt/images/asc.png
+55423c567a91211815c69bf771c31898 usr/share/biomaj/xslt/images/background_rnaback.gif
+db5fcff16deae8e442a981f6a221bc52 usr/share/biomaj/xslt/images/banner.png
+65c1df3deffd5e13782b6fec1e991987 usr/share/biomaj/xslt/images/banner.tif
+06c9415e256d45768bab8b9d171f4458 usr/share/biomaj/xslt/images/bmenu1_t.gif
+8960c3dd9ce3b1b6a96ddf1d0e8c5988 usr/share/biomaj/xslt/images/clickhere.gif
+15360491326d488778c9834765f8767f usr/share/biomaj/xslt/images/col.png
+c310eece80df354dd4dae884b6c83dce usr/share/biomaj/xslt/images/colbleu.png
+96cc24948be43c8736e337ee3f0e85fa usr/share/biomaj/xslt/images/comment.gif
+239944877ba747a908a4db6c23d86284 usr/share/biomaj/xslt/images/cycle_biomaj.png
+f055e1d8f0562bc8a6cfffbe32752b3b usr/share/biomaj/xslt/images/degra.jpg
+33681ecdcee1c70434823facf08dcded usr/share/biomaj/xslt/images/delete.gif
+339dfa3cf9acf428bdd8ebc2ddf81564 usr/share/biomaj/xslt/images/des.png
+d409ada54c2a908202010544904c93d1 usr/share/biomaj/xslt/images/dna.jpg
+b71b3442b9e379a81aef757f04cf5d1f usr/share/biomaj/xslt/images/dna2.jpg
+fccc22b6b49146a6c621a6c4fab9cc28 usr/share/biomaj/xslt/images/dna3.jpg
+5c9cf57f141926e978ce42efd86cfc29 usr/share/biomaj/xslt/images/dna4.jpg
+136d2cf91a7e0a36c65bd8baf3b59bed usr/share/biomaj/xslt/images/dna5.jpg
+e5bacc71235e27dcd3f6e294470d9914 usr/share/biomaj/xslt/images/email.gif
+c0e5af4dcccf2be72571fd92046b8386 usr/share/biomaj/xslt/images/env.gif
+bb252574aa1abf4eb644126d0fdab413 usr/share/biomaj/xslt/images/exe.gif
+420312ce2db544d3900ab13e92bf71cf usr/share/biomaj/xslt/images/fond.gif
+b063891b230687b59e098eb51ba99be6 usr/share/biomaj/xslt/images/fond.png
+3dd2359a5335a2ec7707988350ff1c33 usr/share/biomaj/xslt/images/fondbleu.png
+7924e031609c58bb65a4de770886df1b usr/share/biomaj/xslt/images/header.png
+06f08b1de446589a91fdec096deb23d3 usr/share/biomaj/xslt/images/headerbkg.gif
+6cee835debbc83d5c274bc796f64bec6 usr/share/biomaj/xslt/images/help.gif
+1c348f8419197b15b92e323994eb8adb usr/share/biomaj/xslt/images/icon_cycle_biomaj.png
+c1d6d2b3fddea5d62e0e8e8af0f562b2 usr/share/biomaj/xslt/images/icon_cycle_biomaj_dep.png
+6637325be7acd812ba7a952a3febc449 usr/share/biomaj/xslt/images/icon_cycle_biomaj_post.png
+417a904afb9d38e8eab25d72d9075816 usr/share/biomaj/xslt/images/icon_cycle_biomaj_pre.png
+33681ecdcee1c70434823facf08dcded usr/share/biomaj/xslt/images/icon_cycle_biomaj_remove.gif
+f5e34bb07205e59c3ec6cc49f27f699d usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync.png
+03e17b9edbfad8ed115c7f4d040ef8e0 usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync_dep.png
+75655edf94d6af2e6939817a81c3375e usr/share/biomaj/xslt/images/icone-drapeau-anglais.gif
+f0780c91d5f056581a8a0b76f3b1af2c usr/share/biomaj/xslt/images/icone-drapeau-francais.gif
+0a81ffe7ffb9805f343f45cdc46e5845 usr/share/biomaj/xslt/images/lignebleu.gif
+50c5e3e79b276c92df6cc52caeb464f0 usr/share/biomaj/xslt/images/loading.gif
+51cc55326679e9f095001b0994ef9aad usr/share/biomaj/xslt/images/logo-inra.gif
+b8c4260c79f3dd9f76b323ec730a23ae usr/share/biomaj/xslt/images/logoBio.png
+2f84c7f1e780f17549de8120bfc71454 usr/share/biomaj/xslt/images/logo_hexa.gif
+c9c59e8e2887f2f6d89f482171075b79 usr/share/biomaj/xslt/images/logo_hexa_petit.gif
+153a7257e27c1007f52caaff6cd2bf55 usr/share/biomaj/xslt/images/menu/_notes/dwsync.xml
+6185b9f43099ab00fa4d4084cf51e525 usr/share/biomaj/xslt/images/menu/about.gif
+4b598e52a22979e1787e7409ef203e4e usr/share/biomaj/xslt/images/menu/about_o.gif
+d6025c4445cb55da6019e23c19410607 usr/share/biomaj/xslt/images/menu/bar
+b6ce50500f5e1b9b86dc9340c0184a26 usr/share/biomaj/xslt/images/menu/bar.gif
+4005b6e1c041c1c2108a3a3744507b34 usr/share/biomaj/xslt/images/menu/biomaj.png
+91f9b40be9c3d01ddac7b8eaf3573395 usr/share/biomaj/xslt/images/menu/biomaj_o.png
+22e2af91544bad905246b0b41a3ff347 usr/share/biomaj/xslt/images/menu/globalStats.png
+60e7420966efe2fc3d1ff09fc6d63874 usr/share/biomaj/xslt/images/menu/globalStats_o.png
+5c2a80562ae23df2fe7f06e1e7bbad5c usr/share/biomaj/xslt/images/menu/home.png
+2c073bcb20529b33a592b1b602d8bd6a usr/share/biomaj/xslt/images/menu/home_o.png
+29a3d81c44481314b637adc990b4ef5d usr/share/biomaj/xslt/images/menu/localBank.png
+26cd8f20f72c58e3ca53af71983db1d0 usr/share/biomaj/xslt/images/menu/localBank_o.png
+fa870b5ebaf6ffa18e301e338256a125 usr/share/biomaj/xslt/images/menu/procFile.png
+ebf7d965d002d692d2935ab27b2e8c52 usr/share/biomaj/xslt/images/menu/procFile_o.png
+2ff2ea84d4aa83d7edf8d5391931137c usr/share/biomaj/xslt/images/menu/propFile.png
+e43c6bc03e7880c4a84fe1b7ef9f84f2 usr/share/biomaj/xslt/images/menu/propFile_o.png
+18b55425d357a412c8cc23b97a2f0e74 usr/share/biomaj/xslt/images/minus.gif
+23abcb425b2ae9b24b66c8cbac7fe358 usr/share/biomaj/xslt/images/misc.png
+33681ecdcee1c70434823facf08dcded usr/share/biomaj/xslt/images/obsolete.gif
+55fd1c5c969a185e556f0d859afe7f16 usr/share/biomaj/xslt/images/pdficon.gif
+8fb9c19059216be2f95e419a312120a7 usr/share/biomaj/xslt/images/plus.gif
+c934c59e760a7d134f41a09d34807b1c usr/share/biomaj/xslt/images/quote.gif
+d59c0f23269113b9e01a5d3d88eed247 usr/share/biomaj/xslt/images/raccro.png
+ecf4987a0d27e51a4d46ca0bebb89843 usr/share/biomaj/xslt/images/raccrobleu.png
+9ad924da4b071097c2aa65a7e6a9f628 usr/share/biomaj/xslt/images/right_arrow.gif
+b9723416e51be6263240b4115374f22f usr/share/biomaj/xslt/images/right_arrow_w.gif
+9e0c85b86aadc0706728e94fbb212f7f usr/share/biomaj/xslt/images/rightbar.gif
+49015f342a89516c056dd3d8cb67ca7c usr/share/biomaj/xslt/images/shortblackbar.psd
+56398e76be6355ad5999b262208a17c9 usr/share/biomaj/xslt/images/spacer.gif
+84e694301802baf67a6bb02148eabb94 usr/share/biomaj/xslt/images/star.gif
+ef60324efde2024f0e5c3aced3e33b5c usr/share/biomaj/xslt/images/tagline.png
+f3fa1d34ae216911d245672e3db9235b usr/share/biomaj/xslt/images/text.gif
+02a5eddd3391fbae75b8f94855987055 usr/share/biomaj/xslt/images/topLeft.png
+e5ee84c3f248e38f6435bca3fb8f0027 usr/share/biomaj/xslt/images/topLeft.psd
+c07d89a3d57f3dda1e9a317e468bb72f usr/share/biomaj/xslt/images/topRight.png
+093010087142375e176ef97cc78169da usr/share/biomaj/xslt/images/topRight.psd
+c5cd0d8ca74736b38aeeb9b8789768ee usr/share/biomaj/xslt/images/trash.gif
+1fb8bd22304526166ba7269fcf3edd91 usr/share/biomaj/xslt/images/updating.gif
+5996b23a7729bb0898eaf2aa7b32cc26 usr/share/biomaj/xslt/images/uptodate.gif
+32fe3cd288b5ed088fbaaff944e40b97 usr/share/biomaj/xslt/xmlToSql.xsl
+6a85a8770b4895a3084d894559d704d6 usr/share/doc-base/biomaj
+a9d5376ddeea7629ff094c24289e368c usr/share/doc/biomaj/README.Debian
+566433d75e3b38882696e6d3514dd755 usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.odt.gz
+788550a3751931d997ad95e2232ef80b usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
+9fb479b39865e5330b2fd909207de92c usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.odt.gz
+b9fd10f4ad402d5f8090c287458b400b usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.pdf.gz
+a93ae0eab7219f3d9a64520ac9f9799b usr/share/doc/biomaj/biomaj.1
+0498dfcc400e0667fd3e92589d3ec61f usr/share/doc/biomaj/changelog.Debian.gz
+f0410f17cd0600c34c132830c02e6da2 usr/share/doc/biomaj/copyright
+643c56082d047627e9f8a30b65662d2d usr/share/man/man1/biomaj.1.gz
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postinst
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postinst (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postinst 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+
+
+
+ant_home="/usr/share/ant"
+biomaj_root="/usr/share/biomaj"
+
+db_get biomaj/jdk_home
+jdk_home="$RET"
+
+#db_get biomaj/login
+#app_login="$RET"
+#db_get biomaj/password
+#app_passwd="$RET"
+
+#db_get biomaj/ldap
+#use_ldap="$RET"
+#db_get biomaj/ldap_server
+#ldap_host="$RET"
+#db_get biomaj/ldap_dn
+#ldap_dn="$RET"
+#db_get biomaj/ldap_filter
+#opt_filer="$RET"
+
+#db_get biomaj/db_type
+db_type="MySQL"
+db_get biomaj/mysql_host
+db_url="jdbc:mysql://$RET/biomaj_log"
+db_get biomaj/mysql_login
+db_login="$RET"
+db_get biomaj/mysql_passwd
+db_passwd="$RET"
+
+#db_get biomaj/tomcat_port
+tomcat_port="0"
+
+# Link general.conf
+cd $biomaj_root
+ln -s /etc/biomaj/general.conf general.conf
+
+javac -d $biomaj_root/bin $biomaj_root/bin/Configurator.java
+
+java -cp $biomaj_root/bin Configurator java_home:=$jdk_home ant_home:=$ant_home biomaj_root:=$biomaj_root use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter db_type:=$db_type db_url:=$db_url db_login:=$db_login db_passwd:=$db_passwd app_login:=$app_login app_passwd:=$app_passwd tomcat_port:=$tomcat_port
+
+#ln -s $biomaj_root/lib/biomaj.jar $biomaj_root/apache-tomcat-6.0.24/lib/biomaj.jar
+
+if [ $db_type = "MySQL" ]; then
+ echo "Installation Complete."
+ echo "You now need to create the biomaj_log database on your MySQL server."
+ echo "The creation script is provided at /usr/share/biomaj/sql/mysql.sql."
+fi
+
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postinst
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postrm
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postrm (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postrm 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
+# End automatically added section
+
+
+# Remove all
+if [ -e /usr/share/biomaj ]; then
+ rm -rf /usr/share/biomaj
+fi
+
+echo "Warning, BioMAJ database for MySQL is not deleted by process removal."
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/postrm
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/prerm
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/prerm (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/prerm 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# Shutdown hsqldb server
+#db_get biomaj/db_type
+#if [ $RET = "HSQLDB" ]; then
+# bash /usr/share/biomaj/bin/shutdown_dbserver.sh
+#fi
+
+# Shutdown tomcat server
+#sh /usr/share/biomaj/apache-tomcat-6.0.24/bin/shutdown.sh >/dev/null 2>&1
+
+# Remove post installation created files
+
+# Remove admin credentials
+if [ -e /usr/share/biomaj/.bmajwatcherpasswd ]; then
+ rm /usr/share/biomaj/.bmajwatcherpasswd
+fi
+# Remove biomaj.jar
+if [ -e /usr/share/biomaj/lib/biomaj.jar ]; then
+ rm /usr/share/biomaj/lib/biomaj.jar
+fi
+# Remove build content
+if [ -e /usr/share/biomaj/build ]; then
+ rm -rf /usr/share/biomaj/build
+fi
+# hsql server startup log
+if [ -e /usr/share/biomaj/dbserver.log ]; then
+ rm /usr/share/biomaj/dbserver.log
+fi
+# distribution directory
+if [ -e /usr/share/biomaj/dist ]; then
+ rm -rf /usr/share/biomaj/dist
+fi
+# Installation logs
+if [ -e /usr/share/biomaj/install_log.log ]; then
+ rm /usr/share/biomaj/install_log.log
+fi
+# Internal tmp directory
+if [ -e /usr/share/biomaj/tmp ]; then
+ rm -rf /usr/share/biomaj/tmp
+fi
+# Link to general.conf
+if [ -L /usr/share/biomaj/general.conf ]; then
+ rm /usr/share/biomaj/general.conf
+fi
+# Link to biomaj.jar
+if [ -L /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar ]; then
+ rm /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar
+fi
+
+
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/prerm
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/templates
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/templates (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/DEBIAN/templates 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,24 @@
+Template: biomaj/jdk_home
+Type: string
+Description: The JDK home directory:
+Description-fr.UTF-8: Repertoire d'installation du JDK
+
+Template: biomaj/mysql
+Type: boolean
+Description: Want to configure MySQL connection now ?
+Description-fr.UTF-8: Souhaitez vous configurer MySQL maintenant?
+
+Template: biomaj/mysql_host
+Type: string
+Description: Enter MySQL server address:
+Description-fr.UTF-8: Nom du serveur hébergeant MySQL:
+
+Template: biomaj/mysql_login
+Type: string
+Description: User login for biomaj database:
+Description-fr.UTF-8: Login de la base de donnée:
+
+Template: biomaj/mysql_passwd
+Type: password
+Description: User password for biomaj database:
+Description-fr.UTF-8: Mot de passe de la base de donnée:
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/alu.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/alu.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/alu.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,78 @@
+######################
+### Initialization ###
+
+db.fullname="alu.n : alu repeat element. alu.a : translation of alu.n repeats"
+db.name=alu
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/alu_tmp
+dir.version=ncbi/blast/alu
+
+frequency.update=0
+
+## Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=1
+
+# NCBI (download fasta)
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^alu.*\\.gz$
+
+#Uncomment if you don't want to extract the data files.
+#no.extract=true
+
+local.files=^alu\\.(a|n).*
+
+## Post Process ## The files should be located in the projectfiles/process directory
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'alu.a.* alu.n.*'
+formatdb.desc=Index blast
+formatdb.type=index
+#--------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+### Deployment ###
+
+keep.old.version=1
+
+### Remove Process ### The files should be located in the projectfiles/process directory.
+
+db.remove.process=REMOVE
+
+REMOVE=removemail
+
+removemail.name=sendMail
+removemail.exe=sendMailTLSE.pl
+removemail.args=-s '[NCBI Blast - db.name] End Remove Process for version removed.release' -m 'local.time'
+removemail.desc=mail
+removemail.type=info
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/global.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/global.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/global.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,94 @@
+
+########################
+# Global properties file
+
+
+#To override these settings for a specific database go to its
+#properties file and uncomment or add the specific line you want
+#to override.
+
+#----------------
+# Mail Configuration
+#---------------
+#Uncomment thes lines if you want receive mail when the workflow is finished
+
+#mail.smtp.host=
+#mail.admin=
+#mail.from=
+
+#---------------------
+#Proxy authentification
+#---------------------
+#proxyHost=
+#proxyPort=
+#proxyUser=
+#proxyPassword=
+
+#---------------------
+# PROTOCOL
+#-------------------
+#possible values : ftp, http, rsync, local
+port=21
+username=anonymous
+password=anonymous at nowhere.com
+
+
+#The root directory where all databases are stored.
+#If your data is not stored under one directory hirearchy
+#you can override this value in the database properties file.
+data.dir=/var/lib/biomaj/
+
+#access user for production directories
+production.directory.chmod=775
+
+#Number of thread during the download
+bank.num.threads=4
+
+#Number of threads to use for downloading and processing
+files.num.threads=4
+
+#to keep more than one release increase this value
+keep.old.version=0
+
+#Link copy property
+do.link.copy=true
+
+#look here to specified a new format : http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
+release.dateformat=yyyy-MM-dd
+
+#The historic log file is generated in log/
+#define level information for output : DEBUG, VERBOSE,INFO,WARN,ERR
+#to have info about target and task ant use VERBOSE
+historic.logfile.level=VERBOSE
+historic.logfile.properties=false
+historic.logfile.task=true
+historic.logfile.target=true
+
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+http.parse.dir.line=<a[\\s]+href=\"([\\S]+)/\".*alt=\"\\[DIR\\]\">.*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})
+http.parse.file.line=<a[\\s]+href=\"([\\S]+)\".*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})[\\s]+([\\d\\.]+[MKG]{0,1})
+
+http.group.dir.name=1
+http.group.dir.date=2
+http.group.file.name=1
+http.group.file.date=2
+http.group.file.size=3
+
+#Needed if data sources are contains in an archive
+log.files=true
+
+local.files.excluded=\\.panfs.*
+
+#~40mn
+ftp.timeout=2000000
+ftp.automatic.reconnect=5
+ftp.active.mode=false
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/sts.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/sts.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/sts.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,80 @@
+######################
+### Initialization ###
+######################
+
+db.fullname="Database for sequence tag site entries"
+db.name=sts
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/sts_tmp
+dir.version=ncbi/blast/sts
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^sts.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^sts.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd,postmail
+
+fastacmd.name=fastacmd
+fastacmd.exe=fastacmdTLSE.pl
+fastacmd.args=--execute pbs
+fastacmd.desc=Index blast
+fastacmd.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Anopheles_gambiae.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Anopheles_gambiae.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Anopheles_gambiae.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,45 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genome Anopheles gambiae (NCBI)"
+db.name=Anopheles_gambiae
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Anopheles_gambiae
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ ^maps/mapview/.*$ ^SNP/.*$
+remote.excluded.files=.*\\.asn.*
+
+#Uncomment if you don't want to extract the data files.
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Apis_mellifera.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Apis_mellifera.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Apis_mellifera.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,45 @@
+
+#####################
+## Initialization ###
+
+db.fullname="Genome Apis mellifera (NCBI)"
+db.name=Apis_mellifera
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Apis_mellifera
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/[\\w]+ref.*$ ^Assembled_chromosomes/chr_NC_gi$ ^CHR_[\\w]+/[\\w]+ref.*$ ^mapview/.*$ ^RNA/.*$ ^protein/.*$
+remote.excluded.files=.*\\.asn.*
+
+#Uncomment if you don't want to extract the files.
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Arabidopsis_thaliana.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Arabidopsis_thaliana.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Arabidopsis_thaliana.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,45 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genome Arabidopsis thaliana (NCBI)"
+db.name=Arabidopsis_thaliana
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Arabidopsis_thaliana
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ README
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bacteria.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bacteria.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bacteria.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,49 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genomes Bacteria (NCBI)"
+db.name=Bacteria
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Bacteria
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z][\\w]+/.*(gbk|fna|ffn|ptt|gff)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
+
+
+
+
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bos_taurus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bos_taurus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Bos_taurus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Bos taurus (NCBI)"
+db.name=Bos_taurus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Bos_taurus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/bt_ref_chr.*$ ^Assembled_chromosomes/chr_NC_gi$ ^CHR_[\\w]+/bt_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Caenorhabditis_elegans.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Caenorhabditis_elegans.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Caenorhabditis_elegans.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Caenorhabditis elegans (NCBI)"
+db.name=Caenorhabditis_elegans
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Caenorhabditis_elegans
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Canis_familiaris.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Canis_familiaris.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Canis_familiaris.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Canis familiaris (NCBI)"
+db.name=Canis_familiaris
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Canis_familiaris
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^Assembled_chromosomes/cfa_chr.*$ ^CHR_[\\w]+/cfa_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/D_rerio.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/D_rerio.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/D_rerio.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Danio rerio (NCBI)"
+db.name=D_rerio
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/D_rerio
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/.*$ ^CHR_[\\w]+/[\\w+]_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^RNA/.*$ ^protein/.*$ ^maps/mapview/.*$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Drosophila_melanogaster.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Drosophila_melanogaster.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Drosophila_melanogaster.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Drosophila melanogaster (NCBI)"
+db.name=Drosophila_melanogaster
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Drosophila_melanogaster
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ ^README.*$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Felis_catus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Felis_catus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Felis_catus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Felis catus (Ensembl)"
+db.name=Felis_catus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ensembl.org
+remote.dir=/pub/current_felis_catus/data/fasta
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^.*/.*$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Fungi.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Fungi.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Fungi.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,54 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genomes Fungi (NCBI)"
+db.name=Fungi
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Fungi
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z][\\w]+/.*(faa|ffn|fna|frn|gbk|gff|ptt|rnt|rps|rpt)$
+#remote.excluded.files=^Schizosaccharomyces_pombe.*$ ^Saccharomyces_cerevisiae.*$
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Gallus_gallus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Gallus_gallus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Gallus_gallus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Gallus gallus (NCBI)"
+db.name=Gallus_gallus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Gallus_gallus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/gga_ref.* ^CHR_[\\w]+/gga[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^mapview/.*$ ^README.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w]+/[\\w]+$ [\\w]+/[\\w]+/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/H_sapiens.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/H_sapiens.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/H_sapiens.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Homo sapiens (NCBI)"
+db.name=H_sapiens
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/H_sapiens
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/hs_ref.*$ ^CHR_[\\w]+/hs_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/M_musculus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/M_musculus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/M_musculus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Mus musculus (NCBI)"
+db.name=M_musculus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/M_musculus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/mm_ref.*$ ^CHR_[\\w]+/mm_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Macaca_mulatta.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Macaca_mulatta.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Macaca_mulatta.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Macaca mulatta (NCBI)"
+db.name=Macaca_mulatta
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Macaca_mulatta
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/mmu_ref.*$ ^CHR_[\\w]+/mmu_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Monodelphis_domestica.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Monodelphis_domestica.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Monodelphis_domestica.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Monodelphis domestica (NCBI)"
+db.name=Monodelphis_domestica
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Monodelphis_domestica
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/mdm_ref.*$ ^CHR_[\\w]+/mdm_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Pan_troglodytes.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Pan_troglodytes.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Pan_troglodytes.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Pan troglodytes (NCBI)"
+db.name=Pan_troglodytes
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Pan_troglodytes
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/ptr_ref.*$ ^CHR_[\\w]+/ptr_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Plasmodium_falciparum.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Plasmodium_falciparum.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Plasmodium_falciparum.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Plasmodium falciparum (NCBI)"
+db.name=Plasmodium_falciparum
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Plasmodium_falciparum
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*$ ^CHR[\\w]+/[\\w]+\\.(faa|ffn|fna|frn|gbk|gff|ptt|rnt|rpt)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/R_norvegicus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/R_norvegicus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/R_norvegicus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Rattus norvegicus (NCBI)"
+db.name=R_norvegicus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/R_norvegicus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/rn_ref.*$ ^CHR_[\\w]+/rn_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Saccharomyces_cerevisiae.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Saccharomyces_cerevisiae.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Saccharomyces_cerevisiae.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Saccharomyces cerevisiae (NCBI)"
+db.name=Saccharomyces_cerevisiae
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Saccharomyces_cerevisiae
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*$ ^CHR_[\\w]+/[\\w]+\\.(faa|ffn|fna|gbk|ptt)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Schizosaccharomyces_pombe.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Schizosaccharomyces_pombe.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Schizosaccharomyces_pombe.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Schizosaccharomyces_pombe (NCBI)"
+db.name=Schizosaccharomyces_pombe
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Schizosaccharomyces_pombe
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Strongylocentrotus_purpuratus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Strongylocentrotus_purpuratus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Strongylocentrotus_purpuratus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Strongylocentrotus purpuratus (NCBI)"
+db.name=Strongylocentrotus_purpuratus
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Strongylocentrotus_purpuratus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/.*_ref_.*$ ^CHR_[\\w]+/.*_ref_.*$ ^README.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Tribolium_castaneum.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Tribolium_castaneum.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/Tribolium_castaneum.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Tribolium castaneum (NCBI)"
+db.name=Tribolium_castaneum
+db.type=genome
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Tribolium_castaneum
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/tca_ref.*$ ^CHR_[\\w]+/tca_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/alu.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/alu.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/alu.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,44 @@
+
+######################
+### Initialization ###
+
+db.fullname="alu.n : alu repeat element. alu.a : translation of alu.n repeats"
+db.name=alu
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=
+
+### Synchronization ###
+
+files.num.threads=1
+
+# NCBI (download fasta)
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^alu.*\\.gz$
+
+#no.extract=true
+
+local.files=^alu\\.(a|n).*
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/astral.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/astral.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/astral.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,46 @@
+
+#####################
+### Initialization ###
+
+db.fullname="The ASTRAL Compendium for Sequence and Structure Analysis"
+db.name=astral
+db.type=protein
+
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Synchronization ###
+
+files.num.threads=4
+
+protocol=http
+
+http.parse.dir.line=<img[\\s]+src=\"/icons/folder.gif\"[\\s]+alt=\"\\[DIR\\]\".*href=\"([\\S]+)/\".*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})
+http.parse.file.line=<a[\\s]+href=\"([\\S]+)\".*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})[\\s]+([\\d\\.]+[MKG]{0,1})
+
+http.group.dir.name=1
+http.group.dir.date=2
+http.group.file.name=1
+http.group.file.date=2
+http.group.file.size=3
+
+server=astral.berkeley.edu
+remote.dir=/pdbstyle-1.71
+
+
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=[\\w0-9]*/[\\w]+.ent
+#Uncomment if you don't want to extract the data files.
+#no.extract=true
+
+local.files=.*
+
+###Â Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/dbest.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/dbest.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/dbest.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="dbEST (Nature Genetics 4:332-3;1993) is a division of GenBank that contains sequence data and other information on single-pass cDNA sequences, or Expressed Sequence Tags, from a number of organisms."
+db.name=dbest
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/repository/dbEST/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^dbEST.*\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^dbEST.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/drosoph.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/drosoph.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/drosoph.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="drosoph.nt : genomic sequences for drosophila. drosoph.aa : CDS translations from drosophila.nt"
+db.name=drosoph
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^drosoph.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^drosoph\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/ecoli.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/ecoli.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/ecoli.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="ecoli.nt : Escherichia coli K-12 genomic sequences. CDS translations from ecoli.nt"
+db.name=ecoli
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^ecoli.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^ecoli\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/env.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/env.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/env.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="env_nr : Environmental protein sequences. env_nt : Environmental nucleotide sequences"
+db.name=env
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^env_.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^env_(nr|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/enzyme.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/enzyme.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/enzyme.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="ENZYME : the repository of information relative to the nomenclature of enzymes"
+db.name=enzyme
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ca.expasy.org
+remote.dir=/databases/enzyme/
+
+release.file=enzuser.txt
+release.regexp=[0-9]{2}-[\\w]{2,5}-20[0-9]{2}
+release.file.compressed=false
+
+remote.files=.*\\.txt$ .*\\.dat$ .*\\.get$ README$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=.*\\.txt$ .*\\.dat$ .*\\.get$ README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/est.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/est.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/est.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="est_human : human subset of the est database. est_mouse : mouse subset of the est database. est_others : non-human and non-mouse subset of the est database"
+db.name=est
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^est.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^est.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/genbankRelease.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/genbankRelease.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/genbankRelease.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genbank Release is the NIH genetic sequence database, an annotated collection of all publicly available DNA sequences"
+db.name=genbankRelease
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genbank/
+
+release.file=GB_Release_Number
+release.regexp=[\\d]+
+release.file.compressed=false
+
+remote.files=^gb.*\\.seq\\.gz$ GB_Release_Number.*$ ^rel[\\d]+\\.fsa_aa\\.gz$ ^gbnew\\.txt\\.gz$ ^gbchg\\.txt\\.gz$ ^gbdel\\.txt\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=gb.*\\.seq$ GB_Release_Number$ rel[\\d+]\\.fsa_aa$ gb.*txt$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/geneontology.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/geneontology.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/geneontology.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Gene Ontologie"
+db.name=geneontology
+db.type=other
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.geneontology.org
+remote.dir=/pub/go/godatabase/archive/latest
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^go_.*\\.gz$
+remote.excluded.files=^.*\\.tar\\.gz$ ^.*\\.sql\\.gz$
+
+#no.extract=true
+
+local.files=[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/go.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/go.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/go.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,48 @@
+
+########################
+#FTP server/login information
+db.fullname="Gene Ontologie"
+db.name=go
+server=www.godatabase.org
+protocol=http
+
+#These settings override the settings in global.ftp.properties if needed.
+#ftp.port=21
+#ftp.username=anonymous
+#ftp.password=anonymous at nowhere.com
+
+#Remote directory and file information
+remote.dir=/dev/database/archive/latest
+remote.files=go.*-assocdb\\.rdf-xml\\.gz README DATESTAMP
+
+frequency.update=0
+release.regexp=[0-9]{4}0[6-9]
+
+#Local directory information
+#Override default data directory set in global.ftp.properties
+#ftp.data.dir=
+online.dir.name=go
+offline.dir.name=go_tmp
+local.files=go.*-assocdb\\.rdf-xml README DATESTAMP
+
+#Set link 1 and 2 directories if switch links are being used.
+#ftp.link1.dir=genbankwgs_0
+#ftp.link2.dir=genbankwgs_1
+
+#WGET options
+#Override default wget options set in global.ftp.properties
+#wget.options=-c -x -nH --cut-dirs=6 -N
+
+#Extract
+#Uncomment if you don't want to extract the files.
+#ftp.no.extract=true
+
+
+
+#Pre and post build files.
+#The files should be located in the projectfiles directory.
+db.pre.process=
+#db.post.process=blast.xml
+db.type=Other
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/gss.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/gss.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/gss.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Sequences from the GSS division of GenBank, EMBL and DDBJ"
+db.name=gss
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^gss.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^gss.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/htgs.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/htgs.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/htgs.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="htgs database with high throughput genomic entries from the htg division of GenBank, EMBL, and DDBJ"
+db.name=htgs
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^htgs.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^htgs.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="human RefSeq (NC_######) chromosome records with gap adjusted concatnated NT_ contigs"
+db.name=human_genomic
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^human_genomic\\..*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^human_genomic.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic_transcript.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic_transcript.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/human_genomic_transcript.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Human Genomic Transcript"
+db.name=human_genomic_transcript
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^human_genomic_transcript.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^human.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/igSeq.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/igSeq.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/igSeq.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Human and Mouse immunoglobulin nucleotide or protein sequences"
+db.name=igSeq
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^igSeq.*\\.gz$
+
+no.extract=true
+
+local.files=^igSeq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/interpro.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/interpro.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/interpro.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="InterPro is a database of protein families, domains and functional sites in which identifiable features found in known proteins can be applied to unknown protein sequences."
+db.name=interpro
+db.type=protein
+
+#data.dir=/
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/interpro/
+
+release.file=release_notes.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=.*$
+remote.excluded.files=.*tar.*$
+
+#no.extract=true
+
+local.files=[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/mouse_genomic_transcript.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/mouse_genomic_transcript.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/mouse_genomic_transcript.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Mouse Genomic Transcript"
+db.name=mouse_genomic_transcript
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^mouse_genomic_transcript.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^mouse.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nr.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nr.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nr.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,60 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="non-redundant protein sequence database with entries from GenPept, Swissprot, PIR, PDF, PDB and RefSeq"
+db.name=nr
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index fasta)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^nr.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^nr.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nt.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nt.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/nt.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="nucleotide sequence database, with entries from all traditional divisions of GenBank, EMBL and DDBJ excluding bulk divisions (gss, sts, pat, est, htg divisions) and wgs entries. Not non-redundant"
+db.name=nt
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^nt.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^nt.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/omim.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/omim.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/omim.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="OMIM : Online Mendelian Inheritance in Man"
+db.name=omim
+db.type=other
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/repository/OMIM/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^.*$ ^Homology/.*$
+remote.excluded.files=Text/.*$
+
+#no.extract=true
+
+local.files=^[\\w]+/[\\w]+$ ^[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/other_genomic.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/other_genomic.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/other_genomic.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="RefSeq chromosome records (NC_######) for organisms other than human"
+db.name=other_genomic
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^other_genomic.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^other_genomic.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/patent.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/patent.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/patent.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Patent protein/nucleotide sequence database"
+db.name=patent
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^pat.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^pat.*\\.gz$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pdb.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pdb.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pdb.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Protein sequences from pdb protein structures"
+db.name=pdb
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^pdb(aa|nt)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^pdb.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pfam.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pfam.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/pfam.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="PFAM : Multiple alignments and profile HMMs of protein domains"
+db.name=pfam
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=3
+
+protocol=ftp
+server=ftp.sanger.ac.uk
+remote.dir=/pub/databases/Pfam/current_release/
+
+release.file=relnotes.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^Pfam.*\\.gz$ ^swisspfam\\.gz$ ^version.*$ ^pfamseq\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^Pfam.*$ ^swisspfam.*$ ^version.*$ ^pfamseq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/prosite.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/prosite.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/prosite.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="PROSITE protein families and domains database"
+db.name=prosite
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/prosite/release_with_updates
+
+release.file=ps_reldt.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^.*$
+remote.excluded.files=^.*\\.tar.*$
+
+#no.extract=true
+
+local.files=prosite_alignments/[\\w+]+$ [\\w+]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseq.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseq.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseq.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,58 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="refseq Index blast"
+db.name=refseq
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download index blast)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^refseq.*\\.tar\\.gz$
+
+#no.extract=true
+
+local.files=^refseq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseqRelease.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseqRelease.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/refseqRelease.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="The Reference Sequence (RefSeq) collection aims to provide a comprehensive, integrated, non-redundant set of sequences, including genomic DNA, transcript (RNA), and protein products, for major research organisms."
+db.name=refseqRelease
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/refseq/release/complete
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^.*\\.gbff\\.gz$ ^.*\\.gpff\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^.*\\.gbff ^.*\\.gpff
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/rfam.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/rfam.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/rfam.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Rfam: Multiple alignments and covariance models of non-coding RNA"
+db.name=rfam
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.sanger.ac.uk
+remote.dir=/pub/databases/Rfam/CURRENT
+
+release.file=README
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=flase
+
+remote.files=^.*$ README
+remote.excluded.files=.*tar.*$
+
+#no.extract=true
+
+local.files=[\\w+]$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/sts.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/sts.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/sts.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,59 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Database for sequence tag site entries"
+db.name=sts
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^sts.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^sts.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/swissprot.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/swissprot.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/swissprot.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Swiss-prot database (last major release)"
+db.name=swissprot
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^swissprot\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^swissprot.*
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/taxonomy.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/taxonomy.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/taxonomy.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,54 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="The taxonomy database of the International Sequence Database Collaboration contains the names of all organisms that are represented in the sequence databases with at least one nucleotide or protein sequence."
+db.name=taxonomy
+db.type=other
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/taxonomy
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^taxonomy.dat$ ^README$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^taxonomy.dat$ ^README$
+
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/tgi.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/tgi.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/tgi.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Tigr"
+db.name=tgi
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.tigr.org
+remote.dir=/pub/data/tgi
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z].*/.*\\.zip$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/unigene.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/unigene.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/unigene.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniGene: An Organized View of the Transciptome."
+db.name=unigene
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/Unigene/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*/.*\\.data\\.gz$ .*/.*\\.seq\\.all\\.gz$ .*/.*\\.seq\\.uniq\\.gz$ .*/.*\\.info$ README
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=.*/.*\\.data$ .*/.*\\.seq\\.all$ .*/.*\\.seq\\.uniq$ .*/.*\\.info$ README
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniprot.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniprot.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniprot.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt (Universal Protein Resource) is the world's most comprehensive catalog of information on proteins. It is a central repository of protein sequence and function created by joining the information contained in Swiss-Prot, TrEMBL, and PIR."
+db.name=uniprot
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/current_release/knowledgebase/complete/
+
+release.file=reldate.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^uniprot.*$ ^reldate.txt$ ^README.*$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^uniprot.*$ reldate.txt$ README.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,7 @@
+
+######################
+db.fullname="UniProt Reference Clusters"
+db.name=uniref
+virtual.list=uniref50,uniref90,uniref100
+
+db.type=protein
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref100.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref100.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref100.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,54 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 100- UniRef100 contains all records in the UniProt Knowledgebase and selected UniParc records"
+db.name=uniref100
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+########################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref100/
+
+release.file=uniref100.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref50.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref50.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref50.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 50 - UniRef50 clusters are generated from the UniRef90 seed sequences with a 50% sequence identity threshold using the CD-HIT algorithm."
+db.name=uniref50
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref50/
+
+release.file=uniref50.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref90.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref90.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/uniref90.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 90 - UniRef90 clusters are generated from the UniRef100 seed sequences with a 90% sequence identity threshold using the CD-HIT algorithm."
+db.name=uniref90
+db.type=protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref90/
+
+release.file=uniref90.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/vector.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/vector.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/vector.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+
+######################
+### Initialization ###
+######################
+db.fullname="vector sequence database"
+db.name=vector
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^vector.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^vector.*
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/wgs.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/wgs.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/wgs.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,60 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Whole genome shotgun genome assemblies"
+db.name=wgs
+db.type=nucleic
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+
+remote.files=^wgs.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^wgs.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/yeast.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/yeast.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_without_process/yeast.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,54 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="yeast.nt: yeast genomic sequence. yeast.aa: protein translations from yeast genome annotation"
+db.name=yeast
+db.type=nucleic_protein
+
+#data.dir=
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^yeast.*\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^yeast\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Anopheles_gambiae.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Anopheles_gambiae.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Anopheles_gambiae.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genome Anopheles gambiae (NCBI)"
+db.name=Anopheles_gambiae
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Anopheles_gambiae_tmp
+dir.version=ncbi/genomes/Anopheles_gambiae
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Genomes - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Anopheles_gambiae
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ ^maps/mapview/.*$ ^SNP/.*$
+remote.excluded.files=.*\\.asn.*
+
+#Uncomment if you don't want to extract the data files.
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Apis_mellifera.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Apis_mellifera.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Apis_mellifera.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,67 @@
+
+#####################
+### Initialization ###
+
+db.fullname="Genome Apis mellifera (NCBI)"
+db.name=Apis_mellifera
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Apis_mellifera_tmp
+dir.version=ncbi/genomes/Apis_mellifera
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Genomes - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Apis_mellifera
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/[\\w]+ref.*$ ^Assembled_chromosomes/chr_NC_gi$ ^CHR_[\\w]+/[\\w]+ref.*$ ^mapview/.*$ ^RNA/.*$ ^protein/.*$
+remote.excluded.files=.*\\.asn.*
+
+#Uncomment if you don't want to extract the files.
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/ame_ref\\w+\\.fa\\.gz' --bank Apis_mellifera
+formatdb.desc=Index blast
+formatdb.type=index
+#-------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+### Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Arabidopsis_thaliana.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Arabidopsis_thaliana.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Arabidopsis_thaliana.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,55 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genome Arabidopsis thaliana (NCBI)"
+db.name=Arabidopsis_thaliana
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Arabidopsis_thaliana_tmp
+dir.version=ncbi/genomes/Arabidopsis_thaliana
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Genomes - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=3
+
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Arabidopsis_thaliana
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ README
+remote.excluded.files=.*\\.asn.*
+
+#Uncomment if you don't want to extract the files.
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bacteria.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bacteria.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bacteria.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,57 @@
+
+######################
+### Initialization ###
+
+db.fullname="Genomes Bacteria (NCBI)"
+db.name=Bacteria
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Bacteria_tmp
+dir.version=ncbi/genomes/Bacteria
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Genomes - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Bacteria
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z][\\w]+/.*(gbk|fna|ffn|ptt|gff)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+### Deployment ###
+
+keep.old.version=0
+
+
+
+
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bos_taurus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bos_taurus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Bos_taurus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,74 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Bos taurus (NCBI)"
+db.name=Bos_taurus
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Bos_taurus_tmp
+dir.version=ncbi/genomes/Bos_taurus
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Genomes - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Bos_taurus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/bt_ref_chr.*$ ^Assembled_chromosomes/chr_NC_gi$ ^CHR_[\\w]+/bt_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/bt_ref\\w+\\.fa\\.gz' --bank Bos_taurus
+formatdb.desc=Index blast
+formatdb.type=index
+#-------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Caenorhabditis_elegans.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Caenorhabditis_elegans.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Caenorhabditis_elegans.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Caenorhabditis elegans (NCBI)"
+db.name=Caenorhabditis_elegans
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Caenorhabditis_elegans_tmp
+dir.version=ncbi/genomes/Caenorhabditis_elegans
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Caenorhabditis_elegans
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Canis_familiaris.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Canis_familiaris.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Canis_familiaris.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Canis familiaris (NCBI)"
+db.name=Canis_familiaris
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Canis_familiaris_tmp
+dir.version=ncbi/genomes/Canis_familiaris
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Canis_familiaris
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^Assembled_chromosomes/cfa_chr.*$ ^CHR_[\\w]+/cfa_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/cfa\\w+\\.fa\\.gz' --bank Canis_familiaris
+formatdb.desc=Index blast
+formatdb.type=index
+#-------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/D_rerio.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/D_rerio.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/D_rerio.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Danio rerio (NCBI)"
+db.name=D_rerio
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/D_rerio_tmp
+dir.version=ncbi/genomes/D_rerio
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/D_rerio
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/.*$ ^CHR_[\\w]+/[\\w+]_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^RNA/.*$ ^protein/.*$ ^maps/mapview/.*$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/dr_ref\\w+\\.fa\\.gz' --bank Danio_rerio
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Drosophila_melanogaster.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Drosophila_melanogaster.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Drosophila_melanogaster.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Drosophila melanogaster (NCBI)"
+db.name=Drosophila_melanogaster
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Drosophila_melanogaster_tmp
+dir.version=ncbi/genomes/Drosophila_melanogaster
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Drosophila_melanogaster
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$ ^README.*$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Fungi.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Fungi.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Fungi.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,62 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genomes Fungi (NCBI)"
+db.name=Fungi
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Fungi_tmp
+dir.version=ncbi/genomes/Fungi
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Fungi
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z][\\w]+/.*(faa|ffn|fna|frn|gbk|gff|ptt|rnt|rps|rpt)$
+#remote.excluded.files=^Schizosaccharomyces_pombe.*$ ^Saccharomyces_cerevisiae.*$
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Gallus_gallus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Gallus_gallus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Gallus_gallus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Gallus gallus (NCBI)"
+db.name=Gallus_gallus
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Gallus_gallus_tmp
+dir.version=ncbi/genomes/Gallus_gallus
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Gallus_gallus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/gga_ref.* ^CHR_[\\w]+/gga[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^mapview/.*$ ^README.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w]+/[\\w]+$ [\\w]+/[\\w]+/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/gga_ref\\w+\\.fa\\.gz' --bank Gallus_gallus
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/H_sapiens.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/H_sapiens.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/H_sapiens.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Homo sapiens (NCBI)"
+db.name=H_sapiens
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/H_sapiens_tmp
+dir.version=ncbi/genomes/H_sapiens
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/H_sapiens
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/hs_ref.*$ ^CHR_[\\w]+/hs_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/hs_ref\\w+\\.fa\\.gz' --bank Homo_sapiens
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/M_musculus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/M_musculus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/M_musculus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Mus musculus (NCBI)"
+db.name=M_musculus
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/M_musculus_tmp
+dir.version=ncbi/genomes/M_musculus
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/M_musculus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/mm_ref.*$ ^CHR_[\\w]+/mm_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/\\w+\\.fa\\.gz' --bank Mus_musculus
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Macaca_mulatta.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Macaca_mulatta.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Macaca_mulatta.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Macaca mulatta (NCBI)"
+db.name=Macaca_mulatta
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Macaca_mulatta_tmp
+dir.version=ncbi/genomes/Macaca_mulatta
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Macaca_mulatta
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/mmu_ref.*$ ^CHR_[\\w]+/mmu_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/mmu_ref\\w+\\.fa\\.gz' --bank Macaca_mullata
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Monodelphis_domestica.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Monodelphis_domestica.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Monodelphis_domestica.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Monodelphis domestica (NCBI)"
+db.name=Monodelphis_domestica
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Monodelphis_domestica_tmp
+dir.version=ncbi/genomes/Monodelphis_domestica
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Monodelphis_domestica
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/mdm_ref.*$ ^CHR_[\\w]+/mdm_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/mdm_ref\\w+\\.fa\\.gz' --bank Monodelphis_domestica
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Pan_troglodytes.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Pan_troglodytes.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Pan_troglodytes.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Pan troglodytes (NCBI)"
+db.name=Pan_troglodytes
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Pan_troglodytes_tmp
+dir.version=ncbi/genomes/Pan_troglodytes
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Pan_troglodytes
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/ptr_ref.*$ ^CHR_[\\w]+/ptr_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/ptr_ref\\w+\\.fa\\.gz' --bank Pan_troglodytes
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Plasmodium_falciparum.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Plasmodium_falciparum.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Plasmodium_falciparum.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Plasmodium falciparum (NCBI)"
+db.name=Plasmodium_falciparum
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Plasmodium_falciparum_tmp
+dir.version=ncbi/genomes/Plasmodium_falciparum
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Plasmodium_falciparum
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*$ ^CHR[\\w]+/[\\w]+\\.(faa|ffn|fna|frn|gbk|gff|ptt|rnt|rpt)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/R_norvegicus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/R_norvegicus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/R_norvegicus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Rattus norvegicus (NCBI)"
+db.name=R_norvegicus
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/R_norvegicus_tmp
+dir.version=ncbi/genomes/R_norvegicus
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/R_norvegicus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^masking_coordinates.gz$ ^scaffold_names$ ^Assembled_chromosomes/rn_ref.*$ ^CHR_[\\w]+/rn_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^README.*$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/rn_ref\\w+\\.fa\\.gz' --bank Rattus_norvegicus
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Saccharomyces_cerevisiae.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Saccharomyces_cerevisiae.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Saccharomyces_cerevisiae.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Saccharomyces cerevisiae (NCBI)"
+db.name=Saccharomyces_cerevisiae
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Saccharomyces_cerevisiae_tmp
+dir.version=ncbi/genomes/Saccharomyces_cerevisiae
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Saccharomyces_cerevisiae
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*$ ^CHR_[\\w]+/[\\w]+\\.(faa|ffn|fna|gbk|ptt)$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Schizosaccharomyces_pombe.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Schizosaccharomyces_pombe.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Schizosaccharomyces_pombe.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Schizosaccharomyces_pombe (NCBI)"
+db.name=Schizosaccharomyces_pombe
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Schizosaccharomyces_pombe_tmp
+dir.version=ncbi/genomes/Schizosaccharomyces_pombe
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Schizosaccharomyces_pombe
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^CHR_[\\w]+/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Strongylocentrotus_purpuratus.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Strongylocentrotus_purpuratus.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Strongylocentrotus_purpuratus.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Strongylocentrotus purpuratus (NCBI)"
+db.name=Strongylocentrotus_purpuratus
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Strongylocentrotus_purpuratus_tmp
+dir.version=ncbi/genomes/Strongylocentrotus_purpuratus
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Strongylocentrotus_purpuratus
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/.*_ref_.*$ ^CHR_[\\w]+/.*_ref_.*$ ^README.*$ ^RNA/.*\\.(fa|gbk)\\.gz$ ^protein/.*\\.(fa|gbk)\\.gz$ ^mapview/.*$
+remote.excluded.files=.*\\.asn.*
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Tribolium_castaneum.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Tribolium_castaneum.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/Tribolium_castaneum.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genome Tribolium castaneum (NCBI)"
+db.name=Tribolium_castaneum
+db.type=genome
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genomes/Tribolium_castaneum_tmp
+dir.version=ncbi/genomes/Tribolium_castaneum
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genomes/Tribolium_castaneum
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^scaffold_names$ ^Assembled_chromosomes/tca_ref.*$ ^CHR_[\\w]+/tca_ref_chr[\\w]+\\.(gbk|fa|gbs|mfa)\\.gz$ ^mapview/.*$ ^RNA/.*(fa|gbk)\\.gz$ ^protein/.*(fa|gbk)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w]+$ [\\w+]/[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Assem\\w+/tca_ref\\w+\\.fa\\.gz' --bank Tribolium_castaneum
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Genomes - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/alu.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/alu.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/alu.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,67 @@
+
+######################
+### Initialization ###
+
+db.fullname="alu.n : alu repeat element. alu.a : translation of alu.n repeats"
+db.name=alu
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/alu_tmp
+dir.version=ncbi/blast/alu
+
+frequency.update=0
+
+### Pre Process ###
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+### Synchronization ###
+
+files.num.threads=1
+
+# NCBI (download fasta)
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^alu.*\\.gz$
+
+#Uncomment if you don't want to extract the data files.
+#no.extract=true
+
+local.files=^alu\\.(a|n).*
+
+### Post Process ### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'alu.a.* alu.n.*'
+formatdb.desc=Index blast
+formatdb.type=index
+#--------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+### Deployment ###
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/astral.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/astral.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/astral.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,46 @@
+
+######################
+### Initialization ###
+
+db.fullname="The ASTRAL Compendium for Sequence and Structure Analysis"
+db.name=astral
+db.type=protein
+
+offline.dir.name=
+dir.version=
+
+frequency.update=0
+
+### Synchronization ###
+
+files.num.threads=4
+
+protocol=http
+
+http.parse.dir.line=<img[\\s]+src=\"/icons/folder.gif\"[\\s]+alt=\"\\[DIR\\]\".*href=\"([\\S]+)/\".*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})
+http.parse.file.line=<a[\\s]+href=\"([\\S]+)\".*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})[\\s]+([\\d\\.]+[MKG]{0,1})
+
+http.group.dir.name=1
+http.group.dir.date=2
+http.group.file.name=1
+http.group.file.date=2
+http.group.file.size=3
+
+server=astral.berkeley.edu
+remote.dir=/pdbstyle-1.71
+
+
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=[\\w0-9]*/[\\w]+.ent
+#Uncomment if you don't want to extract the data files.
+#no.extract=true
+
+local.files=.*
+
+###Â Deployment ###
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/dbest.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/dbest.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/dbest.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,87 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="dbEST (Nature Genetics 4:332-3;1993) is a division of GenBank that contains sequence data and other information on single-pass cDNA sequences, or Expressed Sequence Tags, from a number of organisms."
+db.name=dbest
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/dbest_tmp
+dir.version=ncbi/dbest
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/repository/dbEST/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^dbEST.*\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^dbEST.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail,diffDbestSurf,postmail_diff
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d dbest --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+#----------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI - db.name remote.release] End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+#----------
+diffDbestSurf.name=indexSrs
+diffDbestSurf.exe=diffDbestSurf.pl
+diffDbestSurf.args=-o all
+diffDbestSurf.desc=Diff between Dbest and Surf
+diffDbestSurf.type=SigenaePP
+#----------
+postmail_diff.name=sendMail
+postmail_diff.exe=sendMailTLSE.pl
+postmail_diff.args=-s '[NCBI - db.name remote.release] End Post Process DiffDbestSurf' -m 'local.time'
+postmail_diff.desc=mail
+postmail_diff.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/drosoph.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/drosoph.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/drosoph.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="drosoph.nt : genomic sequences for drosophila. drosoph.aa : CDS translations from drosophila.nt"
+db.name=drosoph
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/drosoph_tmp
+dir.version=ncbi/blast/drosoph
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^drosoph.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^drosoph\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/ecoli.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/ecoli.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/ecoli.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="ecoli.nt : Escherichia coli K-12 genomic sequences. CDS translations from ecoli.nt"
+db.name=ecoli
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/ecoli_tmp
+dir.version=ncbi/blast/ecoli
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^ecoli.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^ecoli\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/env.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/env.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/env.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,97 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="env_nr : Environmental protein sequences. env_nt : Environmental nucleotide sequences"
+db.name=env
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/env_tmp
+dir.version=ncbi/blast/env
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^env_.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^env_(nr|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1,POST2
+
+POST1=fastacmd_nt,postmail_nt
+POST2=fastacmd_nr,postmail_nr
+
+#----------
+fastacmd_nt.name=fastacmd
+fastacmd_nt.exe=fastacmdTLSE.pl
+fastacmd_nt.args=--bank env_nt --execute pbs
+fastacmd_nt.desc=Create Fasta File
+fastacmd_nt.type=Index2FlatFile
+
+postmail_nt.name=sendMail
+postmail_nt.exe=sendMailTLSE.pl
+postmail_nt.args=-s '[NCBI Blast - db.name nt remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_nt.desc=mail
+postmail_nt.type=info
+#----------
+#----------
+fastacmd_nr.name=fastacmd
+fastacmd_nr.exe=fastacmdTLSE.pl
+fastacmd_nr.args=--bank env_nr --execute pbs
+fastacmd_nr.desc=Create Fasta File
+fastacmd_nr.type=Index2FlatFile
+
+postmail_nr.name=sendMail
+postmail_nr.exe=sendMailTLSE.pl
+postmail_nr.args=-s '[NCBI Blast - db.name nr remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_nr.desc=mail
+postmail_nr.type=info
+#----------
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/enzyme.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/enzyme.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/enzyme.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="ENZYME : the repository of information relative to the nomenclature of enzymes"
+db.name=enzyme
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/expasy/enzyme_tmp
+dir.version=expasy/enzyme
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ca.expasy.org
+remote.dir=/databases/enzyme/
+
+release.file=enzuser.txt
+release.regexp=[0-9]{2}-[\\w]{2,5}-20[0-9]{2}
+release.file.compressed=false
+
+remote.files=.*\\.txt$ .*\\.dat$ .*\\.get$ README$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=.*\\.txt$ .*\\.dat$ .*\\.get$ README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSRS
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d enzyme --pvm --execute pbs -c 6
+indexSRS.desc=Index srs
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[Expasy - db.name remote.release] End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/est.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/est.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/est.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,107 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="est_human : human subset of the est database. est_mouse : mouse subset of the est database. est_others : non-human and non-mouse subset of the est database"
+db.name=est
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/est_tmp
+dir.version=ncbi/blast/est
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^est.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^est.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1,POST2,POST3
+
+POST1=fastacmd_human,postmail_human
+POST2=fastacmd_mouse,postmail_mouse
+POST3=fastacmd_others,postmail_others
+
+fastacmd_human.name=fastacmd
+fastacmd_human.exe=fastacmdTLSE.pl
+fastacmd_human.args=--bank est_human --execute pbs
+fastacmd_human.desc=Create Fasta File
+fastacmd_human.type=Index2FlatFile
+
+fastacmd_mouse.name=fastacmd
+fastacmd_mouse.exe=fastacmdTLSE.pl
+fastacmd_mouse.args=--bank est_mouse --execute pbs
+fastacmd_mouse.desc=Create Fasta File
+fastacmd_mouse.type=Index2FlatFile
+
+fastacmd_others.name=fastacmd
+fastacmd_others.exe=fastacmdTLSE.pl
+fastacmd_others.args=--bank est_others --execute pbs
+fastacmd_others.desc=Create Fasta File
+fastacmd_others.type=Index2FlatFile
+
+postmail_human.name=sendMail
+postmail_human.exe=sendMailTLSE.pl
+postmail_human.args=-s '[NCBI Blast - db.name human remote.release] End fastacmd est_human' -m 'local.time'
+postmail_human.desc=mail
+postmail_human.type=info
+
+postmail_mouse.name=sendMail
+postmail_mouse.exe=sendMailTLSE.pl
+postmail_mouse.args=-s '[NCBI Blast - db.name mouse remote.release] End fastacmd est_mouse' -m 'local.time'
+postmail_mouse.desc=mail
+postmail_mouse.type=info
+
+postmail_others.name=sendMail
+postmail_others.exe=sendMailTLSE.pl
+postmail_others.args=-s '[NCBI Blast - db.name others remote.release] End fastacmd est_others' -m 'local.time'
+postmail_others.desc=mail
+postmail_others.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/genbankRelease.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/genbankRelease.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/genbankRelease.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Genbank Release is the NIH genetic sequence database, an annotated collection of all publicly available DNA sequences"
+db.name=genbankRelease
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/genbank/genbankRelease_tmp
+dir.version=ncbi/genbank/genbankRelease
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/genbank/
+
+release.file=GB_Release_Number
+release.regexp=[\\d]+
+release.file.compressed=false
+
+remote.files=^gb.*\\.seq\\.gz$ GB_Release_Number.*$ ^rel[\\d]+\\.fsa_aa\\.gz$ ^gbnew\\.txt\\.gz$ ^gbchg\\.txt\\.gz$ ^gbdel\\.txt\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=gb.*\\.seq$ GB_Release_Number$ rel[\\d+]\\.fsa_aa$ gb.*txt$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d genbankrelease --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI - db.name remote.release] - End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/geneontology.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/geneontology.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/geneontology.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Gene Ontologie"
+db.name=geneontology
+db.type=other
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/geneontology_tmp
+dir.version=geneontology
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.geneontology.org
+remote.dir=/pub/go/godatabase/archive/latest
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^go_.*\\.gz$
+remote.excluded.files=^.*\\.tar\\.gz$ ^.*\\.sql\\.gz$
+
+#no.extract=true
+
+local.files=[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d go --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[db.name remote.release] End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/go.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/go.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/go.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,48 @@
+
+###################
+#FTP server/login information
+db.fullname="Gene Ontologie"
+db.name=go
+server=www.godatabase.org
+protocol=http
+
+#These settings override the settings in global.ftp.properties if needed.
+#ftp.port=21
+#ftp.username=anonymous
+#ftp.password=anonymous at nowhere.com
+
+#Remote directory and file information
+remote.dir=/dev/database/archive/latest
+remote.files=go.*-assocdb\\.rdf-xml\\.gz README DATESTAMP
+
+frequency.update=0
+release.regexp=[0-9]{4}0[6-9]
+
+#Local directory information
+#Override default data directory set in global.ftp.properties
+#ftp.data.dir=
+online.dir.name=go
+offline.dir.name=go_tmp
+local.files=go.*-assocdb\\.rdf-xml README DATESTAMP
+
+#Set link 1 and 2 directories if switch links are being used.
+#ftp.link1.dir=genbankwgs_0
+#ftp.link2.dir=genbankwgs_1
+
+#WGET options
+#Override default wget options set in global.ftp.properties
+#wget.options=-c -x -nH --cut-dirs=6 -N
+
+#Extract
+#Uncomment if you don't want to extract the files.
+#ftp.no.extract=true
+
+
+
+#Pre and post build files.
+#The files should be located in the projectfiles directory.
+db.pre.process=
+#db.post.process=blast.xml
+db.type=Other
+keep.old.version=0
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/gss.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/gss.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/gss.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Sequences from the GSS division of GenBank, EMBL and DDBJ"
+db.name=gss
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/gss_tmp
+dir.version=ncbi/blast/gss
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^gss.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^gss.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_gss,postmail_gss
+
+fastacmd_gss.name=fastacmd
+fastacmd_gss.exe=fastacmdTLSE.pl
+fastacmd_gss.args=--execute pbs
+fastacmd_gss.desc=Create Fasta File
+fastacmd_gss.type=Index2FlatFile
+
+postmail_gss.name=sendMail
+postmail_gss.exe=sendMailTLSE.pl
+postmail_gss.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_gss.desc=mail
+postmail_gss.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/htgs.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/htgs.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/htgs.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,83 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="htgs database with high throughput genomic entries from the htg division of GenBank, EMBL, and DDBJ"
+db.name=htgs
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/htgs_tmp
+dir.version=ncbi/blast/htgs
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^htgs.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^htgs.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_htgs,postmail_htgs
+
+fastacmd_htgs.name=fastacmd
+fastacmd_htgs.exe=fastacmdTLSE.pl
+fastacmd_htgs.args=--execute pbs
+fastacmd_htgs.desc=Create Fasta File
+fastacmd_htgs.type=Index2FlatFile
+
+postmail_htgs.name=sendMail
+postmail_htgs.exe=sendMailTLSE.pl
+postmail_htgs.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_htgs.desc=mail
+postmail_htgs.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="human RefSeq (NC_######) chromosome records with gap adjusted concatnated NT_ contigs"
+db.name=human_genomic
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/human_genomic_tmp
+dir.version=ncbi/blast/human_genomic
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^human_genomic\\..*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^human_genomic.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_hg,postmail_hg
+
+fastacmd_hg.name=fastacmd
+fastacmd_hg.exe=fastacmdTLSE.pl
+fastacmd_hg.args=--bank human_genomic
+fastacmd_hg.desc=Create Fasta File
+fastacmd_hg.type=Index2FlatFile
+
+postmail_hg.name=sendMail
+postmail_hg.exe=sendMailTLSE.pl
+postmail_hg.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_hg.desc=mail
+postmail_hg.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic_transcript.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic_transcript.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/human_genomic_transcript.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Human Genomic Transcript"
+db.name=human_genomic_transcript
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/human_genomic_transcript_tmp
+dir.version=ncbi/blast/human_genomic_transcript
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^human_genomic_transcript.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^human.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_hg,postmail_hg
+
+fastacmd_hg.name=fastacmd
+fastacmd_hg.exe=fastacmdTLSE.pl
+fastacmd_hg.args=--bank human_genomic_transcript
+fastacmd_hg.desc=Create Fasta File
+fastacmd_hg.type=Index2FlatFile
+
+postmail_hg.name=sendMail
+postmail_hg.exe=sendMailTLSE.pl
+postmail_hg.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_hg.desc=mail
+postmail_hg.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/igSeq.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/igSeq.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/igSeq.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,74 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Human and Mouse immunoglobulin nucleotide or protein sequences"
+db.name=igSeq
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/igSeq_tmp
+dir.version=ncbi/blast/igSeq
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^igSeq.*\\.gz$
+
+no.extract=true
+
+local.files=^igSeq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta igSeq.*
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/interpro.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/interpro.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/interpro.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="InterPro is a database of protein families, domains and functional sites in which identifiable features found in known proteins can be applied to unknown protein sequences."
+db.name=interpro
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/interpro_tmp
+dir.version=ebi/interpro
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/interpro/
+
+release.file=release_notes.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=.*$
+remote.excluded.files=.*tar.*$
+
+#no.extract=true
+
+local.files=[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d interpro --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[EBI - db.name remote.release] - End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/mouse_genomic_transcript.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/mouse_genomic_transcript.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/mouse_genomic_transcript.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="mouse_genomic_transcript"
+db.name=mouse_genomic_transcript
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/mouse_genomic_transcript_tmp
+dir.version=ncbi/blast/mouse_genomic_transcript
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^mouse_genomic_transcript.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^mouse.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_hg,postmail_hg
+
+fastacmd_hg.name=fastacmd
+fastacmd_hg.exe=fastacmdTLSE.pl
+fastacmd_hg.args=--bank mouse_genomic_transcript
+fastacmd_hg.desc=Create Fasta File
+fastacmd_hg.type=Index2FlatFile
+
+postmail_hg.name=sendMail
+postmail_hg.exe=sendMailTLSE.pl
+postmail_hg.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_hg.desc=mail
+postmail_hg.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nr.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nr.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nr.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,82 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="non-redundant protein sequence database with entries from GenPept, Swissprot, PIR, PDF, PDB and RefSeq"
+db.name=nr
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/nr_tmp
+dir.version=ncbi/blast/nr
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index fasta)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^nr.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^nr.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_nr,postmail_nr
+
+fastacmd_nr.name=fastacmd
+fastacmd_nr.exe=fastacmdTLSE.pl
+fastacmd_nr.args=--execute pbs
+fastacmd_nr.desc=Create Fasta File
+fastacmd_nr.type=Index2FlatFile
+
+postmail_nr.name=sendMail
+postmail_nr.exe=sendMailTLSE.pl
+postmail_nr.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_nr.desc=mail
+postmail_nr.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nt.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nt.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/nt.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="nucleotide sequence database, with entries from all traditional divisions of GenBank, EMBL and DDBJ excluding bulk divisions (gss, sts, pat, est, htg divisions) and wgs entries. Not non-redundant"
+db.name=nt
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/nt_tmp
+dir.version=ncbi/blast/nt
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^nt.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^nt.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=MP1
+
+MP1=fastacmd_nt,postmail_nt
+
+fastacmd_nt.name=fastacmd
+fastacmd_nt.exe=fastacmdTLSE.pl
+fastacmd_nt.args=--execute pbs
+fastacmd_nt.desc=Create Fasta File
+fastacmd_nt.type=Index2FlatFile
+
+postmail_nt.name=sendMail
+postmail_nt.exe=sendMailTLSE.pl
+postmail_nt.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_nt.desc=mail
+postmail_nt.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/omim.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/omim.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/omim.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,74 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="OMIM : Online Mendelian Inheritance in Man"
+db.name=omim
+db.type=other
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/omim_tmp
+dir.version=ncbi/omim
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/repository/OMIM/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^.*$ ^Homology/.*$
+remote.excluded.files=Text/.*$
+
+#no.extract=true
+
+local.files=^[\\w]+/[\\w]+$ ^[\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d omim --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI - db.name remote.release] - End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/other_genomic.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/other_genomic.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/other_genomic.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="RefSeq chromosome records (NC_######) for organisms other than human"
+db.name=other_genomic
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/other_genomic_tmp
+dir.version=ncbi/blast/other_genomic
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^other_genomic.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^other_genomic.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd_og,postmail_og
+
+fastacmd_og.name=fastacmd
+fastacmd_og.exe=fastacmdTLSE.pl
+fastacmd_og.args=
+fastacmd_og.desc=Create Fasta File
+fastacmd_og.type=Index2FlatFile
+
+postmail_og.name=sendMail
+postmail_og.exe=sendMailTLSE.pl
+postmail_og.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_og.desc=mail
+postmail_og.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/patent.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/patent.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/patent.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,74 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Patent protein/nucleotide sequence database"
+db.name=patent
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/patent_tmp
+dir.version=ncbi/blast/patent
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^pat.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^pat.*\\.gz$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta pat.*
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pdb.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pdb.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pdb.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Protein sequences from pdb protein structures"
+db.name=pdb
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/pdb_tmp
+dir.version=ncbi/blast/pdb
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^pdb(aa|nt)\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^pdb.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta pdb.*
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pfam.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pfam.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/pfam.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,100 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="PFAM : Multiple alignments and profile HMMs of protein domains"
+db.name=pfam
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/sanger/pfam_tmp
+dir.version=sanger/pfam
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+files.num.threads=3
+
+protocol=ftp
+server=ftp.sanger.ac.uk
+remote.dir=/pub/databases/Pfam/current_release/
+
+release.file=relnotes.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^Pfam.*\\.gz$ ^swisspfam\\.gz$ ^version.*$ ^pfamseq\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^Pfam.*$ ^swisspfam.*$ ^version.*$ ^pfamseq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1,POST2,POST3
+
+POST1=indexSRS_A,postmail_A
+POST2=indexSRS_B,postmail_B
+POST3=indexSRS_C,postmail_C
+
+indexSRS_A.name=indexSrs
+indexSRS_A.exe=indexSrsTLSE.pl
+indexSRS_A.args=-v -d pfama --pvm --execute pbs -c 6
+indexSRS_A.desc=Index SRS
+indexSRS_A.type=index
+#----
+postmail_A.name=sendMail
+postmail_A.exe=sendMailTLSE.pl
+postmail_A.args=-s '[SANGER - db.name A remote.release] - End Post Process' -m 'local.time'
+postmail_A.desc=mail
+postmail_A.type=info
+
+indexSRS_B.name=indexSrs
+indexSRS_B.exe=indexSrsTLSE.pl
+indexSRS_B.args=-v -d pfamb --pvm --execute pbs -c 6
+indexSRS_B.desc=Index SRS
+indexSRS_B.type=index
+#----
+postmail_B.name=sendMail
+postmail_B.exe=sendMailTLSE.pl
+postmail_B.args=-s '[SANGER - db.name B remote.release] - End Post Process' -m 'local.time'
+postmail_B.desc=mail
+postmail_B.type=info
+
+indexSRS_C.name=indexSrs
+indexSRS_C.exe=indexSrsTLSE.pl
+indexSRS_C.args=-v -d pfamc --pvm --execute pbs -c 6
+indexSRS_C.desc=Index SRS
+indexSRS_C.type=index
+#----
+postmail_C.name=sendMail
+postmail_C.exe=sendMailTLSE.pl
+postmail_C.args=-s '[SANGER - db.name C remote.release] - End Post Process' -m 'local.time'
+postmail_C.desc=mail
+postmail_C.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/prosite.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/prosite.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/prosite.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="PROSITE protein families and domains database"
+db.name=prosite
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/prosite_tmp
+dir.version=ebi/prosite
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/prosite/release_with_updates
+
+release.file=ps_reldt.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^.*$
+remote.excluded.files=^.*\\.tar.*$
+
+#no.extract=true
+
+local.files=prosite_alignments/[\\w+]+$ [\\w+]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d prosite --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[EBI - db.name remote.release] - End Post Process index srs' -m ''
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseq.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseq.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseq.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,106 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="refseq Index blast"
+db.name=refseq
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/refseq_tmp
+dir.version=ncbi/blast/refseq
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+# NCBI (download index blast)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^refseq.*\\.tar\\.gz$
+
+#no.extract=true
+
+local.files=^refseq.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1,POST2,POST3
+
+POST1=fastacmd_genomic,postmail_genomic
+POST2=fastacmd_protein,postmail_protein
+POST3=fastacmd_rna,postmail_rna
+
+fastacmd_genomic.name=fastacmd
+fastacmd_genomic.exe=fastacmdTLSE.pl
+fastacmd_genomic.args=--bank refseq_genomic --execute pbs
+fastacmd_genomic.desc=Create Fasta File
+fastacmd_genomic.type=Index2FlatFile
+#-------
+postmail_genomic.name=sendMail
+postmail_genomic.exe=sendMailTLSE.pl
+postmail_genomic.args=-s '[NCBI Blast - db.name genomic remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_genomic.desc=mail
+postmail_genomic.type=info
+
+fastacmd_protein.name=fastacmd
+fastacmd_protein.exe=fastacmdTLSE.pl
+fastacmd_protein.args=--bank refseq_protein --execute pbs
+fastacmd_protein.desc=Create Fasta File
+fastacmd_protein.type=Index2FlatFile
+#-------
+postmail_protein.name=sendMail
+postmail_protein.exe=sendMailTLSE.pl
+postmail_protein.args=-s '[NCBI Blast - db.name protein remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_protein.desc=mail
+postmail_protein.type=info
+
+fastacmd_rna.name=fastacmd
+fastacmd_rna.exe=fastacmdTLSE.pl
+fastacmd_rna.args=--bank refseq_rna --execute pbs
+fastacmd_rna.desc=Create Fasta File
+fastacmd_rna.type=Index2FlatFile
+#-------
+postmail_rna.name=sendMail
+postmail_rna.exe=sendMailTLSE.pl
+postmail_rna.args=-s '[NCBI Blast - db.name rna remote.release] End Post Process fastacmd' -m 'local.time'
+postmail_rna.desc=mail
+postmail_rna.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseqRelease.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseqRelease.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/refseqRelease.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="The Reference Sequence (RefSeq) collection aims to provide a comprehensive, integrated, non-redundant set of sequences, including genomic DNA, transcript (RNA), and protein products, for major research organisms."
+db.name=refseqRelease
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/refseq/refseqRelease_tmp
+dir.version=ncbi/refseq/refseqRelease
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/refseq/release/complete
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^.*\\.gbff\\.gz$ ^.*\\.gpff\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^.*\\.gbff ^.*\\.gpff
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d refseqrelease --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI - db.name remote.release] - End Post Process index srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/rfam.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/rfam.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/rfam.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,69 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Rfam: Multiple alignments and covariance models of non-coding RNA"
+db.name=rfam
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/sanger/rfam_tmp
+dir.version=sanger/rfam
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.sanger.ac.uk
+remote.dir=/pub/databases/Rfam/CURRENT
+
+release.file=README
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=flase
+
+remote.files=^.*$ README
+remote.excluded.files=.*tar.*$
+
+#no.extract=true
+
+local.files=[\\w+]$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta 'Rfam.fasta' --bank rfam
+formatdb.desc=Index blast
+formatdb.type=index
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/sts.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/sts.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/sts.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,81 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Database for sequence tag site entries"
+db.name=sts
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/sts_tmp
+dir.version=ncbi/blast/sts
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^sts.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^sts.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd,postmail
+
+fastacmd.name=fastacmd
+fastacmd.exe=fastacmdTLSE.pl
+fastacmd.args=--execute pbs
+fastacmd.desc=Index blast
+fastacmd.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/swissprot.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/swissprot.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/swissprot.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Swiss-prot database (last major release)"
+db.name=swissprot
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/swissprot_tmp
+dir.version=ncbi/blast/swissprot
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^swissprot\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^swissprot.*
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--fasta swissprot.*
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/taxonomy.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/taxonomy.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/taxonomy.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,76 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="The taxonomy database of the International Sequence Database Collaboration contains the names of all organisms that are represented in the sequence databases with at least one nucleotide or protein sequence."
+db.name=taxonomy
+db.type=other
+
+#data.dir=
+offline.dir.name=biomaj/ebi/taxonomy_tmp
+dir.version=ebi/taxonomy
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/taxonomy
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^taxonomy.dat$ ^README$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^taxonomy.dat$ ^README$
+
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d taxonomy --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[EBI - db.name remote.release] - End Post Process' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/tgi.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/tgi.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/tgi.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,61 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Tigr"
+db.name=tgi
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/tgi_tmp
+dir.version=tgi
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.tigr.org
+remote.dir=/pub/data/tgi
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^[A-Z].*/.*\\.zip$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=[\\w+]/[\\w]+$ [\\w]+$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/unigene.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/unigene.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/unigene.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,76 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniGene: An Organized View of the Transciptome."
+db.name=unigene
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/unigene_tmp
+dir.version=ebi/unigene
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/Unigene/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=.*/.*\\.data\\.gz$ .*/.*\\.seq\\.all\\.gz$ .*/.*\\.seq\\.uniq\\.gz$ .*/.*\\.info$ README
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=.*/.*\\.data$ .*/.*\\.seq\\.all$ .*/.*\\.seq\\.uniq$ .*/.*\\.info$ README
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+
+db.post.process=POST1
+
+POST1=indexSRS,postmail
+
+indexSRS.name=indexSrs
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d unigene --pvm --execute pbs -c 6
+indexSRS.desc=Index SRS
+indexSRS.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[EBI - db.name remote.release] - End Post Process indes srs' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=0
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniprot.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniprot.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniprot.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,95 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt (Universal Protein Resource) is the world's most comprehensive catalog of information on proteins. It is a central repository of protein sequence and function created by joining the information contained in Swiss-Prot, TrEMBL, and PIR."
+db.name=uniprot
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/uniprot_tmp
+dir.version=ebi/uniprot
+
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/current_release/knowledgebase/complete/
+
+release.file=reldate.txt
+release.regexp=[\\d]+\\.*[\\d]*
+release.file.compressed=false
+
+remote.files=^uniprot.*$ ^reldate.txt$ ^README.*$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^uniprot.*$ reldate.txt$ README.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1,POST2
+
+POST1=formatdb,postmailFormatdb
+POST2=indexSRS_swiss,indexSRS_trembl,postmailSRS
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--no_parse_seqid --fasta 'uniprot_trembl.fasta uniprot_sprot.fasta uniprot_sprot_varsplic.fasta' --bank 'uniprot_trembl uniprot_sprot uniprot_sprot_varsplic'
+formatdb.desc=Index blast
+formatdb.type=index
+#-------
+postmailFormatdb.name=sendMail
+postmailFormatdb.exe=sendMailTLSE.pl
+postmailFormatdb.args=-s '[EBI - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmailFormatdb.desc=mail
+postmailFormatdb.type=info
+
+indexSRS_swiss.name=indexSRS
+indexSRS_swiss.exe=indexSrsTLSE.pl
+indexSRS_swiss.args=-v -d uniprot_swissprot --pvm --execute pbs -c 6
+indexSRS_swiss.desc=Index srs
+indexSRS_swiss.type=index
+#-------
+indexSRS_trembl.name=indexSRS
+indexSRS_trembl.exe=indexSrsTLSE.pl
+indexSRS_trembl.args=-v -d uniprot_trembl --pvm --execute pbs -c 6
+indexSRS_trembl.desc=Index srs
+indexSRS_trembl.type=index
+#-------
+postmailSRS.name=sendMail
+postmailSRS.exe=sendMailTLSE.pl
+postmailSRS.args=-s '[EBI - db.name remote.release] End Post Process index srs' -m 'local.time'
+postmailSRS.desc=mail
+postmailSRS.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,7 @@
+
+###############
+db.fullname="UniProt Reference Clusters"
+db.name=uniref
+virtual.list=uniref50,uniref90,uniref100
+
+db.type=protein
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref100.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref100.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref100.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,90 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 100- UniRef100 contains all records in the UniProt Knowledgebase and selected UniParc records"
+db.name=uniref100
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/uniref/uniref100_tmp
+dir.version=ebi/uniref/uniref100
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+########################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref100/
+
+release.file=uniref100.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb_uniref100,postmail_uniref100
+#POST2=indexSRS,postmail_indexSRS
+
+
+formatdb_uniref100.name=formatdb
+formatdb_uniref100.exe=formatdbTLSE.pl
+formatdb_uniref100.args=--fasta 'uniref100.fasta.*' --bank 'uniref100'
+formatdb_uniref100.desc=Create index blast
+formatdb_uniref100.type=FlatFile2Index
+#----------------
+postmail_uniref100.name=sendMail
+postmail_uniref100.exe=sendMailTLSE.pl
+postmail_uniref100.args=-s '[EBI - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail_uniref100.desc=mail
+postmail_uniref100.type=info
+
+indexSRS.name=indexSRS
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d uniref100 --pvm --execute pbs -c 6
+indexSRS.desc=Index srs
+indexSRS.type=index
+#-----------
+postmail_indexSRS.name=sendMail
+postmail_indexSRS.exe=sendMailTLSE.pl
+postmail_indexSRS.args=-s '[EBI - db.name remote.release] End Post Process SRS' -m 'local.time'
+postmail_indexSRS.desc=mail
+postmail_indexSRS.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref50.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref50.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref50.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,88 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 50 - UniRef50 clusters are generated from the UniRef90 seed sequences with a 50% sequence identity threshold using the CD-HIT algorithm."
+db.name=uniref50
+db.type=protein
+
+#data.dir=
+offline.dir.name=biomaj/ebi/uniref/uniref50_tmp
+dir.version=ebi/uniref/uniref50
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref50/
+
+release.file=uniref50.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb_uniref50,postmail_uniref50
+#POST2=indexSRS,postmail_indexSRS
+
+formatdb_uniref50.name=formatdb
+formatdb_uniref50.exe=formatdbTLSE.pl
+formatdb_uniref50.args=--fasta 'uniref50.fasta.*' --bank 'uniref50'
+formatdb_uniref50.desc=Create index blast
+formatdb_uniref50.type=FlatFile2Index
+
+postmail_uniref50.name=sendMail
+postmail_uniref50.exe=sendMailTLSE.pl
+postmail_uniref50.args=-s '[EBI - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail_uniref50.desc=mail
+postmail_uniref50.type=info
+
+indexSRS.name=indexSRS
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d uniref50 --pvm --execute pbs -c 6
+indexSRS.desc=Index srs
+indexSRS.type=index
+#-----------
+postmail_indexSRS.name=sendMail
+postmail_indexSRS.exe=sendMailTLSE.pl
+postmail_indexSRS.args=-s '[EBI - db.name remote.release] End Post Process SRS' -m 'local.time'
+postmail_indexSRS.desc=mail
+postmail_indexSRS.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref90.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref90.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/uniref90.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,88 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="UniProt Reference Clusters 90 - UniRef90 clusters are generated from the UniRef100 seed sequences with a 90% sequence identity threshold using the CD-HIT algorithm."
+db.name=uniref90
+db.type=protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ebi/uniref/uniref90_tmp
+dir.version=ebi/uniref/uniref90
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=2
+
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/uniprot/uniref/uniref90/
+
+release.file=uniref90.release_note
+release.regexp=[\\d]+[\\.][\\d]+
+release.file.compressed=false
+
+remote.files=^uniref.*$ ^README$
+remote.excluded.files=.*\\.xml.*$ .*\\.dtd.*$
+
+no.extract=true
+
+local.files=^uniref.*$ ^README$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb_uniref90,postmail_uniref90
+#POST2=indexSRS,postmail_indexSRS
+
+formatdb_uniref90.name=formatdb
+formatdb_uniref90.exe=formatdbTLSE.pl
+formatdb_uniref90.args=--fasta 'uniref90.fasta.*' --bank 'uniref90'
+formatdb_uniref90.desc=Create index blast
+formatdb_uniref90.type=FlatFile2Index
+#----------------
+postmail_uniref90.name=sendMail
+postmail_uniref90.exe=sendMailTLSE.pl
+postmail_uniref90.args=-s '[EBI - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail_uniref90.desc=mail
+postmail_uniref90.type=info
+
+indexSRS.name=indexSRS
+indexSRS.exe=indexSrsTLSE.pl
+indexSRS.args=-v -d uniref90 --pvm --execute pbs -c 6
+indexSRS.desc=Index srs
+indexSRS.type=index
+#-----------
+postmail_indexSRS.name=sendMail
+postmail_indexSRS.exe=sendMailTLSE.pl
+postmail_indexSRS.args=-s '[EBI - db.name remote.release] End Post Process SRS' -m 'local.time'
+postmail_indexSRS.desc=mail
+postmail_indexSRS.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/vector.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/vector.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/vector.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,74 @@
+
+######################
+### Initialization ###
+######################
+db.fullname="vector sequence database"
+db.name=vector
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/vector_tmp
+dir.version=ncbi/blast/vector
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^vector.*\\.gz$
+remote.excluded.files=
+
+no.extract=true
+
+local.files=^vector.*
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=
+formatdb.desc=Index blast
+formatdb.type=index
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/wgs.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/wgs.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/wgs.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,84 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="Whole genome shotgun genome assemblies"
+db.name=wgs
+db.type=nucleic
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/wgs_tmp
+dir.version=ncbi/blast/wgs
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=3
+
+
+
+# NCBI (download fasta)
+#protocol=ftp
+#server=ftp.ncbi.nih.gov
+#remote.dir=/blast/db/FASTA
+
+# EBI (download index blast)
+protocol=ftp
+server=ftp.ebi.ac.uk
+remote.dir=/pub/databases/ncbi/blast/db/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+
+remote.files=^wgs.*\\.tar\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^wgs.*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=fastacmd,postmail
+
+fastacmd.name=fastacmd
+fastacmd.exe=fastacmdTLSE.pl
+fastacmd.args=--execute pbs
+fastacmd.desc=Create fasta file
+fastacmd.type=Index2FlatFile
+
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process fastacmd' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/yeast.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/yeast.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/db_properties/workflow_withprocess/yeast.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,76 @@
+
+######################
+### Initialization ###
+######################
+
+db.fullname="yeast.nt: yeast genomic sequence. yeast.aa: protein translations from yeast genome annotation"
+db.name=yeast
+db.type=nucleic_protein
+
+#data.dir=/bank/test
+offline.dir.name=biomaj/ncbi/blast/yeast_tmp
+dir.version=ncbi/blast/yeast
+
+frequency.update=0
+
+###################
+### Pre Process ###
+###################
+
+db.pre.process=PRE1
+
+PRE1=premail
+
+premail.name=sendMail
+premail.exe=sendMailTLSE.pl
+premail.args=-s '[NCBI Blast - db.name] Start Biomaj session' -m 'local.time'
+premail.desc=mail
+premail.type=info
+
+#######################
+### Synchronization ###
+#######################
+
+files.num.threads=1
+
+# NCBI (download fasta)
+protocol=ftp
+server=ftp.ncbi.nih.gov
+remote.dir=/blast/db/FASTA/
+
+release.file=
+release.regexp=
+release.file.compressed=
+
+remote.files=^yeast.*\\.gz$
+remote.excluded.files=
+
+#no.extract=true
+
+local.files=^yeast\\.(aa|nt).*$
+
+####################
+### Post Process ###
+#################### The files should be located in the projectfiles/process directory.
+
+db.post.process=POST1
+
+POST1=formatdb,postmail
+
+formatdb.name=formatdbTLSE
+formatdb.exe=formatdbTLSE.pl
+formatdb.args=--no_parse_seqid --fasta 'yeast.aa yeast.nt' --bank 'yeast.aa yeast.nt'
+formatdb.desc=Index blast
+formatdb.type=index
+#--------
+postmail.name=sendMail
+postmail.exe=sendMailTLSE.pl
+postmail.args=-s '[NCBI Blast - db.name remote.release] End Post Process formatdb' -m 'local.time'
+postmail.desc=mail
+postmail.type=info
+
+##################
+### Deployment ###
+##################
+
+keep.old.version=1
Added: trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/general.conf
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/general.conf (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/etc/biomaj/general.conf 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,68 @@
+# Created by BioMAJ 1.0-RC1
+# Date : 31/03/2008 11:39:50
+# File : General configuration
+
+[DIRECTORIES]
+
+#possibility to use an absolute path (begin by a char '/')
+#otherwise the directory is relativ to BIOMAJ_ROOT
+
+
+log.dir =/var/log/biomaj
+log-biomaj.dir =/var/log/biomaj/biomaj-runtime
+statefiles.dir =statefiles
+workflows.dir =/etc/biomaj/db_properties
+process.dir =/usr/share/biomaj/conf/process
+webreport.dir =rapport
+tmp.dir =tmp
+
+[APPLICATIONS]
+uncompress.bin=tar,tar2,tar3,gunzip,bunzip,unzip
+
+tar.bin=/bin/tar
+tar.case=.tar.gz,.tgz,.tar.Z
+tar.option.uncomp=-zxf
+tar.option.output=-C
+tar.option.test=-tzf
+
+gunzip.bin=/bin/gunzip
+gunzip.case=.gz,.Z
+gunzip.option.uncomp=-f
+gunzip.option.test=-t
+
+tar2.bin=/bin/tar
+tar2.case=.tar.bz2
+tar2.option.uncomp=-jxf
+tar2.option.output=-C
+tar2.option.test=-tjf
+
+bunzip.bin=/bin/bunzip2
+bunzip.case=.bz2
+bunzip.option.uncomp=-f
+bunzip.option.output=-c
+bunzip.option.test=-t
+
+tar3.bin=/bin/tar
+tar3.case=.tar
+tar3.option.uncomp=-xf
+tar3.option.output=-C
+tar3.option.test=-tf
+
+unzip.bin=/usr/bin/unzip
+unzip.case=.zip
+unzip.option.uncomp=-q
+unzip.option.output=-d
+unzip.option.test=-t
+
+wget.bin=/usr/bin/wget
+rsync.bin=/usr/bin/rsync
+
+[ENGINE]
+
+#Generation of general log in the directory ${log-biomaj.dir}
+debug=false
+
+#Generation of bank log in the directory ${log.dir}
+bank.log=true
+
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/biomaj
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/biomaj (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/biomaj 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+bash /usr/share/biomaj/bin/biomaj.sh $@
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/bin/biomaj
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/INSTALL
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/INSTALL (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/INSTALL 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,202 @@
+Project : BioMAJ
+Web site : http://biomaj.genouest.org/
+
+
+ I) PREREQUISITE
+ II) INSTALLATION
+ III)CONFIGURATIONS
+ IV) EXAMPLES
+ V) DEBUGGING
+
+#############################################
+I) PREREQUISITE :
+#############################################
+
+A) Biomaj Workflow
+ -------------
+
+ Wget 1.6 or higher ( http://www.gnu.org/software/wget/wget.html)
+
+ GNU Tar 1.13 or higher ( http://www.gnu.org/software/tar/tar.html)
+
+ Gzip 1.3.3 or higher (http://www.gzip.org/)
+
+ Bzip2 0.9.0 or higher (http://sources.redhat.com/bzip2/)
+
+ Tar, Gzip, and Bzip2 are only needed if you need to extract files that use those compression formats.
+
+ The following list needs more attention :
+
+ Java 1.6.x or higher ( http://java.sun.com/j2se/)
+ Ant 1.7.0 or higher ( http://ant.apache.org/)
+
+B) POST PROCESSUS
+ --------------
+
+ The post-processes are available in the conf/process directory
+ of this package. Please note, that some packages may require some third-parity tools :
+
+ - perl 5.8.x
+ - ncbi blast ftp.ncbi.nih.gov:/blast/executables/LATEST ==> formatdb & fastcmd programs
+ - srs ==>
+ - readseq ==> http://iubio.bio.indiana.edu/soft/molbio/readseq/
+
+WARNING : For more informations refer to the manual located in ./docs/process
+-----------
+
+#############################################
+II) INSTALLATION :
+#############################################
+
+1) Initializing Environments Variable :
+
+ In order for Biomaj to run properly, the following environment variables needs to be set:
+ ANT_HOME & JAVA_HOME
+ The ant&java binaries needs to be accessible in the PATH :
+
+ in a BASH/KASH/SH Shell environment:
+ ------------------------------------
+ Modify the .bashrc file, located in your HOME directory (or under biomajs' home directory)
+ so that it looks like this:
+
+
+ export ANT_HOME=/usr/local/ant/apache-ant-1.7.0
+ export JAVA_HOME=/usr/local/java
+ export PATH=$PATH:$ANT_HOME/bin
+ export PATH=$PATH:$JAVA_HOME/bin
+
+
+ in a csh/tcsh Shell environment:
+ --------------------------------
+ modify your ~/.cshrc or your ~/.tcshrc so that it looks like this:
+
+ setenv ANT_HOME /usr/local/ant/apache-ant-1.7.0
+ setenv JAVA_HOME /usr/local/java
+ setenv PATH ${PATH}:$ANT_HOME/bin
+ setenv PATH ${PATH}:$JAVA_HOME/bin
+
+
+2) Unzipping the Archive :
+
+ If you are reading this file, that means you have already executed the following commands
+
+ tar xvfpz biomaj-${version}.tar.gz
+ or
+ gunzip < biomaj-${version}.tar.gz | tar xvfp -
+
+3) Compiling the application
+
+ cd biomaj-${version}
+
+ ant
+
+3) Initializing the environment variable BIOMAJ_ROOT
+
+ - in bash, sh, ksh :
+
+ export BIOMAJ_ROOT=<root directory of Biomaj>
+
+ - en csh ou tcsh :
+
+ setenv BIOMAJ_ROOT <root directory of Biomaj>
+
+#############################################
+III) CONFIGURATION :
+#############################################
+
+a) Global variables for Biomaj :
+
+ The Biomaj Workflow uses the following script $BIOMAJ_ROOT/bin/env.sh to initialize the environment variables nedded for the execution of the post-process (indexation, mail,etc...)
+
+ Example : initializing the srs or blast env
+#!/bin/sh
+
+export BLASTDB=/bank/blastdb # ==> initialising the BLASTDB variable
+. /data/srs/srs/etc/prep_srs.sh # => initialising the srs envirenment
+
+
+
+b) GLOBAL Properties
+
+ The global properties file : $BIOMAJ_ROOT/conf/db_properties/global.properties
+ contains the default values of many internal Biomaj variables.
+ Most of them, are already pre-defined by default.
+
+WARNING WARNING :
+---------------------
+ Before launching Biomaj ( script $BIOMAJ_ROOT/bin/biomaj.sh )
+ you have to initialize the root directory of your local bank repository.
+ ==> modify the $BIOMAJ_ROOT/conf/db_properties/global.properties file.
+
+ --------------------------------
+#WARNING initialize the data.dir variable
+ --------------------------------
+
+ * data.dir=
+
+#############################################
+IV) DEMOS/EXAMPLES :
+#############################################
+
+Two examples of banks are being provided as demos :
+
+ It is the alu and the ncbi sts banks.
+
+For each of the above banks, two workflow scenarios can be used
+ a) without post-process
+ b) with post-process ( Blast indexation for the alu bank, and fasta conversion for sts)
+
+ A Biomaj workflow scenario is specified in conf/db_properties/
+
+! WARNING:
+------------
+ The use of a demo scenario with post-processes requires to have the NCBI BLAST package installed on your local machine.
+ It is available @ the following address:
+ ftp://ftp.ncbi.nih.gov/blast/executables/LATEST
+
+ you also have to update the executables locations specified in the following file:
+ $BIOMAJ_ROOT/conf/process/unix_command_system.cfg
+
+ FASTACMD=/MY/DIR/fastacmd
+ FORMATDB=/MY/DIR/formatdb
+
+For more informations on the configuration and the functioning of the post-processes, refer to the documentation available @ $BIOMAJ_ROOT/doc/process
+
+A list of available parameters used in the banks properties file, is also available
+in the following documents :
+
+ $BIOMAJ_ROOT/doc/var-properties.pdf
+
+
+LAUNCHING THE DEMOS :
+----------------------
+
+ a) NCBI alu bank (with formatdb process) :
+
+ Configuration file : $BIOMAJ_ROOT/conf/db_properties/alu.properties
+
+ If you don't want to launch the blast indexation (formatdb), you have to comment in the configuration file
+ the following line (add the "#" sign at the beginning of the line) :
+ db.post.process=POST1
+
+ Launch the command : $BIOMAJ_ROOT/bin/biomaj.sh --update alu --console
+
+
+ b) NCBI sts bank : Database for sequence tag site entries (avec process fastacmd)
+
+ Configuration File : $BIOMAJ_ROOT/conf/db_properties/sts.properties
+
+ If you don't want to execute the BLAST indexation process (formatdb), you have to comment the following line (adding a '#' at the beginning of the line)
+ in the configuration file:
+ db.post.process=POST1
+
+ Launch the command : $BIOMAJ_ROOT/bin/biomaj.sh --update sts --console
+
+
+#############################################
+V) DEBUGGING
+#############################################
+
+ Using the option --console requires to set the env variable DISPLAY
+ because the application opens a GUI console.
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-citrina-en
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-citrina-en (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-citrina-en 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,27 @@
+Copyright (c) 2004, Indiana University
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Indiana University, Bloomington nor the names
+ of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-en
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-en (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-en 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,505 @@
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+
+ Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+ * firstly, compliance with the principles governing the distribution
+ of Free Software: access to source code, broad rights granted to
+ users,
+ * secondly, the election of a governing law, French law, with which
+ it is conformant, both as regards the law of torts and
+ intellectual property law, and the protection that it offers to
+ both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+ Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+ Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+ Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software.
+
+
+ Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+ * (i) loading the Software by any or all means, notably, by
+ downloading from a remote server, or by loading from a physical
+ medium;
+ * (ii) the first time the Licensee exercises any of the rights
+ granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+ Article 4 - EFFECTIVE DATE AND TERM
+
+
+ 4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+ 4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+ Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+ 5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+ 1. permanent or temporary reproduction of all or part of the Software
+ by any or all means and in any or all form.
+
+ 2. loading, displaying, running, or storing the Software on any or
+ all medium.
+
+ 3. entitlement to observe, study or test its operation so as to
+ determine the ideas and principles behind any or all constituent
+ elements of said Software. This shall apply when the Licensee
+ carries out any or all loading, displaying, running, transmission
+ or storage operation as regards the Software, that it is entitled
+ to carry out hereunder.
+
+
+ 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+ 5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+ 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+ 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+ 5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+ 5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+ Article 6 - INTELLECTUAL PROPERTY
+
+
+ 6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+ 6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+ 6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+ 6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+ 1. not to remove, or modify, in any manner, the intellectual property
+ notices attached to the Software;
+
+ 2. to reproduce said notices, in an identical manner, in the copies
+ of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-Ã -vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+ Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+ Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+ Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+ Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+ Article 11 - MISCELLANEOUS
+
+
+ 11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+ 11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+ Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+ Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-fr
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-fr (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/License-fr 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,511 @@
+CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL
+
+
+ Avertissement
+
+Ce contrat est une licence de logiciel libre issue d'une concertation
+entre ses auteurs afin que le respect de deux grands principes préside Ã
+sa rédaction:
+
+ * d'une part, le respect des principes de diffusion des logiciels
+ libres: accès au code source, droits étendus conférés aux
+ utilisateurs,
+ * d'autre part, la désignation d'un droit applicable, le droit
+ français, auquel elle est conforme, tant au regard du droit de la
+ responsabilité civile que du droit de la propriété intellectuelle
+ et de la protection qu'il offre aux auteurs et titulaires des
+ droits patrimoniaux sur un logiciel.
+
+Les auteurs de la licence CeCILL (pour Ce[a] C[nrs] I[nria] L[ogiciel]
+L[ibre]) sont:
+
+Commissariat à l'Energie Atomique - CEA, établissement public de
+recherche à caractère scientifique, technique et industriel, dont le
+siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
+
+Centre National de la Recherche Scientifique - CNRS, établissement
+public à caractère scientifique et technologique, dont le siège est
+situé 3 rue Michel-Ange, 75794 Paris cedex 16.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, établissement public à caractère scientifique et technologique,
+dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
+Le Chesnay cedex.
+
+
+ Préambule
+
+Ce contrat est une licence de logiciel libre dont l'objectif est de
+conférer aux utilisateurs la liberté de modification et de
+redistribution du logiciel régi par cette licence dans le cadre d'un
+modèle de diffusion en logiciel libre.
+
+L'exercice de ces libertés est assorti de certains devoirs à la charge
+des utilisateurs afin de préserver ce statut au cours des
+redistributions ultérieures.
+
+L'accessibilité au code source et les droits de copie, de modification
+et de redistribution qui en découlent ont pour contrepartie de n'offrir
+aux utilisateurs qu'une garantie limitée et de ne faire peser sur
+l'auteur du logiciel, le titulaire des droits patrimoniaux et les
+concédants successifs qu'une responsabilité restreinte.
+
+A cet égard l'attention de l'utilisateur est attirée sur les risques
+associés au chargement, à l'utilisation, à la modification et/ou au
+développement et à la reproduction du logiciel par l'utilisateur étant
+donné sa spécificité de logiciel libre, qui peut le rendre complexe Ã
+manipuler et qui le réserve donc à des développeurs ou des
+professionnels avertis possédant des connaissances informatiques
+approfondies. Les utilisateurs sont donc invités à charger et tester
+l'adéquation du logiciel à leurs besoins dans des conditions permettant
+d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
+généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
+sécurité. Ce contrat peut être reproduit et diffusé librement, sous
+réserve de le conserver en l'état, sans ajout ni suppression de clauses.
+
+Ce contrat est susceptible de s'appliquer à tout logiciel dont le
+titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
+dispositions qu'il contient.
+
+
+ Article 1 - DEFINITIONS
+
+Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
+lettre capitale, auront la signification suivante:
+
+Contrat: désigne le présent contrat de licence, ses éventuelles versions
+postérieures et annexes.
+
+Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
+Source et le cas échéant sa documentation, dans leur état au moment de
+l'acceptation du Contrat par le Licencié.
+
+Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
+éventuellement de Code Objet et le cas échéant sa documentation, dans
+leur état au moment de leur première diffusion sous les termes du Contrat.
+
+Logiciel Modifié: désigne le Logiciel modifié par au moins une
+Contribution.
+
+Code Source: désigne l'ensemble des instructions et des lignes de
+programme du Logiciel et auquel l'accès est nécessaire en vue de
+modifier le Logiciel.
+
+Code Objet: désigne les fichiers binaires issus de la compilation du
+Code Source.
+
+Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
+sur le Logiciel Initial.
+
+Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
+Contrat.
+
+Contributeur: désigne le Licencié auteur d'au moins une Contribution.
+
+Concédant: désigne le Titulaire ou toute personne physique ou morale
+distribuant le Logiciel sous le Contrat.
+
+Contribution: désigne l'ensemble des modifications, corrections,
+traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
+le Logiciel par tout Contributeur, ainsi que tout Module Interne.
+
+Module: désigne un ensemble de fichiers sources y compris leur
+documentation qui permet de réaliser des fonctionnalités ou services
+supplémentaires à ceux fournis par le Logiciel.
+
+Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
+Module et le Logiciel s'exécutent dans des espaces d'adressage
+différents, l'un appelant l'autre au moment de leur exécution.
+
+Module Interne: désigne tout Module lié au Logiciel de telle sorte
+qu'ils s'exécutent dans le même espace d'adressage.
+
+GNU GPL: désigne la GNU General Public License dans sa version 2 ou
+toute version ultérieure, telle que publiée par Free Software Foundation
+Inc.
+
+Parties: désigne collectivement le Licencié et le Concédant.
+
+Ces termes s'entendent au singulier comme au pluriel.
+
+
+ Article 2 - OBJET
+
+Le Contrat a pour objet la concession par le Concédant au Licencié d'une
+licence non exclusive, cessible et mondiale du Logiciel telle que
+définie ci-après à l'article 5 pour toute la durée de protection des droits
+portant sur ce Logiciel.
+
+
+ Article 3 - ACCEPTATION
+
+3.1 L'acceptation par le Licencié des termes du Contrat est réputée
+acquise du fait du premier des faits suivants:
+
+ * (i) le chargement du Logiciel par tout moyen notamment par
+ téléchargement à partir d'un serveur distant ou par chargement Ã
+ partir d'un support physique;
+ * (ii) le premier exercice par le Licencié de l'un quelconque des
+ droits concédés par le Contrat.
+
+3.2 Un exemplaire du Contrat, contenant notamment un avertissement
+relatif aux spécificités du Logiciel, à la restriction de garantie et Ã
+la limitation à un usage par des utilisateurs expérimentés a été mis Ã
+disposition du Licencié préalablement à son acceptation telle que
+définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
+connaissance.
+
+
+ Article 4 - ENTREE EN VIGUEUR ET DUREE
+
+
+ 4.1 ENTREE EN VIGUEUR
+
+Le Contrat entre en vigueur à la date de son acceptation par le Licencié
+telle que définie en 3.1.
+
+
+ 4.2 DUREE
+
+Le Contrat produira ses effets pendant toute la durée légale de
+protection des droits patrimoniaux portant sur le Logiciel.
+
+
+ Article 5 - ETENDUE DES DROITS CONCEDES
+
+Le Concédant concède au Licencié, qui accepte, les droits suivants sur
+le Logiciel pour toutes destinations et pour la durée du Contrat dans
+les conditions ci-après détaillées.
+
+Par ailleurs, si le Concédant détient ou venait à détenir un ou
+plusieurs brevets d'invention protégeant tout ou partie des
+fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
+opposer les éventuels droits conférés par ces brevets aux Licenciés
+successifs qui utiliseraient, exploiteraient ou modifieraient le
+Logiciel. En cas de cession de ces brevets, le Concédant s'engage Ã
+faire reprendre les obligations du présent alinéa aux cessionnaires.
+
+
+ 5.1 DROIT D'UTILISATION
+
+Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
+aux domaines d'application, étant ci-après précisé que cela comporte:
+
+ 1. la reproduction permanente ou provisoire du Logiciel en tout ou
+ partie par tout moyen et sous toute forme.
+
+ 2. le chargement, l'affichage, l'exécution, ou le stockage du
+ Logiciel sur tout support.
+
+ 3. la possibilité d'en observer, d'en étudier, ou d'en tester le
+ fonctionnement afin de déterminer les idées et principes qui sont
+ à la base de n'importe quel élément de ce Logiciel; et ceci,
+ lorsque le Licencié effectue toute opération de chargement,
+ d'affichage, d'exécution, de transmission ou de stockage du
+ Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
+
+
+ 5.2 DROIT D'APPORTER DES CONTRIBUTIONS
+
+Le droit d'apporter des Contributions comporte le droit de traduire,
+d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
+et le droit de reproduire le logiciel en résultant.
+
+Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
+réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
+cette Contribution et la date de création de celle-ci.
+
+
+ 5.3 DROIT DE DISTRIBUTION
+
+Le droit de distribution comporte notamment le droit de diffuser, de
+transmettre et de communiquer le Logiciel au public sur tout support et
+par tout moyen ainsi que le droit de mettre sur le marché à titre
+onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
+
+Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
+non, à des tiers dans les conditions ci-après détaillées.
+
+
+ 5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
+
+Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
+sous forme de Code Source ou de Code Objet, Ã condition que cette
+distribution respecte les dispositions du Contrat dans leur totalité et
+soit accompagnée:
+
+ 1. d'un exemplaire du Contrat,
+
+ 2. d'un avertissement relatif à la restriction de garantie et de
+ responsabilité du Concédant telle que prévue aux articles 8
+ et 9,
+
+et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
+le Licencié permette aux futurs Licenciés d'accéder facilement au Code
+Source complet du Logiciel en indiquant les modalités d'accès, étant
+entendu que le coût additionnel d'acquisition du Code Source ne devra
+pas excéder le simple coût de transfert des données.
+
+
+ 5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
+
+Lorsque le Licencié apporte une Contribution au Logiciel, les conditions
+de distribution du Logiciel Modifié en résultant sont alors soumises Ã
+l'intégralité des dispositions du Contrat.
+
+Le Licencié est autorisé à distribuer le Logiciel Modifié, sous forme de
+code source ou de code objet, Ã condition que cette distribution
+respecte les dispositions du Contrat dans leur totalité et soit
+accompagnée:
+
+ 1. d'un exemplaire du Contrat,
+
+ 2. d'un avertissement relatif à la restriction de garantie et de
+ responsabilité du Concédant telle que prévue aux articles 8
+ et 9,
+
+et que, dans le cas où seul le code objet du Logiciel Modifié est
+redistribué, le Licencié permette aux futurs Licenciés d'accéder
+facilement au code source complet du Logiciel Modifié en indiquant les
+modalités d'accès, étant entendu que le coût additionnel d'acquisition
+du code source ne devra pas excéder le simple coût de transfert des données.
+
+
+ 5.3.3 DISTRIBUTION DES MODULES EXTERNES
+
+Lorsque le Licencié a développé un Module Externe les conditions du
+Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
+sous un contrat de licence différent.
+
+
+ 5.3.4 COMPATIBILITE AVEC LA LICENCE GNU GPL
+
+Le Licencié peut inclure un code soumis aux dispositions d'une des
+versions de la licence GNU GPL dans le Logiciel modifié ou non et
+distribuer l'ensemble sous les conditions de la même version de la
+licence GNU GPL.
+
+Le Licencié peut inclure le Logiciel modifié ou non dans un code soumis
+aux dispositions d'une des versions de la licence GNU GPL et distribuer
+l'ensemble sous les conditions de la même version de la licence GNU GPL.
+
+
+ Article 6 - PROPRIETE INTELLECTUELLE
+
+
+ 6.1 SUR LE LOGICIEL INITIAL
+
+Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
+Initial. Toute utilisation du Logiciel Initial est soumise au respect
+des conditions dans lesquelles le Titulaire a choisi de diffuser son
+oeuvre et nul autre n'a la faculté de modifier les conditions de
+diffusion de ce Logiciel Initial.
+
+Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
+par le Contrat et ce, pour la durée visée à l'article 4.2.
+
+
+ 6.2 SUR LES CONTRIBUTIONS
+
+Le Licencié qui a développé une Contribution est titulaire sur celle-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable.
+
+
+ 6.3 SUR LES MODULES EXTERNES
+
+Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable et reste libre du choix du contrat régissant
+sa diffusion.
+
+
+ 6.4 DISPOSITIONS COMMUNES
+
+Le Licencié s'engage expressément:
+
+ 1. à ne pas supprimer ou modifier de quelque manière que ce soit les
+ mentions de propriété intellectuelle apposées sur le Logiciel;
+
+ 2. à reproduire à l'identique lesdites mentions de propriété
+ intellectuelle sur les copies du Logiciel modifié ou non.
+
+Le Licencié s'engage à ne pas porter atteinte, directement ou
+indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs sur le Logiciel et à prendre, le cas échéant, Ã
+l'égard de son personnel toutes les mesures nécessaires pour assurer le
+respect des dits droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs.
+
+
+ Article 7 - SERVICES ASSOCIES
+
+7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
+prestations d'assistance technique ou de maintenance du Logiciel.
+
+Cependant le Concédant reste libre de proposer ce type de services. Les
+termes et conditions d'une telle assistance technique et/ou d'une telle
+maintenance seront alors déterminés dans un acte séparé. Ces actes de
+maintenance et/ou assistance technique n'engageront que la seule
+responsabilité du Concédant qui les propose.
+
+7.2 De même, tout Concédant est libre de proposer, sous sa seule
+responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
+lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
+dans les conditions qu'il souhaite. Cette garantie et les modalités
+financières de son application feront l'objet d'un acte séparé entre le
+Concédant et le Licencié.
+
+
+ Article 8 - RESPONSABILITE
+
+8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la
+faculté, sous réserve de prouver la faute du Concédant concerné, de
+solliciter la réparation du préjudice direct qu'il subirait du fait du
+Logiciel et dont il apportera la preuve.
+
+8.2 La responsabilité du Concédant est limitée aux engagements pris en
+application du Contrat et ne saurait être engagée en raison notamment:
+(i) des dommages dus à l'inexécution, totale ou partielle, de ses
+obligations par le Licencié, (ii) des dommages directs ou indirects
+découlant de l'utilisation ou des performances du Logiciel subis par le
+Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
+particulier, les Parties conviennent expressément que tout préjudice
+financier ou commercial (par exemple perte de données, perte de
+bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
+manque à gagner, trouble commercial quelconque) ou toute action dirigée
+contre le Licencié par un tiers, constitue un dommage indirect et
+n'ouvre pas droit à réparation par le Concédant.
+
+
+ Article 9 - GARANTIE
+
+9.1 Le Licencié reconnaît que l'état actuel des connaissances
+scientifiques et techniques au moment de la mise en circulation du
+Logiciel ne permet pas d'en tester et d'en vérifier toutes les
+utilisations ni de détecter l'existence d'éventuels défauts. L'attention
+du Licencié a été attirée sur ce point sur les risques associés au
+chargement, à l'utilisation, la modification et/ou au développement et Ã
+la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
+
+Il relève de la responsabilité du Licencié de contrôler, par tous
+moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
+de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
+
+9.2 Le Concédant déclare de bonne foi être en droit de concéder
+l'ensemble des droits attachés au Logiciel (comprenant notamment les
+droits visés à l'article 5).
+
+9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
+Concédant sans autre garantie, expresse ou tacite, que celle prévue Ã
+l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale,
+son caractère sécurisé, innovant ou pertinent.
+
+En particulier, le Concédant ne garantit pas que le Logiciel est exempt
+d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
+avec l'équipement du Licencié et sa configuration logicielle ni qu'il
+remplira les besoins du Licencié.
+
+9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
+Logiciel ne porte pas atteinte à un quelconque droit de propriété
+intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
+autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
+profit du Licencié contre les actions en contrefaçon qui pourraient être
+diligentées au titre de l'utilisation, de la modification, et de la
+redistribution du Logiciel. Néanmoins, si de telles actions sont
+exercées contre le Licencié, le Concédant lui apportera son aide
+technique et juridique pour sa défense. Cette aide technique et
+juridique est déterminée au cas par cas entre le Concédant concerné et
+le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
+toute responsabilité quant à l'utilisation de la dénomination du
+Logiciel par le Licencié. Aucune garantie n'est apportée quant Ã
+l'existence de droits antérieurs sur le nom du Logiciel et sur
+l'existence d'une marque.
+
+
+ Article 10 - RESILIATION
+
+10.1 En cas de manquement par le Licencié aux obligations mises à sa
+charge par le Contrat, le Concédant pourra résilier de plein droit le
+Contrat trente (30) jours après notification adressée au Licencié et
+restée sans effet.
+
+10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé Ã
+utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
+licences qu'il aura concédées antérieurement à la résiliation du Contrat
+resteront valides sous réserve qu'elles aient été effectuées en
+conformité avec le Contrat.
+
+
+ Article 11 - DISPOSITIONS DIVERSES
+
+
+ 11.1 CAUSE EXTERIEURE
+
+Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
+d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
+fortuit ou une cause extérieure, telle que, notamment, le mauvais
+fonctionnement ou les interruptions du réseau électrique ou de
+télécommunication, la paralysie du réseau liée à une attaque
+informatique, l'intervention des autorités gouvernementales, les
+catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
+le feu, les explosions, les grèves et les conflits sociaux, l'état de
+guerre...
+
+11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
+plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
+Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
+intéressée à s'en prévaloir ultérieurement.
+
+11.3 Le Contrat annule et remplace toute convention antérieure, écrite
+ou orale, entre les Parties sur le même objet et constitue l'accord
+entier entre les Parties sur cet objet. Aucune addition ou modification
+aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
+d'être faite par écrit et signée par leurs représentants dûment habilités.
+
+11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
+s'avèrerait contraire à une loi ou à un texte applicable, existants ou
+futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
+amendements nécessaires pour se conformer à cette loi ou à ce texte.
+Toutes les autres dispositions resteront en vigueur. De même, la
+nullité, pour quelque raison que ce soit, d'une des dispositions du
+Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
+
+
+ 11.5 LANGUE
+
+Le Contrat est rédigé en langue française et en langue anglaise, ces
+deux versions faisant également foi.
+
+
+ Article 12 - NOUVELLES VERSIONS DU CONTRAT
+
+12.1 Toute personne est autorisée à copier et distribuer des copies de
+ce Contrat.
+
+12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
+et ne peut être modifié que par les auteurs de la licence, lesquels se
+réservent le droit de publier périodiquement des mises à jour ou de
+nouvelles versions du Contrat, qui posséderont chacune un numéro
+distinct. Ces versions ultérieures seront susceptibles de prendre en
+compte de nouvelles problématiques rencontrées par les logiciels libres.
+
+12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
+faire l'objet d'une diffusion ultérieure que sous la même version du
+Contrat ou une version postérieure, sous réserve des dispositions de
+l'article 5.3.4.
+
+
+ Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
+
+13.1 Le Contrat est régi par la loi française. Les Parties conviennent
+de tenter de régler à l'amiable les différends ou litiges qui
+viendraient à se produire par suite ou à l'occasion du Contrat.
+
+13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
+de leur survenance et sauf situation relevant d'une procédure d'urgence,
+les différends ou litiges seront portés par la Partie la plus diligente
+devant les Tribunaux compétents de Paris.
+
+
+Version 2.0 du 2006-09-05.
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/MANIFEST
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/MANIFEST (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/MANIFEST 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,21 @@
+Result of the ls -F command in $BIOMAJ_ROOT :
+---------------------------------------------
+bin/
+build.xml
+conf/
+doc/
+general.conf
+INSTALL
+lib/
+License-citrina-en
+License-en
+License-fr
+MANIFEST
+misc/
+README
+RELEASE
+src/
+TEST
+TODO
+workflows/
+xslt/
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/README
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/README (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/README 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,172 @@
+
+Project : BioMAJ
+Web site : http://biomaj.genouest.org/
+
+
+ - INTRODUCTION
+ - CONFIGURATION
+ - FIRST RUN OF BIOMAJ
+ - SOME COMMANDES
+ - COMPLETE DOCUMENTATION
+
+###################
+# INTRODUCTION
+###################
+
+In bio-computing, analyses are almost systematically reliant on databanks. Any bio-computing site therefore needs to manage these invaluable databanks
+that hold a huge amount of information, usually several terabytes, spread over various international sites and in a consistent format (there are still
+several different standards currently).The type and number of these databanks are constantly changing and the frequency with which they are updated varies greatly.
+In most cases, before they can be used, they need to be reformatted several times, a process that can be very costly in terms of calculation time
+(several days for SRS indexes, for example). Monitoring of updates and format conversion results usually produce trace files (logging) that need
+to be analysed in the event of any errors (by reading a daily report e-mail and analysis of the trace files if required).
+Management of this data is cumbersome and fiddly. Data managers and users can often lose their way.
+
+BioMAJ provides:
+---------------
+* A reliable workflow motor that can download remote data automatically and intelligently (error correction, synchronisation of local and remote data),
+apply formatting to this data and put it into production (make the data available for all users and/or applications).
+
+* A group of predefined workflows for the main biological banks
+
+* An indexing scripts library (formatting for biological data) to be applied to workflows defined by the administrator or on the predefined workflows.
+
+Applications main functional features:
+--------------------------------------
+* Management of updating cycles for a data source ;
+
+* Logging of workflows;
+
+* Monitoring of the integrity of transferred data;
+
+* Standardisation of data organisation (standard directory structure);
+
+* Management of classification of data sources (depending on type, origin, application index, etc.) ;
+
+* Management of the local data warehouse, consultation of available versions and management of source versions (addition, deletion of version and source);
+
+* Administration of each databank with a set of commands ;
+
+* Error correction, i.e. restarting an unfinished cycle;
+
+* Rebuilding of a given release ;
+
+* Description of a relatively complex post-processing workflow;
+
+* Supervision of the application via e-mail alerts, positioned at key points in the workflow of each source. During use of crontab, this helps alert the administrator as to the correct or incorrect functioning of sessions ;
+Monitoring of the data warehouse, generation of statistics on make-up of the data warehouse.
+
+* Monitoring of source development over time. Creation of web summary reports containing an overview of warehouse data and a development history source by source.
+
+BioMAJ is an application designed to help maintain a data warehouse and is intended to assist the data administrator. BioMAJ can manage a great mass of similar data and
+locally consolidate all distributed sources available on the network via protocols such as ftp, http and rsync, and then automate more or less complex processing chains on this data.
+The application automates the updating cycle and facilitates supervision of the catalogue of managed databanks while providing a history of maintenance operations.
+The application helps maintain the main biological databanks provided by the international scientific community on a local platform.
+BioMAJ?s field of application is nonetheless wider than this and could be extended to any area which manages massive distributed data.
+
+
+Workflows
+---------
+
+To work, the application needs a configuration file containing a description of the workflow associated with each data source. This file is the properties file of the bank.
+ Construction of a properties file is not difficult, however, it is a laborious task that requires good knowledge of the data source and the BioMAJ application.
+As validation of the properties file is not immediate, we are providing sample configuration files for several common banks. These can be found in the following directories:
+
+$BIOMAJ_ROOT/conf/db_properties/workflow_withprocess
+ and
+BIOMAJ_ROOT/ conf/db_properties/workflow_withoutprocess.
+
+ We suggest that you mutualise the properties files. If you develop them for specific banks and you want to share them, you can post them to the list: BioMAJ-users at lists.gforge.inria.fr
+After validation, these files will be included in future versions of the software.
+ In terms of validation, to be validated, a post-process or properties file must be successfully tested on at least two sites using BioMAJ. Minimal documentation should also be provided. This must include a script synopsis and a description of the installation procedure: pre-requisites, environment variables, configuration of applications using data from the script.
+
+
+################
+# CONFIGURATION
+################
+
+read INSTALL file
+
+
+#######################
+# FIRST RUN OF BIOMAJ
+#######################
+
+Two sample banks are provided for demonstration purposes. These are the alu and sts banks of the ncbi.
+
+
+For each one, two workflow scenarios can be used:
+without post-process
+with post-process (blast indexing for alu and fasta conversion for sts)
+
+If you want to use the demonstration workflows, take care to place these properties files in the directory $BIOMAJ_ROOT/conf/db_properties/
+
+Use of a demonstration scenario with post-processing means you need to have available the executables contained in the blast package of the ncbi.
+This is available at: ftp://ftp.ncbi.nih.gov/blast/executables/LATEST.
+
+Before use, you must also update the paths for the executables called in the file: $BIOMAJ_ROOT/conf/process/unix_command_system.cfg
+
+FASTACMD=/MY/CHEMIN/fastacmd
+FORMATDB=/MY/CHEMIN/formatdb
+
+For more information on configuration and running of available post-processes, see the directory: $BIOMAJ_ROOT/doc/process
+
+NB: The list of parameters that can be used in the properties files of your banks is available in the appendix to this document.
+
+Demonstrations
+---------------
+
+*** Alu bank of the NCBI (with formatdb process):
+
+Configuration file: $BIOMAJ_ROOT/conf/db_properties/alu.properties
+
+To not run blast indexing (formatdb), the following comment line should appear in the configuration file (use a # at the beginning of the line):
+ db.post.process=POST1
+
+Run command: $BIOMAJ_ROOT/bin/biomaj.sh --update alu --console
+
+
+*** STS bank of the NCBI (with fastacmd process)
+Configuration file: $BIOMAJ_ROOT/conf/db_properties/sts.properties
+
+To not run blast indexing (formatdb), the following comment line should appear in the configuration file (use a # at the beginning of the line):
+ db.post.process=POST1
+
+Run command: $BIOMAJ_ROOT/bin/biomaj.sh --update sts ?console
+
+###################
+# SOME COMMANDS
+###################
+
+a) HELP :
+
+ $BIOMAJ_ROOT/bin/biomaj.sh --help
+
+b) Update with console of the alu bank :
+
+ $BIOMAJ_ROOT/bin/biomaj.sh --update alu --console
+
+c) Update of alu with a new update cycle
+
+ $BIOMAJ_ROOT/bin/biomaj.sh --new --update alu --console
+
+d) Status of the data repository
+
+ $BIOMAJ_ROOT/bin/biomaj.sh --status
+
+e) Status of a bank :
+
+ $BIOMAJ_ROOT/bin/biomaj.sh --status <bank>
+
+f) Generate html report
+
+ $BIOMAJ_ROOT/bin/Make_Biomaj_report.sh
+
+########################
+# COMPLETE DOCUMENTATION
+#######################
+
+http://biomaj.genouest.org/download/UsersGuide_BioMAJ_EN.pdf
+
+
+
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/RELEASE
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/RELEASE (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/RELEASE 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,212 @@
+##############################################################################################################
+release 1.0
+fix bugs:
+#5368 message error with a statefiles directory bad formuled
+################################################################################################################
+release 1.0-RC1
+
+#4239
+ - option view-logger add in the main option:
+ - dynamic view for log bank :
+ - Main activity report
+ - Processing activity report
+ - Complete remote files list (match with remote.files property)
+ - Downloadable remote files list
+ - Production files already downloaded
+ - Non production files already downloaded
+ - Extractable files list
+ - Release information
+ - Wget output
+
+ - possibility to select the information level (depends of historic.logfile.level property)
+
+- add localisation of rsync binary with property rsync.bin in general.conf
+- extraction file cant be set in the file general.conf :
+
+#List of binary
+uncompress.bin=tar,tar2,tar3,gunzip,bunzip,unzip
+
+#sample with tar
+#----------------
+#binary
+tar.bin=/bin/tar
+#case of extension
+tar.case=.tar.gz,.tgz,.tar.Z
+#uncompress option
+tar.option.uncomp=-zxf
+#directory output (if the property is not define, the ouput directory is not specified in command line)
+tar.option.output=-C
+#test option (if the property is not specified, the archive/compress file is not tested)
+tar.option.test=-tf
+
+
+- add property "ftp.active.mode" to active or desactive passiv ftp mode.
+bug fix :
+#4232 args property for process can start with '${'
+#5336 Archive tar
+#5174 'keep.old.version' did not work
+- Authentification http
+#5262 bug with an execution with 2 call on the same block
+#5263 metaprocess name and block process name can't be to have the same name
+#5058 Get a release from a file which contains the information :
+example for embl : release.regexp=Release_(\\d+)
+
+################################################################################################################
+release 0.9.3.1
+
+- fix bug with --index option
+- fix bug date 29/02
+
+################################################################################################################
+release 0.9.3.0
+
+ADMINISTRATION
+--------------------------------------------
+-Ajout de l'option --change-dbname <dbname> <newdbname>
+Change le nom de la banque dans le repository ainsi que dans le fichier de propriete. renomme egalement le fichier de
+propriete associe
+
+- #4813 commande move-production-directories implemente : si la propriete db.version est modifier, aucun nouveaux cycle update peut etre lancer,
+il faut executer cette commande afin de changer de repertoire de production les anciennes version de la banque.
+
+- #4231 Modification de l'affichage de Status (le tail -f est enleve)
+
+ENVIRONEMENT WORKFLOW
+--------------------------------------------
+
+- Possibilite de modifier les chemin de localisation des workflow,process,rapport,statefiles,log
+via un fichier general.conf (root de BioMAJ). Export des definitions des chemins des executables (bunzip,tar,gunzip,unzip,wget)
+dans ce fichier
+Ce fichier est generer automatiquement, si celui-ci n'existe pas.
+
+DEFINITION DE WORKFLOW
+---------------------------------------------
+- #4812 forcer l utilisation d'un --move-production par l utilisateur si les proprietes data.dir et version.dir sont modifie
+- Possibilite de donner en argument d'un processus, une propriete definie dans le fichier de propriete ou par le workflow (comme remote.release)
+exemple:
+
+print.name=echo
+print.exe=echo
+print.args=Bank : ${db.name} VERSION : ${dir.version} RELEASE : ${remote.release}
+print.desc=Affichage des proprietes du workflow
+print.type=Affichage
+
+affichage :
+Bank : alu VERSION : TEST RELEASE : 2008-01-31
+
+CYCLE UPDATE
+----------------------------------------------
+
+INITIALISATION
+--------------
+-Ajout de la propriete include.properties :
+Cela permet de definir des postprocessus dans un fichier commun ou d etablir un profil de workflow
+
+- #3108 Possibilite de definir un groupe (parenthesage) dans l'expression de la release :
+exemple :
+release.file=reldate.txt
+release.regexp=UniProt\\sKnowledgebase\\sRelease\\s+([\\d]+\\.*[\\d]*)
+--> resultat : 12.8
+
+SYNCHRONISATION
+---------------
+
+- #4170 Gestion du format d'archivage zip
+
+POST-TRAITEMENT
+---------------
+
+- Ajout de variable d environnement pour les post-traitement :
+ - PATH_PROCESS_BIOMAJ : repertoire racine des post-processus.
+ - PATH_LOG_BIOMAJ : repertoire de log.
+ - PATH_WORKFLOW_BIOMAJ : repertoire des fichiers de workflow (.properties).
+
+ -#3644 [liste files add] [list file supr] [list file copy] pour postprocess
+ Si la propriete "list.files.available" est definie et est initialisé à "true", Les variables d'environnement suivantes sont initialisées pour chaque processus:
+
+ - RELEASE_ALL_COMPRESSED_FILES_LIST : Liste des fichiers qu'on a recuperer du serveur.
+ - RELEASE_ALL_UNCOMPRESSED_FILES_LIST : Liste des fichiers generes dans le repertoire flat de la version en construction.
+ - RELEASE_OLD_FILES_LIST : Liste des fichiers provenant de l'ancienne version et qui se trouve dans le repertoire flat de la version en construction.
+ - RELEASE_NEW_FILES_LIST : Liste des fichiers nouvellement telecharges et extrait qui se trouve dans le repertoire flat de la version en construction.
+
+-#4165 Modification de --rebuild
+
+DEPLOIEMENT
+-----------
+- Envoie une erreur si l espace disque est insuffisant.
+
+RAPPORT HTML
+---------------------------------------------
+- #4237 Ajout Statistique bande passante/release
+- Nouvelle generation du rapport html pour les utilisateurs/administrateurs:
+ - Menu : * lien sur le site officiel BioMAJ
+ * choix d'affichage par type de banque/par format
+ * affichage des dernieres erreurs
+
+ - Vue admin/vue user
+ - Trie des tableaux sur tous attributs des banques biologiques.
+ - Affichage d'une statistique par page
+
+GESTION INTERNE
+------------------------------------------------
+
+- Les sessions sont des fichiers inclues dans le fichier root via un tag <xinclude>, la lecture des tag <files> devient optionnel.
+
+CORRECTIONS BUGS
+----------------
+- #4050 : Erreur lors de l'update d'une banque dependante.
+- #4590 : Reprise sur erreur des post processing
+- #4773 : Bug iprscan
+- #5035 : Erreur aleatoire de deletion de log lors de mise a jour.
+- #4206 : log concatener lors de mise a jour simultanee de plusieurs banques.
+- #4602 : nom de fichier dans la generation de rapport html
+- #4600 : bug avec un xml mal forme sur la generation de rapport
+
+################################################################################################################
+release 0.9.2.0
+
+- Le fichier distant ou se trouve le numero de version peut etre exprimer par une url complete:
+ ex : release.file=ftp://ftp.ncbi.nih.gov/genbank/GB_Release_Number
+- La propriete remote.dir peut etre vide (utile pour recuperer a la racine du repertoire ftp)
+- gestion des arguments de l executable avec lib cli2.0 jakarta
+- optimisation de telechargement :
+ - random sur la connection
+ - time out sur la connection
+ - tentative de telecharger la liste complete de telechargement (une liste "echec" est etablie a la fin de la tache download)
+-ajout de la propriete : mail.from afin d avoir des header mail hemit bien form�s
+(evite la classification spam des mails biomaj)
+-ajout d info dans le statefile xml a propos de la configuration utilis� lors de la session: link.copy, remoteExcludedFile, log.file
+(la modification de ces proprietes influe sur l'execution d un nouveau cycle update)
+- refonte de l option status :
+ ajout de filtre sur l option --status : --dbtype=<type>, --online, --updating
+- fix tar.gz.md5 bug
+- possibilite de definir une propriete db.formats=[format1,format2,...]
+ ces informations sont generer dans l index obtenu par l option --index
+- ajout de la propriete local.files.excluded, pour eviter d'avoir certain fichier temporaire comme les .panfs dans les repertoire de prod
+
+################################################################################################################
+
+release 0.9.1.2
+- fix keep.old.version bug
+- Implementation et test sur les banques dependantes :
+utilisation : propriete depends.
+- option --rebuild reconstruit la release et place un
+lien current sur l avant derniere version si ce repertoire existe.
+- enrichissement du workflows de postprocess : possibilit� de definir plusieurs Block de processus parallele.
+- propriete log.files pour optimiser le "file check"
+
+################################################################################################################
+
+release 0.9.1.1
+Bugs fixed
+
+- keep.old.version have to be positive
+- bug on protocol http
+- bug on link server ftp (used by genomes bank)
+- http/ftp with authentification
+
+properties
+astral (http)
+go (http)
+
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/TODO
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/TODO (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/TODO 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,8 @@
+
+Biomaj - Todo
+=================
+
+We are currently using the INRIA forge Tracker as Todo list:
+
+ https://gforge.inria.fr/tracker/?group_id=369
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/Configurator.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/Configurator.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/Configurator.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,392 @@
+import java.io.FileWriter;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.File;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+
+/**
+ * Class that initializes the required properties for
+ * BioMAJ to work.
+ *
+ * @author rsabas
+ *
+ */
+public class Configurator {
+
+ private static final String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
+
+ private static final String HSQLDB_DRIVER = "org.hsqldb.jdbcDriver";
+ private static final String HSQLDB_LOGIN = "sa";
+ private static final String HSQLDB_PASSWD = "";
+ private static final String HSQLDB_URL = "jdbc:hsqldb:hsql://localhost/bmajdb";
+
+ private static final String TOMCAT_DIR = "apache-tomcat-6.0.24";
+ private static final int MESSAGE_MAX = 30;
+
+ private static String biomajRoot = "";
+
+ private static PrintWriter logger = null;
+
+ public static void main(String[] args) {
+
+ boolean useTomcat = true;
+
+ Map<String, String> params = new HashMap<String, String>();
+
+ for (String arg : args) {
+ String[] pair = arg.split(":=");
+ if (pair.length > 1)
+ params.put(pair[0], pair[1]);
+ else
+ params.put(pair[0], "");
+ }
+
+ biomajRoot = params.get("biomaj_root");
+
+ try {
+ logger = new PrintWriter(biomajRoot + "/install_log.log");
+ } catch (FileNotFoundException e1) {
+ log(e1.toString());
+ }
+
+ if (params.get("java_home").trim().isEmpty())
+ params.put("java_home","/usr/lib/jvm/java-6-openjdk");
+
+
+ if( !params.get("tomcat_port").trim().isEmpty() && params.get("tomcat_port").equals("0")) {
+ useTomcat = false;
+ }
+
+ if(useTomcat) {
+ /*
+ * Context.xml
+ */
+ log("Updating Context.xml...");
+ try {
+ PrintWriter pw = new PrintWriter(biomajRoot + "/" + TOMCAT_DIR + "/conf/Catalina/localhost/BmajWatcher.xml");
+
+ pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ pw.println("<Context reloadable=\"false\">");
+
+ pw.println("<!-- ENV VARIABLES -->");
+ pw.println("<Parameter name=\"BIOMAJ_ROOT\" value=\"" + biomajRoot + "\" override=\"false\"/>");
+
+ pw.println("<!-- WEB INTERFACE CONF -->");
+ pw.println("<Parameter name=\"MESSAGE_MAX\" value=\"" + MESSAGE_MAX + "\" override=\"false\"/>");
+
+ pw.println("<Parameter name=\"USELOCAL\" value=\"1\" override=\"false\"/>");
+ pw.println("<!-- LDAP CONF -->");
+ if (params.get("use_ldap").equals("true"))
+ pw.println("<Parameter name=\"USELDAP\" value=\"1\" override=\"false\"/>");
+ else
+ pw.println("<Parameter name=\"USELDAP\" value=\"0\" override=\"false\"/>");
+
+ log("Creating authentication file...");
+ createPasswdFile(params.get("app_login"), params.get("app_passwd"));
+
+ pw.println("<Parameter name=\"LDAPHOST\" value=\"" + params.get("ldap_host") + "\" override=\"false\"/>");
+ pw.println("<Parameter name=\"LDAPDN\" value=\"" + params.get("ldap_dn") + "\" override=\"false\"/>");
+ pw.println("<Parameter name=\"OPTFILTER\" value=\"" + params.get("opt_filter") + "\" override=\"false\"/>");
+
+ pw.println("<!-- LOCAL/REMOTE EXECUTION -->");
+ pw.println("<Parameter name=\"EXECUTION\" value=\"local\" override=\"false\"/>");
+
+ pw.println("<!-- SSH CONFIG -->");
+ pw.println("<Parameter name=\"SSH_AUTH_TYPE\" value=\"\" override=\"false\"/>");
+ pw.println("<Parameter name=\"SSH_LOGIN\" value=\"\" override=\"false\"/>");
+ pw.println("<Parameter name=\"SSH_PASSWD\" value=\"\" override=\"false\"/>");
+ pw.println("<Parameter name=\"SSH_KEY_PATH\" value=\"\" override=\"false\"/>");
+ pw.println("<Parameter name=\"SSH_PASSPHRASE\" value=\"\" override=\"false\"/>");
+ pw.println("<Parameter name=\"SSH_HOSTS\" value=\"\" override=\"false\"/>");
+
+
+ pw.println("</Context>");
+
+ pw.close();
+
+ /*
+ * Log handling
+ */
+ String logBase = "/var/log/biomaj";
+ pw = new PrintWriter(biomajRoot + "/" + TOMCAT_DIR + "/conf/Catalina/localhost/BmajWatcher#logs.xml");
+
+ pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ pw.println("<Context docBase=\"" + logBase + "\" debug=\"0\" privileged=\"true\">");
+ pw.println("</Context>");
+
+ pw.close();
+ } catch (FileNotFoundException e) {
+ log(e.toString());
+ }
+
+ }
+
+ /*
+ * Global.properties
+ */
+ log("Updating global.properties...");
+ String globalLocation = "/etc/biomaj/db_properties/global.properties";
+ StringBuilder sb = new StringBuilder();
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(globalLocation));
+ String line = "";
+ while ((line = br.readLine()) != null) {
+ if (line.startsWith("database."))
+ continue;
+ sb.append(line + "\n");
+ }
+ } catch (FileNotFoundException e) {
+ log(e.toString());
+ } catch (IOException e) {
+ log(e.toString());
+ }
+
+ if (params.get("db_type").equals("MySQL")) {
+ log("Using MySQL");
+ sb.append("database.type=mysql\n");
+ sb.append("database.driver=" + MYSQL_DRIVER + "\n");
+ sb.append("database.url=" + params.get("db_url") + "\n");
+ sb.append("database.login=" + params.get("db_login") + "\n");
+ sb.append("database.password=" + params.get("db_passwd") + "\n");
+ } else {
+ log("Using HSQLDB");
+ sb.append("database.type=hsqldb\n");
+ sb.append("database.driver=" + HSQLDB_DRIVER + "\n");
+ sb.append("database.url=" + HSQLDB_URL + "\n");
+ sb.append("database.login=" + HSQLDB_LOGIN + "\n");
+ sb.append("database.password=" + HSQLDB_PASSWD + "\n");
+ }
+
+ try {
+ PrintWriter pw = new PrintWriter(globalLocation);
+ pw.println(sb.toString());
+ pw.close();
+ } catch (FileNotFoundException ex) {
+ log(ex.toString());
+ }
+
+ if(useTomcat) {
+ /*
+ * Server.xml
+ */
+ rewriteServerXml(params.get("tomcat_port"));
+
+ }
+
+ /*
+ * Creer env.sh
+ */
+ createEnv(params.get("ant_home"), params.get("java_home"));
+
+ /*
+ * Run scripts
+ */
+ runScripts(params.get("db_type").equalsIgnoreCase("HSQLDB"), params);
+
+ log("Configuration complete");
+ logger.close();
+ }
+
+ private static void rewriteServerXml(String newPort) {
+ if (newPort.trim().isEmpty())
+ newPort = "8080";
+ String location = "/usr/share/biomaj/apache-tomcat-6.0.24/conf/server.xml";
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(location));
+ String line = null;
+ StringBuilder sb = new StringBuilder();
+ Pattern p = Pattern.compile("<Connector port=\"(\\d+)\" protocol=\"HTTP/1\\.1\"");
+ while ((line = br.readLine()) != null) {
+ Matcher m = p.matcher(line);
+ if (m.find()) {
+ sb.append(line.replaceFirst(m.group(1), newPort) + "\n");
+ }
+ else
+ sb.append(line + "\n");
+ }
+ br.close();
+
+ FileWriter fw = new FileWriter(location);
+ fw.write(sb.toString());
+ fw.close();
+
+ } catch (IOException e) {
+ log(e.toString());
+ }
+ }
+
+ private static void createPasswdFile(String login, String passwd) {
+ try {
+ PrintWriter pw = new PrintWriter(biomajRoot + "/.bmajwatcherpasswd");
+ MessageDigest digest = MessageDigest.getInstance("SHA1");
+ digest.update(login.getBytes());
+ byte[] hashedLogin = digest.digest();
+
+ digest.reset();
+ digest.update(passwd.getBytes());
+ byte[] hashedPasswd = digest.digest();
+
+ pw.println(getHexString(hashedLogin) + ":" + getHexString(hashedPasswd));
+ pw.close();
+ } catch (FileNotFoundException e) {
+ log(e.toString());
+ } catch (NoSuchAlgorithmException e) {
+ log(e.toString());
+ }
+ }
+
+ public static String getHexString(byte[] buf) {
+ char[] TAB_BYTE_HEX = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
+ '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
+ StringBuilder sb = new StringBuilder(buf.length * 2);
+
+ for (int i = 0; i < buf.length; i++) {
+ sb.append(TAB_BYTE_HEX[(buf[i] >>> 4) & 0xf]);
+ sb.append(TAB_BYTE_HEX[buf[i] & 0x0f]);
+ }
+ return sb.toString();
+ }
+
+ private static void createEnv(String antHome, String javaHome) {
+
+ try {
+ PrintWriter pw = new PrintWriter(biomajRoot + "/bin/env.sh");
+ pw.println("#!/bin/sh");
+ pw.println("export JAVA_HOME=" + javaHome);
+ pw.println("export ANT_HOME=" + antHome);
+ pw.println("export BIOMAJ_ROOT=" + biomajRoot);
+ pw.close();
+ } catch (FileNotFoundException ex) {
+ log(ex.toString());
+ }
+
+ }
+
+ /*
+ private static void copyTo(String source, String dest) {
+ try {
+ InputStream in = new FileInputStream(source);
+ OutputStream out = new FileOutputStream(dest);
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }*/
+
+ /**
+ * Starts hsql server if required.
+ * Creates hsql database if required.
+ * Starts tomcat server.
+ *
+ * @param startHsql whether to init hsqldb server
+ */
+ private static void runScripts(boolean startHsql, Map<String,String> params) {
+
+ String[] env = {"ANT_HOME=" + params.get("ant_home"), "JAVA_HOME=" + params.get("java_home"), "BIOMAJ_ROOT=" + biomajRoot};
+
+ try {
+ log("Building jar with ant...");
+ Process p = Runtime.getRuntime().exec("ant", env, new File(biomajRoot));
+ p.waitFor();
+ log("Done.");
+ } catch (IOException e1) {
+ log(e1.toString());
+ } catch (InterruptedException e2) {
+ log(e2.toString());
+ }
+
+ if (startHsql) {
+ try {
+ if (!new File(biomajRoot + "/tmp/db.pid").exists()) {
+ new File(biomajRoot + "/tmp").mkdir();
+ log("Starting database server...");
+ Runtime.getRuntime().exec("bash " + biomajRoot + "/bin/start_dbserver.sh", env, null);
+ try {
+ TimeUnit.SECONDS.sleep(2);
+ } catch (InterruptedException e) {
+ log(e.toString());
+ }
+
+ log("Creating database...");
+ Runtime.getRuntime().exec("bash " + biomajRoot + "/bin/create_database.sh", env, null);
+ }
+ } catch (IOException e) {
+ log(e.toString());
+ }
+ } else { // Create schema
+ // createMySQLSchema(params);
+ }
+ }
+
+
+ private static void createMySQLSchema(Map<String, String> params) {
+ try {
+ Class.forName("com.mysql.jdbc.Driver");
+ } catch (ClassNotFoundException e2) {
+ log(e2.toString());
+ }
+ try {
+ String url = params.get("db_url");
+ Connection conn = DriverManager.getConnection(url.substring(0, url.lastIndexOf("/")), params.get("db_login"), params.get("db_passwd"));
+ Statement s = conn.createStatement();
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(biomajRoot + "/sql/mysql.sql"));
+ StringBuilder sb = new StringBuilder();
+ String line = "";
+ try {
+ while ((line = br.readLine()) != null) {
+ if (!line.startsWith("--") && !line.trim().isEmpty())
+ sb.append(line);
+ if (line.endsWith(";")) {
+ s.executeUpdate(sb.toString());
+ sb = new StringBuilder();
+ }
+
+ }
+ } catch (IOException e) {
+ log(e.toString());
+ }
+
+ } catch (FileNotFoundException e) {
+ log(e.toString());
+ }
+ conn.close();
+ } catch (SQLException e1) {
+ log(e1.toString());
+ }
+ }
+
+ private static void log(String message) {
+ SimpleDateFormat sdf = new SimpleDateFormat("[yyyy-MM-dd HH:mm:ss]");
+ logger.println(sdf.format(new Date()) + ": " + message);
+ logger.flush();
+ }
+}
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/antRunAsync.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/antRunAsync.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/antRunAsync.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# antRunAsync - Wrapper script to run an executable detached in the
+# background from Ant's <exec> task. This works be redirecting stdin,
+# stdout and stderr so Ant finds them closed and doesn't wait for the
+# program to exit.
+#
+# usage:
+# <exec executable="antRunAsync">
+# <env key="ANTRUN_NOHUP" value="true" /> <!-- optional -->
+# <env key="ANTRUN_OUTPUT" value="output.log" /> <!-- required -->
+# <arg value="real executable" />
+# </exec
+
+# If ANTRUN_NOHUP environment variable is set to true/yes/nohup, run the
+# executable prefixed with "nohup" making it immune to logging out.
+case "$ANTRUN_NOHUP" in
+ true|yes|nohup) ANTRUN_NOHUP=nohup ;;
+ *) unset ANTRUN_NOHUP ;;
+esac
+
+# ANTRUN_OUTPUT environment variable must be set to output file name or
+# executable can't run detached
+if [ -n "$ANTRUN_OUTPUT" ]
+then
+ $ANTRUN_NOHUP "$@" </dev/null > "$ANTRUN_OUTPUT" 2>&1 &
+else
+ echo "$0: ERROR: variable ANTRUN_OUTPUT must be set to output filename!"
+ exit 1
+fi
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/antRunAsync.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/biomaj.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/biomaj.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/biomaj.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,136 @@
+#!/bin/bash
+
+# Copyright Copr. INRIA/INRA
+# Contact : biomaj_AT_genouest.org
+#
+# BioMAJ is a workflow engine dedicated to biological bank management.
+# The Software automates the update cycle and the supervision of the locally
+# mirrored bank repository. The project is a collaborative effort between two
+# French Research Institutes INRIA (Institut National de Recherche en
+# Informatique
+# et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+#
+# This software is governed by the CeCILL-A license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# "http://www.cecill.info".
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# In this respect, the user's attention is drawn to the risks associated
+# with loading, using, modifying and/or developing or reproducing the
+# software by the user in light of its specific status of free software,
+# that may mean that it is complicated to manipulate, and that also
+# therefore means that it is reserved for developers and experienced
+# professionals having in-depth computer knowledge. Users are therefore
+# encouraged to load and test the software's suitability as regards their
+# requirements in conditions enabling the security of their systems and/or
+# data to be ensured and, more generally, to use and operate it in the
+# same conditions as regards security.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-A license and that you accept its terms.
+
+test_var_env()
+{
+ if [ -z "$2" ]
+ then
+ echo "The environment variable $1 is not defined!"
+ echo "You have to set correctly $1 in order to run biomaj."
+ exit 1
+ fi
+}
+
+test_ant_version()
+{
+ANTVER=`ant -version | awk '{print $4}' | cut -d "." -f1-3 | sed -e 's/\./ /g' -e 's/[a-z]/ /g' -e 's/_/ /g' `
+#The ANT minimum Requirement is 1.6.5
+PreRequis=(1 6 5)
+
+count=-1
+ for i in $ANTVER; do
+ count=`expr $count + 1`
+ if [ $i -eq ${PreRequis[$count]} ]; then
+ continue
+ elif [ $i -gt ${PreRequis[$count]} ]; then
+ break
+ else
+ Prerequis=`echo ${PreRequis[*]} | sed -e 's/ /\./g'`
+ echo "WARNING: You have a Version of Ant(`ant -version | awk '{print $4}' | cut -d "." -f1-3`) older then $Prerequis "
+ echo "Biomaj has been tested with Ant version $Prerequis"
+ echo "Please setup the prerequired Ant Environment (or above), and re-run Biomaj"
+ exit 1
+ fi
+ done
+}
+
+test_java_version()
+{
+JAVAVER=`java -version 2>&1 | grep version | awk '{ print $3}' | sed -e 's/"//g' | cut -d "." -f1-3 | cut -d "_" -f1 | sed -e 's/\./ /g' -e 's/[a-z]/ /g' -e 's/_/ /g' `
+#The JAVA minimum Requirement is 1.6.0
+PreRequis=(1 6 0)
+
+count=-1
+ for i in $JAVAVER; do
+ count=`expr $count + 1`
+ if [ $i -eq ${PreRequis[$count]} ]; then
+ continue
+ elif [ $i -gt ${PreRequis[$count]} ]; then
+ break
+ else
+ Prerequis=`echo ${PreRequis[*]} | sed -e 's/ /\./g'`
+ echo "WARNING: You have a Version of JAVA(`java -version 2>&1 | grep version | awk '{ print $3}'`) older then $Prerequis "
+ echo "Biomaj has been tested with Java version $Prerequis"
+ echo "Please setup the prerequired Java Environment (or above), and re-run Biomaj"
+ exit 1
+ fi
+ done
+}
+# creates one file per bank that contains the pid of this process
+create_pid()
+{
+ ok="false";
+ for arg in $@; do
+ regex=`echo $arg | egrep '^\-+[[:alnum:]]+'`
+ if [ $arg = "--update" ] || [ $arg = "-d" ]; then
+ ok="true"
+ elif [ -z $regex ] && [ $ok = "true" ]; then
+ echo $$>$BIOMAJ_ROOT/tmp/.bmajpid_$arg
+ elif [ -w $regex ] && [ $ok = "true" ]; then
+ ok="false"
+ fi
+ done
+}
+
+#echo "Loading variables environment"
+SCRIPT_PATH="${BASH_SOURCE[0]}";
+if([ -h "${SCRIPT_PATH}" ]) then
+ while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
+fi
+pushd . > /dev/null
+cd `dirname ${SCRIPT_PATH}` > /dev/null
+SCRIPT_PATH=`pwd`;
+popd > /dev/null
+source $SCRIPT_PATH/env.sh
+
+test_var_env "ANT_HOME" "${ANT_HOME}"
+test_var_env "JAVA_HOME" "${JAVA_HOME}"
+test_var_env "BIOMAJ_ROOT" "${BIOMAJ_ROOT}"
+
+ANT=${ANT_HOME}/bin/ant
+
+#echo "Creating database..."
+#source $BIOMAJ_ROOT/bin/create_database.sh
+#echo "Verifying Pre-requisists"
+test_ant_version
+test_java_version
+create_pid $@
+
+
+#echo "Executing biomaj ..."
+java -Xmx1024m -jar $BIOMAJ_ROOT/lib/biomaj.jar $@
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/biomaj.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/create_database.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/create_database.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/create_database.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+
+test_var_env()
+{
+ if [ -z "$2" ]
+ then
+ echo "The environment variable $1 is not defined!"
+ echo "You have to set correctly $1 in order to run biomaj."
+ exit 1
+ fi
+}
+
+SCRIPT_PATH="${BASH_SOURCE[0]}";
+if([ -h "${SCRIPT_PATH}" ]) then
+ while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
+fi
+pushd . > /dev/null
+cd `dirname ${SCRIPT_PATH}` > /dev/null
+SCRIPT_PATH=`pwd`;
+popd > /dev/null
+source $SCRIPT_PATH/env.sh
+
+test_var_env "BIOMAJ_ROOT" "${BIOMAJ_ROOT}"
+
+
+#if [ -f $BIOMAJ_ROOT/sql/biomaj_log.lck ]; then
+ #echo 'Database already exists.'
+# true
+#else
+ echo 'Creating database...'
+ java -cp $BIOMAJ_ROOT/lib/biomaj.jar org.inria.biomaj.sql.CreateDB
+ echo 'Done.'
+#fi
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/create_database.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/env.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/env.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/env.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,2 @@
+#!/bin/sh
+#ENV DEFINITION FOR PROCESSING DATABASE WITH BIOMAJ
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/env.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/import_statefiles.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/import_statefiles.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/import_statefiles.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+test_var_env()
+{
+ if [ -z "$2" ]
+ then
+ echo "The environment variable $1 is not defined!"
+ echo "You have to set correctly $1 in order to run biomaj."
+ exit 1
+ fi
+}
+
+SCRIPT_PATH="${BASH_SOURCE[0]}";
+if([ -h "${SCRIPT_PATH}" ]) then
+ while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
+fi
+pushd . > /dev/null
+cd `dirname ${SCRIPT_PATH}` > /dev/null
+SCRIPT_PATH=`pwd`;
+popd > /dev/null
+source $SCRIPT_PATH/env.sh
+
+test_var_env "BIOMAJ_ROOT" "${BIOMAJ_ROOT}"
+
+
+echo "Starting import..."
+java -cp $BIOMAJ_ROOT/lib/biomaj.jar -Xmx512m -Dlog4j.configuration=file://$BIOMAJ_ROOT/src/log4j.properties org.inria.biomaj.exe.migration.Parser $@
+
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/import_statefiles.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/shutdown_dbserver.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/shutdown_dbserver.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/shutdown_dbserver.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+test_var_env()
+{
+ if [ -z "$2" ]
+ then
+ echo "The environment variable $1 is not defined!"
+ echo "You have to set correctly $1 in order to run biomaj."
+ exit 1
+ fi
+}
+
+SCRIPT_PATH="${BASH_SOURCE[0]}";
+if([ -h "${SCRIPT_PATH}" ]) then
+ while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
+fi
+pushd . > /dev/null
+cd `dirname ${SCRIPT_PATH}` > /dev/null
+SCRIPT_PATH=`pwd`;
+popd > /dev/null
+source $SCRIPT_PATH/env.sh
+
+test_var_env "BIOMAJ_ROOT" "${BIOMAJ_ROOT}"
+
+if [ -f $BIOMAJ_ROOT/tmp/db.pid ]; then
+ PID=`head -1 $BIOMAJ_ROOT/tmp/db.pid`
+ if ps $PID | grep bmajdb > /dev/null
+ then
+ java -cp $BIOMAJ_ROOT/lib/biomaj.jar org.inria.biomaj.sql.ShutdownHSQLDB
+ rm $BIOMAJ_ROOT/tmp/db.pid
+ fi
+fi
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/shutdown_dbserver.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/start_dbserver.sh
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/start_dbserver.sh (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/start_dbserver.sh 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+test_var_env()
+{
+ if [ -z "$2" ]
+ then
+ echo "The environment variable $1 is not defined!"
+ echo "You have to set correctly $1 in order to run biomaj."
+ exit 1
+ fi
+}
+
+SCRIPT_PATH="${BASH_SOURCE[0]}";
+if([ -h "${SCRIPT_PATH}" ]) then
+ while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
+fi
+pushd . > /dev/null
+cd `dirname ${SCRIPT_PATH}` > /dev/null
+SCRIPT_PATH=`pwd`;
+popd > /dev/null
+source $SCRIPT_PATH/env.sh
+
+test_var_env "BIOMAJ_ROOT" "${BIOMAJ_ROOT}"
+
+if [ -f $BIOMAJ_ROOT/tmp/db.pid ]; then
+ PID=`head -1 $BIOMAJ_ROOT/tmp/db.pid`
+ if ! ps $PID | grep bmajdb > /dev/null
+ then
+ echo "Starting server..."
+ java -Xmx1024m -cp $BIOMAJ_ROOT/lib/biomaj.jar org.hsqldb.server.Server -database.0 file:$BIOMAJ_ROOT/sql/biomaj_log -dbname.0 bmajdb > $BIOMAJ_ROOT/dbserver.log &
+
+ while [ ! -f $BIOMAJ_ROOT/sql/biomaj_log.lck ]; do
+ sleep 0.5
+ done
+ pgrep -f bmajdb > $BIOMAJ_ROOT/tmp/db.pid
+ else
+ echo "Server already running."
+ fi
+else
+ echo "Starting server..."
+ java -Xmx1024m -cp $BIOMAJ_ROOT/lib/biomaj.jar org.hsqldb.server.Server -database.0 file:$BIOMAJ_ROOT/sql/biomaj_log -dbname.0 bmajdb > $BIOMAJ_ROOT/dbserver.log &
+
+ while [ ! -f $BIOMAJ_ROOT/sql/biomaj_log.lck ]; do
+ sleep 0.5
+ done
+ pgrep -f bmajdb > $BIOMAJ_ROOT/tmp/db.pid
+fi
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/bin/start_dbserver.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/build.xml
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/build.xml (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/build.xml 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,258 @@
+<?xml version="1.0" ?>
+<!--
+# Copyright (c) 2004, Indiana University
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Indiana University, Bloomington nor the names
+# of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+================================================
+-->
+
+<project name="build-dist" default="jar" basedir=".">
+ <!-- Directory structure -->
+ <property name="build.dir" location="build"/>
+ <property name="dist.dir" location="dist"/>
+ <property name="src.dir" location="src"/>
+ <property name="lib.dir" location="/usr/share/java/"/>
+ <property name="bmajlib.dir" location="lib"/>
+ <property name="docs.dir" location="doc"/>
+ <property name="bin.dir" location="bin"/>
+ <property name="tomcat.dir" location="apache-tomcat-6.0.24"/>
+ <property name="class.dir" location="${build.dir}/classes"/>
+ <property name="api.dir" location="${docs.dir}/api"/>
+ <property name="db.dir" location="sql"/>
+
+ <property name="project.name" value="biomaj"/>
+ <property name="debug" value="true"/>
+ <property name="optimized" value="true"/>
+ <property name="project.version" value="1.1.0"/>
+ <property environment="env"/>
+ <property name="project.jarfile.name" value="${project.name}.jar"/>
+ <property name="db.name" value="biomaj_log.data"/>
+ <property name="db.create" value="create_database.sh"/>
+
+ <property name="class1.path" value="${env.ANT_HOME}/lib/ant.jar ${env.ANT_HOME}/lib/ant-nodeps.jar ${env.ANT_HOME}/lib/ant-launcher.jar ${env.ANT_HOME}/lib/ant-apache-oro.jar"/>
+ <property name="class2.path" value="${bmajlib.dir}/jakarta-oro-2.1-dev-1.jar ${lib.dir}/commons-net.jar ${lib.dir}/ant-contrib.jar ${lib.dir}/junit4.jar"/>
+ <property name="class3.path" value="${lib.dir}/forms.jar ${lib.dir}/jakarta-regexp.jar ${lib.dir}/jdom.jar ${lib.dir}/log4j-1.2.jar ${lib.dir}/mysql-connector-java.jar"/>
+ <property name="class4.path" value="${lib.dir}/jfreechart.jar ${lib.dir}/jcommon.jar ${lib.dir}/gnumail.jar ${lib.dir}/activation.jar ${bmajlib.dir}/commons-cli-2.0-SNAPSHOT.jar"/>
+ <property name="class5.path" value="${lib.dir}/hsqldb.jar ${lib.dir}/commons-pool.jar ${lib.dir}/commons-dbcp.jar ${lib.dir}/jsch.jar" />
+
+ <path id="compile.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${bmajlib.dir}/">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <taskdef resource="net/sf/antcontrib/antlib.xml" onerror="fail" >
+ <classpath>
+ <pathelement location="${lib.dir}/ant-contrib.jar"/>
+ </classpath>
+ </taskdef>
+
+ <target name="clean">
+ <echo level="info">Cleaning build directories</echo>
+ <delete verbose="true" includeEmptyDirs="true">
+ <fileset dir="${build.dir}" includes="**"/>
+ <fileset dir="${dist.dir}" includes="**"/>
+ <fileset dir="lib" includes="${project.name}*.jar"/>
+ </delete>
+ </target>
+
+ <target name="javadocs">
+ <mkdir dir="${api.dir}"/>
+ <javadoc destdir="${api.dir}" sourcepath="${src.dir}" packagenames="org.*">
+ <link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
+ </javadoc>
+ </target>
+
+ <target name="test_env">
+ <!-- Test environment variable -->
+ <fail message="ANT_HOME is not defined !">
+ <condition>
+ <not>
+ <isset property="env.ANT_HOME"/>
+ </not>
+ </condition>
+ </fail>
+ <!--
+ <echo message="ANT version : ${ant.version}" level="info"/>
+ <echo message="JAVA version : ${ant.java.version}" level="info"/>
+ -->
+ </target>
+
+ <target name="compile">
+ <mkdir dir="${class.dir}"/>
+ <mkdir dir="${dist.dir}"/>
+ <javac srcdir="${src.dir}" destdir="${class.dir}" classpathref="compile.classpath" debug="${debug}" optimize="${optimized}" nowarn="true">
+ <!-- <compilerarg value="-Xlint:unchecked"/>
+ <compilerarg value="-Xlint:deprecation"/>-->
+ </javac>
+ </target>
+
+ <target name="init" depends="jar">
+ <mkdir dir="tmp"/>
+ <exec executable="sh">
+ <arg value="${tomcat.dir}/bin/startup.sh"/>
+ </exec>
+ </target>
+
+ <target name="jar" depends="test_env,compile">
+ <jar destfile="lib/${project.jarfile.name}" basedir="${class.dir}" >
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Main-Class" value="org.inria.biomaj.exe.main.Biomaj"/>
+ <attribute name="Class-Path" value="${class1.path} ${class2.path} ${class3.path} ${class4.path} ${class5.path}"/>
+ <section name="common">
+ <attribute name="Specification-Title" value="Biomaj Project"/>
+ <attribute name="Specification-Version" value="${project.version}"/>
+ <attribute name="Specification-Vendor" value="I.N.R.I.A"/>
+ <attribute name="Implementation-Title" value="Biological databanks updating and processing"/>
+ <attribute name="Implementation-Version" value="${version} ${TODAY}"/>
+ <attribute name="Implementation-Vendor" value="Example Corp."/>
+ <attribute name="Implementation-URL" value="Example Corp."/>
+ </section>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- Modif O.Filangi : Utiliser ce target pour construire un tar.gz et distribuer biomaj -->
+ <target name="build-bin" depends="jar">
+ <tar destfile="${dist.dir}/${project.name}-${project.version}-bin.tar.gz" compression="gzip">
+ <tarfileset dir="${basedir}" mode="755" prefix="${project.name}-${project.version}">
+ <include name="**/*.sh"/>
+ <include name="**/*.pl"/>
+ <include name="log/cron"/>
+ </tarfileset>
+
+ <tarfileset dir="${basedir}" prefix="${project.name}-${project.version}" id="excl">
+ <exclude name="test.xml"/>
+ <exclude name="dist/**"/>
+ <exclude name="**/CVS"/>
+ <exclude name="build/**"/>
+ <exclude name="**/*.ucd"/>
+ <exclude name="**/*.usd"/>
+ <exclude name="log/**"/>
+ <exclude name=".settings/**"/>
+ <exclude name="doc/tmp/**"/>
+ <exclude name="doc/*.odg"/>
+ <exclude name="doc/*.jpg"/>
+ <exclude name="**/*.uad"/>
+ <exclude name="**/.*"/>
+ <exclude name="**/*.doc"/>
+ <exclude name="**/*.ppt"/>
+ <exclude name="**/*.odt"/>
+ <exclude name="**/.externalToolBuilders/*"/>
+ <exclude name="projectfiles/**"/>
+ <exclude name="**/*.sh"/>
+ <exclude name="**/*.pl"/>
+ <exclude name="statefiles/**"/>
+ <exclude name="TAR_statefiles/**"/>
+ <exclude name="rapport/**"/>
+ <exclude name="tmp/**"/>
+ <exclude name="dev_utils/**"/>
+ <exclude name="**/test/**"/>
+ <exclude name="src/**"/>
+ <exclude name="sql/**"/>
+ </tarfileset>
+ </tar>
+ </target>
+
+ <target name="build-release" depends="jar">
+ <tar destfile="${dist.dir}/${project.name}-${project.version}.tar.gz" compression="gzip">
+ <tarfileset dir="${basedir}" mode="755" prefix="${project.name}-${project.version}">
+ <include name="**/*.sh"/>
+ <include name="**/*.pl"/>
+ <include name="BioMAJ-1.1.0-Linux-x86-Install"/>
+ </tarfileset>
+
+ <tarfileset dir="${basedir}" prefix="${project.name}-${project.version}" id="excl">
+ <exclude name="dist/**"/>
+ <exclude name="**/CVS"/>
+ <exclude name="build/**"/>
+ <exclude name="**/*.ucd"/>
+ <exclude name="**/*.usd"/>
+ <exclude name="log/**"/>
+ <exclude name=".settings/**"/>
+ <exclude name="doc/tmp/**"/>
+ <exclude name="doc/*.odg"/>
+ <exclude name="doc/*.jpg"/>
+ <exclude name="doc/Specifications*"/>
+ <exclude name="doc/UML/**"/>
+ <exclude name="**/*.uad"/>
+ <exclude name="**/.*"/>
+ <exclude name="**/*.doc"/>
+ <exclude name="**/*.ppt"/>
+ <exclude name="**/*.odt"/>
+ <exclude name="**/.externalToolBuilders/*"/>
+ <exclude name="projectfiles/**"/>
+ <exclude name="**/*.sh"/>
+ <exclude name="BioMAJ-1.1.0-Linux-x86-Install"/>
+ <exclude name="**/*.pl"/>
+ <exclude name="**/biomaj.jar"/>
+ <exclude name="statefiles/**"/>
+ <exclude name="TAR_statefiles/**"/>
+ <exclude name="rapport/**"/>
+ <exclude name="tmp/**"/>
+ <exclude name="dev_utils/**"/>
+ <exclude name="**/test/**"/>
+ <exclude name="sql/biomaj*"/>
+ <exclude name="sql/migration/*"/>
+ <exclude name="TODO"/>
+ <exclude name="*.cmake"/>
+ <exclude name="MANIFEST"/>
+ <exclude name="xml*"/>
+ </tarfileset>
+ </tar>
+ </target>
+
+ <target name="build-src" depends="remove-jar-and-sources">
+ <tar destfile="${dist.dir}/${project.name}-${project.version}-src.tar.gz" compression="gzip">
+ <tarfileset dir="${basedir}" mode="755" prefix="${project.name}-${project.version}">
+ <include name="**/*.sh"/>
+ <include name="**/*.pl"/>
+ <include name="log/cron"/>
+ <include name="src/**"/>
+ </tarfileset>
+ <tarfileset refid="excl"/>
+ </tar>
+ </target>
+
+ <target name="build-dbprop">
+ <tar destfile="${dist.dir}/${project.name}-${project.version}-dbprop.tar.gz" compression="gzip">
+ <tarfileset dir="${basedir}">
+ <include name="conf/db_properties/*.properties"/>
+ <include name="conf/db_properties/**/*.properties"/>
+ </tarfileset>
+ </tar>
+ </target>
+
+ <target name="remove-jar-and-sources">
+ <delete file="lib/biomaj.jar"/>
+ <delete dir="build"/>
+ </target>
+
+</project>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/ProcessBiomajLib.pm
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/ProcessBiomajLib.pm (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/ProcessBiomajLib.pm 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,697 @@
+
+=head1 NAME
+
+ProcessBiomajLib.pm - Librairie PERL pour le developpement des Process Biomaj
+
+=head1 Description
+
+Cette librairie propose une suite de fonctions et de variables specifiques au developpement en PERL de Process pour Biomaj.
+
+=head1 VERSION
+
+Version 0.9
+March 2007
+
+=head1 COPYRIGHT
+
+This program is distributed under the CeCILL License. (http://www.cecill.info)
+
+=cut
+
+package ProcessBiomajLib;
+
+use strict;
+use warnings;
+use vars qw(@ISA @EXPORT);
+require Exporter;
+
+ at ISA = qw(Exporter);
+
+#use vars qw( $BLAST_DIR $FASTA_DIR $SRS_DIR $FLAT_DIR $LOG_DIR $CURRENT_LINK $FUTUR_RELEASE_LINK);
+ at EXPORT = qw(clearOutputFiles printOutputFiles outputFile Info Warning Error readCfgFile getSequenceType executeGetz executeCmdSystem);
+
+
+my $UNIX_COMMAND_SYSTEM_CFG = "$ENV{BIOMAJ_ROOT}/conf/process/unix_command_system.cfg";
+
+my ($OUTPUT_FILES,$OUTPUT_FILES_VOLATILE) = ("","");
+
+my $FLAT_DIR = "flat";
+my $LOG_DIR = "log";
+my $CURRENT_LINK = "current";
+my $FUTUR_RELEASE_LINK = "future_release";
+
+my $BLASTDB_DIR = "blastdb";
+
+=head1 Routines
+
+=head2 Configuration
+
+=head3 procedure checkBiomajEnvironment exit(-1);
+
+ Title : checkBiomajEnvironment
+ Usage : checkBiomajEnvironment()
+ Prerequisite : none
+ Fonction : Verifie l'existance des variables d'environnement necessaire aux Process.
+ Returns : none
+ Args : none
+ Env : dbname, datadir, dirversion, remoterelease, PP_DEPENDENCE, PP_DEPENDENCE_VOLATILE, PP_WARNING
+
+=cut
+sub checkBiomajEnvironment
+{
+ &Error("the environment variable 'dbname' is not set.") if ( !exists($ENV{'dbname'}) || $ENV{'dbname'} eq "");
+ &Error("the environment variable 'datadir' is not set.") if ( !exists($ENV{'datadir'}) || $ENV{'datadir'} eq "");
+ &Error("the environment variable 'dirversion' is not set.") if ( !exists($ENV{'dirversion'}) || $ENV{'dirversion'} eq "");
+ &Error("the environment variable 'remoterelease' is not set.") if ( !exists($ENV{'remoterelease'}) || $ENV{'remoterelease'} eq "");
+ &Error("the environment variable 'PP_DEPENDENCE' is not set.") if ( !exists($ENV{'PP_DEPENDENCE'}) || $ENV{PP_DEPENDENCE} eq "");
+ &Error("the environment variable 'PP_DEPENDENCE_VOLATILE' is not set.") if ( !exists($ENV{'PP_DEPENDENCE_VOLATILE'}) || $ENV{PP_DEPENDENCE_VOLATILE} eq "");
+ &Error("the environment variable 'PP_WARNING' is not set.") if ( !exists($ENV{'PP_WARNING'}) || $ENV{PP_WARNING} eq "");
+ return;
+}
+
+=head3 procedure readCfgFile
+
+ Title : readCfgFile
+ Usage : readCfgFile($rh_cmd)
+ Prerequisite : none
+ Fonction : Lit le fichier de conf $UNIX_COMMAND_SYSTEM_CFG.
+ : Place une Cle/Valeur dans $rh_cmd pour chaque ligne CLE=valeur du fichier
+ : Definit des valeur par defaut pour les commandes systeme non definit dans le fichier de conf
+ Returns : none
+ Args : $rh_cmd : reference sur un hash
+ Globals : $UNIX_COMMAND_SYSTEM_CFG
+
+=cut
+sub readCfgFile
+{
+ my ($rh_cmd) = (shift);
+
+ my $file = $UNIX_COMMAND_SYSTEM_CFG;
+ if ( -e ($file) )
+ {
+
+ open ( CFG, $file ) or &Warning("Cannot open file config !! >$file<");
+ while ( my $line = <CFG> )
+ {
+ if ( $line !~ /^\s*$/ && $line !~ /^#/ )
+ {
+ my ($key,$value) = split (/=/, $line, 2);
+ chomp($value);
+ $rh_cmd->{$key} = $value;
+ }
+ }
+ close( CFG );
+ }
+
+ $rh_cmd->{UNIX_CHMOD} = "chmod" if ( !defined($rh_cmd->{UNIX_CHMOD}) );
+ $rh_cmd->{UNIX_DATE} = "date" if ( !defined($rh_cmd->{UNIX_DATE}) );
+ $rh_cmd->{UNIX_GUNZIP} = "gunzip" if ( !defined($rh_cmd->{UNIX_GUNZIP}) );
+ $rh_cmd->{UNIX_GZIP} = "gzip" if ( !defined($rh_cmd->{UNIX_GZIP}) );
+ $rh_cmd->{UNIX_HEAD} = "head" if ( !defined($rh_cmd->{UNIX_HEAD}) );
+ $rh_cmd->{UNIX_LN} = "ln" if ( !defined($rh_cmd->{UNIX_LN}) );
+ $rh_cmd->{UNIX_MAIL} = "mail" if ( !defined($rh_cmd->{UNIX_MAIL}) );
+ $rh_cmd->{UNIX_MAKE} = "make" if ( !defined($rh_cmd->{UNIX_MAKE}) );
+ $rh_cmd->{UNIX_MKDIR} = "mkdir" if ( !defined($rh_cmd->{UNIX_MKDIR}) );
+ $rh_cmd->{UNIX_MV} = "mv" if ( !defined($rh_cmd->{UNIX_MV}) );
+ $rh_cmd->{UNIX_PWD} = "pwd" if ( !defined($rh_cmd->{UNIX_PWD}) );
+ $rh_cmd->{UNIX_RM} = "rm" if ( !defined($rh_cmd->{UNIX_RM}) );
+ $rh_cmd->{UNIX_SH} = "sh" if ( !defined($rh_cmd->{UNIX_SH}) );
+ $rh_cmd->{UNIX_TOUCH} = "touch" if ( !defined($rh_cmd->{UNIX_TOUCH}) );
+ $rh_cmd->{UNIX_ZCAT} = "zcat" if ( !defined($rh_cmd->{UNIX_ZCAT}) );
+
+ $rh_cmd->{UNIX_GETZ} = "getz" if ( !defined($rh_cmd->{UNIX_GETZ}) );
+
+ $rh_cmd->{FASTACMD} = "/usr/bin/fastacmd" if ( !defined($rh_cmd->{FASTACMD}) );
+ $rh_cmd->{FORMATDB} = "/usr/bin/formatdb" if ( !defined($rh_cmd->{FORMATDB}) );
+ return;
+}
+
+=head2 Communication Process --> Biomaj
+
+=head3 procedure Info
+
+ Title : Info
+ Usage : Info($msg)
+ Prerequisite : none
+ Fonction : Imprime sur STDOUT un message pour info
+ Returns : none
+ Args : $msg
+ Globals : none
+
+=cut
+sub Info
+{
+ my $msg = shift;
+ $msg = "" if (!defined($msg));
+ print STDOUT "$msg\n";
+ return;
+}
+
+=head3 procedure Warning
+
+ Title : Warning
+ Usage : Warning($msg)
+ Prerequisite : none
+ Fonction : Imprime sur STDOUT un message warning (Capte par Biomaj par la balise $ENV{PP_WARNING})
+ Returns : none
+ Args : $msg
+ Globals : none
+
+=cut
+sub Warning
+{
+ my $msg = shift;
+ $msg = "" if (!defined($msg));
+ print STDOUT "$ENV{PP_WARNING}$msg\n";
+ return;
+}
+
+=head3 procedure Error
+
+ Title : Error
+ Usage : Error($msg)
+ Prerequisite : none
+ Fonction : Imprime sur STDERR un message et quitte le programme avec un code de retour -1
+ Returns : none
+ Args : $msg
+ Globals : none
+
+=cut
+sub Error
+{
+ my $msg = shift;
+ $msg = "" if (!defined($msg));
+ print STDERR "$msg\n";
+ exit(-1);
+}
+
+=head3 procedure clearOutputFiles
+
+ Title : clearOutputFiles
+ Usage : clearOutputFiles($tag)
+ Prerequisite : none
+ Fonction : Vide les variables $OUTPUT_FILES et $OUTPUT_FILES_VOLATILE selon $tag
+ Returns : none
+ Args : $tag : ("all", "dependence" ou "volatile")
+ : Selon la valeur utilisee, la (les) liste(s) correspondantes sera(ont) vidée(s)
+ : Defaut : "all"
+ Globals : $OUTPUT_FILES et $OUTPUT_FILES_VOLATILE
+
+=cut
+sub clearOutputFiles
+{
+ my $tag = shift;
+
+ $tag = "all" if ( !defined($tag) || $tag eq "" );
+
+ &Error("clearOutputFiles($tag) : $tag --> no valid option. [\"\",\"dependence\",\"volatile\",\"all\"]") if ( $tag !~ /(all|volatile|dependence)/ );
+
+ if ( $tag eq "all" || $tag eq "volatile" )
+ {
+ $OUTPUT_FILES_VOLATILE = "";
+ }
+
+ if ( $tag eq "all" || $tag eq "dependence" )
+ {
+ $OUTPUT_FILES = "";
+ }
+ return;
+}
+
+=head3 procedure outputFile
+
+ Title : outputFile
+ Usage : outputFile($file,$tag)
+ Prerequisite : none
+ Fonction : Ajout le fichier $file a $OUTPUT_FILES ou $OUTPUT_FILES_VOLATILE (s'il n'est pas deja renseigne)
+ Returns : none
+ Args : $file : fichier produit par le process
+ : $tag : etiquette du fichier ("dependence" ou "vaolatile")
+ : Defaut : "dependence"
+ Globals : $OUTPUT_FILES et $OUTPUT_FILES_VOLATILE
+
+=cut
+sub outputFile
+{
+ my $file = shift;
+ my $tag = shift;
+
+ $tag = "dependence" if ( !defined($tag) || $tag eq "" );
+ &Error("outputFile($file,$tag) : $tag --> no valid option. [\"\",\"volatile\",\"dependence\"]") if ( $tag !~ /(volatile|dependence)/ );
+
+ if ( $tag eq "volatile" )
+ {
+ $OUTPUT_FILES_VOLATILE .= "$file " if ( $OUTPUT_FILES_VOLATILE !~ /$file/ );
+ }
+ else
+ {
+ $OUTPUT_FILES .= "$file " if ( $OUTPUT_FILES !~ /$file/ );
+ }
+
+ return;
+}
+
+=head3 procedure printOutputFiles
+
+ Title : printOutputFiles
+ Usage : printOutputFiles()
+ Prerequisite : none
+ Fonction : Imprime sur STDOUT les fichiers des listes $OUTPUT_FILES et $OUTPUT_FILES_VOLATILE
+ : avec le tag $ENV{PP_DEPENDENCE} ou $ENV{PP_DEPENDENCE_VOLATILE}
+ Returns : none
+ Args : none
+ Globals : $OUTPUT_FILES et $OUTPUT_FILES_VOLATILE
+
+=cut
+sub printOutputFiles
+{
+ if ( $OUTPUT_FILES ne "" )
+ {
+ foreach my $ofile (split /\s+/, $OUTPUT_FILES)
+ {
+ print STDOUT "$ENV{PP_DEPENDENCE}$ofile\n";
+ }
+ }
+
+ if ( $OUTPUT_FILES_VOLATILE ne "" )
+ {
+ foreach my $ofile (split /\s+/, $OUTPUT_FILES_VOLATILE)
+ {
+ print STDOUT "$ENV{PP_DEPENDENCE_VOLATILE}$ofile\n";
+ }
+ }
+
+ return;
+}
+
+=head2 Repertoires
+
+=head3 function getFlatDir
+
+ Title : getFlatDir
+ Usage : getFlatDir()
+ Prerequisite : none
+ Fonction : Retourne le nom du repertoire "flat"
+ Returns : String
+ Args : none
+ Global : $LOG_LINK
+
+=cut
+sub getFlatDir
+{
+ return $FLAT_DIR;
+}
+
+=head3 function getLogDir
+
+ Title : getLogDir
+ Usage : getLogDir()
+ Prerequisite : none
+ Fonction : Retourne le nom du repertoire "log"
+ Returns : String
+ Args : none
+ Global : $LOG_LINK
+
+=cut
+sub getLogDir
+{
+ return $LOG_DIR;
+}
+
+=head3 function getCurrentLink
+
+ Title : getCurrentLink
+ Usage : getCurrentLink()
+ Prerequisite : none
+ Fonction : Retourne le nom du lien "current"
+ Returns : String
+ Args : none
+ Global : $CURRENT_LINK
+
+=cut
+sub getCurrentLink
+{
+ return $CURRENT_LINK;
+}
+
+=head3 function getFuturReleaseLink
+
+ Title : getFuturReleaseLink
+ Usage : getFuturReleaseLink()
+ Prerequisite : none
+ Fonction : Retourne le nom du lien "future_release"
+ Returns : String
+ Args : none
+ Global : $FUTUR_RELEASE_LINK
+
+=cut
+sub getFuturReleaseLink
+{
+ return $FUTUR_RELEASE_LINK;
+}
+
+=head3 function getRemoteRelease
+
+ Title : getRemoteRelease
+ Usage : getRemoteRelease()
+ Prerequisite : none
+ Fonction : Retourne la release de la banque en cour de mise a jour
+ Returns : String
+ Args : none
+ Env : remoterelease (Biomaj)
+
+=cut
+sub getRemoteRelease
+{
+ return $ENV{'remoterelease'};
+}
+
+=head3 function getBlastDbDir
+
+ Title : getBlastDbDir
+ Usage : getBlastDbDir()
+ Prerequisite : none
+ Fonction : Retourne le nom du repertoire par defaut pour "blastdb"
+ Returns : String
+ Args : none
+ Global : $BLASTDB_DIR
+
+=cut
+sub getBlastDbDir
+{
+ return $BLASTDB_DIR;
+}
+
+=head3 function getPathBlastDbDir
+
+ Title : getPathBlastDbDir
+ Usage : getPathBlastDbDir()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du repertoire pour les alias blast
+ : Retourne ENV{BLASTDB} si elle est renseignee
+ : Retourne ENV{'datadir'}/".&getBlastDbDir() sinon
+ Returns : String
+ Args : none
+ Env : BLASTDB, datadir (placee par Biomaj)
+
+=cut
+sub getPathBlastDbDir
+{
+ if ( !exists($ENV{BLASTDB}) || $ENV{BLASTDB} eq "" || !-d($ENV{BLASTDB}) )
+ {
+ $ENV{BLASTDB} = "$ENV{'datadir'}/".&getBlastDbDir();
+ &Warning("the environment variable BLASTDB is not set. Default value is $ENV{BLASTDB}.");
+ }
+ return $ENV{BLASTDB};
+}
+
+=head3 function getPathDirVersion
+
+ Title : getPathDirVersion
+ Usage : getPathDirVersion()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du repertoire de production de la banque
+ Returns : String
+ Args : none
+ Env : datadir, dirversion (placee par Biomaj)
+
+=cut
+sub getPathDirVersion
+{
+ my $path_dir_version = "$ENV{'datadir'}/$ENV{'dirversion'}";
+ return $path_dir_version;
+}
+
+=head3 function getPathFuturReleaseLink
+
+ Title : getPathFuturReleaseLink
+ Usage : getPathFuturReleaseLink()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du lien "future_release"
+ Returns : String
+ Args : none
+ Globals : none
+
+=cut
+sub getPathFuturReleaseLink
+{
+ my $future_release_link = &getPathDirVersion()."/".&getFuturReleaseLink();
+ return $future_release_link;
+}
+
+=head3 function getPathFuturReleaseDirName
+
+ Title : getPathFuturReleaseDirName
+ Usage : getPathFuturReleaseDirName()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du repertoire pointe par le lien "future_release"
+ Returns : String
+ Args : none
+ Globals : none
+
+=cut
+sub getPathFuturReleaseDirName
+{
+ my $future_release_link = &getPathFuturReleaseLink();
+ chdir($future_release_link);
+
+ my $future_release_dir = `pwd`;
+ chomp($future_release_dir);
+ return $future_release_dir;
+}
+
+=head3 function getPathFuturReleaseFlatDir
+
+ Title : getPathFuturReleaseFlatDir
+ Usage : getPathFuturReleaseFlatDir()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du repertoire "flat" de la future release
+ Returns : String
+ Args : none
+ Globals : none
+
+=cut
+sub getPathFuturReleaseFlatDir
+{
+ my $future_release_flat_dir = &getPathFuturReleaseDirName();
+ $future_release_flat_dir .= "/".&getFlatDir();
+ return $future_release_flat_dir;
+}
+
+=head3 function getPathFuturReleaseLogDir
+
+ Title : getPathFuturReleaseLogDir
+ Usage : getPathFuturReleaseLogDir()
+ Prerequisite : none
+ Fonction : Retourne le chemin absolu du repertoire "log" de la future release
+ Returns : String
+ Args : none
+ Globals : none
+
+=cut
+sub getPathFuturReleaseLogDir
+{
+ my $future_release_log_dir = &getPathFuturReleaseDirName();
+ $future_release_log_dir .= "/".&getLogDir();
+ return $future_release_log_dir;
+}
+
+=head3 function getPathFuturReleaseMyDir
+
+ Title : getPathFuturReleaseMyDir
+ Usage : getPathFuturReleaseMyDir($myDir)
+ Prerequisite : none
+ Fonction : Concatene $myDir au chemin absolu du repertoire contenant la release au cours de mise a jour
+ Returns : String : chemin absolu du repertoire $myDir de la futur release
+ Args : $myDir : Repertoire
+ Globals : none
+
+=cut
+sub getPathFuturReleaseMyDir
+{
+ my $myDir = shift;
+ $myDir = "" if ( !defined($myDir) );
+
+ my $future_release_my_dir = &getPathFuturReleaseDirName();
+ $future_release_my_dir .= "/$myDir";
+ return $future_release_my_dir;
+}
+
+=head2 Execution de commande
+
+=head3 function executeCmdSystem
+
+ Title : executeCmdSystem
+ Usage : executeCmdSystem($cmdLine,$outputfile)
+ Prerequisite : none
+ Fonction : Si $outptfile est definit, ajoute ce fichier comme sortie de la ligne de commande ">> $outputfile"
+ : Execute la ligne de commande et verifie que la valeur de retour egale 0. Sinon &Error().
+ Returns : La commande executee.
+ Args : $cmdLine : ligne de commande a executer
+ : $outputfile : fichier de sortie
+ Globals : none
+
+=cut
+sub executeCmdSystem
+{
+ my ($cmdLine,$outputfile) = (shift,shift);
+
+ if ( defined($outputfile) && $outputfile ne "" )
+ {
+ $cmdLine .= " >> $outputfile";
+ }
+
+ system($cmdLine) == 0 or &Error("system >$cmdLine< a echoue : valeur de retour ".($? >> 8));
+ return $cmdLine;
+}
+
+=head3 procedure executeBatch
+
+ Title : executeBatch
+ Usage : executeBatch($ra_cmdLine,$system,$bank,$option)
+ Prerequisite : none
+ Fonction : Execute une suite de commandes systeme via differentes methode (sh ou cluster)
+ Returns : none
+ Args : $ra_cmdLine : Reference sur array contennat les lignes de commande a executer
+ : $system : systeme a utiliser (sh pbs ... ...)
+ : $bank : nom de la banque (pour nommer le fichier a executer si utilisation de cluster. Peut etre vide)
+ : $option : les options a utiliser. Vide pour les options par defaut(voir ci-dessous)
+ Globals : none
+
+ Definition des options pour l'utilisation du calcul distribue :
+ L'executable et les options a utiliser pour le calcul distribue sont definis dans le fihier "unix_command_system.cfg".
+ Exemple :
+ - Executable pour PBS --> il faut definir une variable "EXECUTE_BATCH_CMD_PBS=/path/qsub"
+ - Executable pour SGE --> il faut definir une variable "EXECUTE_BATCH_CMD_SGE=/path/qsub"
+
+ - Options par defaut pour PBS --> il faut definir une variable "EXECUTE_BATCH_OPTION_PBS=options par defaut"
+ - Options par defaut pour SGE --> il faut definir une variable "EXECUTE_BATCH_OPTION_SGE=options par defaut"
+ - Options particulieres pour PBS --> il faut definir une variable "EXECUTE_BATCH_OPTION_PBS_OPTIONNAME=options pour OPTIONNAME"
+ ...
+
+=cut
+sub executeBatch
+{
+ my ($ra_cmdLine,$system,$bank,$option) = (shift,shift,shift,shift);
+ $system = "sh" if ( !defined($system) );
+ $option = ( !defined($option) ) ? "" :"_".uc($option);
+ $bank = time if ( !defined($bank) );
+
+ my %h_cmd;
+ &readCfgFile(\%h_cmd);
+
+ if ($system ne "" && $system ne "sh")
+ {
+ $system = uc($system);
+ &Error("La commande pour --execute pbs n'est pas définit dans unix_command_system.cfg ( EXECUTE_BATCH_CMD_$system=? )!!\n") if ( !exists($h_cmd{"EXECUTE_BATCH_CMD_$system"}) );
+
+ my $execute_cmd = $h_cmd{"EXECUTE_BATCH_CMD_$system"};
+ my $execute_option = ( exists($h_cmd{"EXECUTE_BATCH_OPTION_$system$option"}) ) ? $h_cmd{"EXECUTE_BATCH_OPTION_$system$option"} : "";
+
+ open (RUNBATCH,">run_$bank.sh");
+ print RUNBATCH "#!/bin/bash\n";
+ foreach my $cmd ( @{$ra_cmdLine} )
+ {
+ print RUNBATCH "if [ \$? -eq 0 ]\nthen\n\t";
+ print RUNBATCH "$cmd\n";
+ print RUNBATCH "else\n\texit \$?\nfi\n";
+ }
+ close (RUNBATCH);
+
+ system ("$h_cmd{UNIX_CHMOD} +x run_$bank.sh");
+
+ my $cmd_batch = "$execute_cmd $execute_option run_$bank.sh";
+
+ &Info( "Execute : ".&executeCmdSystem($cmd_batch) );
+
+# system("$h_cmd{UNIX_RM} run_$bank.sh*");
+ }
+ elsif ($system eq "sh")
+ {
+ foreach my $cmd ( @{$ra_cmdLine} )
+ {
+ &Info( "Execute : ".&executeCmdSystem($cmd) );
+ }
+ }
+
+ return;
+}
+
+=head3 function executeGetz
+
+ Title : executeGetz
+ Usage : executeGetz($request,$outputfile)
+ Prerequisite : SRS est correctement configure sur le system
+ : Le requete sera effectuee sur les index SRS du repertoire offline de la banque
+ Fonction : Execute une requete ("$request") getz. Le rsultat est dans le fichier $outputfile
+ Returns : La commande executee pour effectuer la requete
+ Args : $request : requete SRS (sans l'appel a la commande getz)
+ : $outputfile : fichier de sortie pour la requete
+ Globals : none
+
+=cut
+sub executeGetz
+{
+ my ($request,$outputfile) = (shift,shift);
+
+ &Error("Pas de requete pour la commande getz.") if ( !defined($request) || $request eq "" );
+
+ my $cmd = "getz -off $request";
+ if ( defined($outputfile) && $outputfile ne "" )
+ {
+ $cmd .= " > $outputfile";
+ }
+
+ print STDOUT `$cmd`;
+ return $cmd;
+}
+
+=head2 Utils
+
+=head3 function getSequenceType
+
+ Title : getSequenceType
+ Usage : getSequenceType($fastaFile,$bool_compress)
+ Prerequisite : none
+ Fonction : Determine le type de sequence du fichier fasta $fastaFile
+ Returns : $bool_prot_seq : 1 pour sequences proteiques
+ : 0 pour sequences nucleiques
+ Args : $fastaFile : fichier fasta
+ : $bool_compress : 1 si le fichier est compresse sinon 0 ou ""
+ Globals : none
+
+=cut
+sub getSequenceType
+{
+ my ($file,$compress) = (shift,shift);
+ $compress = ( !defined($compress) || !$compress ) ? 0 : 1;
+
+ my %h_cmd;
+ &readCfgFile(\%h_cmd);
+
+ my $cmd_head = "";
+
+ if ($compress)
+ {
+ $file .= ".gz" if ( $file !~ /\.gz$/ );
+ $cmd_head = "$h_cmd{UNIX_ZCAT} $file | $h_cmd{UNIX_HEAD} -n 1000;";
+ }
+ else
+ {
+ $cmd_head = "$h_cmd{UNIX_HEAD} -n 1000 $file;";
+ }
+
+ my $seq = `$cmd_head`;
+ my @seq = split /\n+/, $seq;
+ $seq = "";
+ foreach my $line (@seq)
+ {
+ $seq .= $line if ( $line !~ /^>/ );
+ }
+
+# fatsa type detection : if DEQILFP found in the first 300 line
+# then fasta type = protein else ==> fasta type = nucleic
+ my $bool_prot_seq = ($seq =~ /[EQILFP]/gi) ? 1 : 0;
+ return $bool_prot_seq;
+}
+1;
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/fastacmdTLSE.pl
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/fastacmdTLSE.pl (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/fastacmdTLSE.pl 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,535 @@
+#!/usr/bin/perl
+#
+#
+# Author : Genopole Toulouse - Yoann.Beausse at toulouse.inra.fr
+#
+#-------------------------------------------------------------------------------
+
+=head1 NAME
+
+fastacmdTLSE.pl - Generation de fichiers fasta a partir d'index blast
+
+=head1 SYNOPSIS
+
+fastacmdTLSE.pl [--dbname myBank] [--bank bankName1,[bankName2],...] [--fasta fastaFile1,[fastaFile2],...]
+ [--compress T/F] [--execute system] [--test] [--verbose] [--help]
+
+=head1 Description
+
+Ce script fait partie des PostProcess de BioMaJ.
+Permet de generer un fichier fasta a partir des index blast d'une banque.
+
+=over 10
+
+=item * Generation de fichiers fasta a partir des index blast d'une banque via fastacmd
+
+=item * Test la validite du fichier obtenu
+
+=item * Creation d'un lien symbolique 'blast' sur le repertoire flat du repertoire de production de la banque BioMaJ
+
+=item * Creation d'un fichier alias blast dans le repertoire pointe par la variable d'environnement $BLASTDB
+
+=back
+
+=head1 VERSION
+
+Version 0.9
+March 2007
+
+=head1 COPYRIGHT
+
+This program is distributed under the CeCILL License. (http://www.cecill.info)
+
+=head1 ARGUMENTS
+
+B<--dbname (-d) myBank>
+
+ BioMaJ bank name
+ default = $ENV{dbname}
+
+B<--bank (-b) 'bankName1[ bankName2[ bankName3]]'>
+
+ Liste des banques blast dont un fichier fasta doit etre genere.
+ Si l'option n'est pas renseignee, c'est --dbname qui sera utilise.
+ Les noms de banques doivent etre separes par des espaces.
+ Ex : --bank 'bank_prot bank_nuc'.
+ default = [valeur de --dbname]
+
+B<--fasta (-f) 'fastaFile1[ fastaFile2[ fastaFile3]]'>
+
+ Nom des fichiers fasta pour chaque banque de --bank
+ Le premier fichier correspond a la premiere bank ect...
+ Si --fasta n'est pas renseigne, le nom du fichier fasta sera le meme que le nom de la banque.
+ Si --bank pocede 3 valeurs, --fasta doit comporter 3 noms de fichier ou aucun
+ (dans le cas ou on veut donner le meme nom au fichier fasta qu'aux banques)
+ default = '--bank'
+
+B<--compress (-c) T/F>
+
+ Compression via gzip du fichier fasta.
+ defaut = T
+
+B<--execute (-e) system>
+
+ La ligne de commande pour la generation du fichier fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque systeme, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+B<--test (-t)>
+
+ Execution d'un test pour verifier la coherence du fichier fasta obtenu.
+ VERSION 0.9 --> NON OPERATIONNEL
+
+B<--verbose (-v)>
+
+B<--help (-h)>
+
+=head1 AUTHOR
+
+ Yoann Beausse <Yoann.Beausse at toulouse.inra.fr>
+ Plateforme Bioinformatique - Genopole Midi-Pyrenees Toulouse
+
+=head1 COMMENTS
+
+=head2 Prerequis
+
+ Ce script fait appel a la librairie Perl 'ProcessBiomajLib.pm'.
+ Cette librairie et fastacmdTLSE.pl doivent etre presents dans le repertoire des Process de BioMaJ :
+ ($BIOMAJ_ROOT/conf/process/).
+
+ Pour les appels aux commandes systeme, le fichier 'unix_command_system.cfg' doit etre renseigne,
+ notament pour l'acces aux commandes 'fastacmd' et 'formatdb'.
+
+=head2 Repertoire de sortie
+
+ Tous les fichiers fasta produits sont places dans un repertoire nomme 'fasta' (cf $FASTA_DIR),
+ au meme niveau que 'flat', le repertoire des rawdata BioMaJ.
+ Un lien symbolique 'blast' (cf $BLAST_DIR) est place sur le repertoire 'flat'.
+
+=head2 Fichier Alias Blast
+
+ Les fichiers alias .pal ou .nal sont places par defaut dans le repertoire de la variable d'environnement 'BLASTDB'.
+ Si BLASTDB n'est pas initialisee, par defaut, les alias sont places dans le repertoire 'datadir/blastdb'.
+ (datadir une variable defini dans BioMaJ).
+ Si necessaire, le repertoire datadir/blastdb est cree a la premier execution.
+ Pour Changer le nom du repertoire 'blastdb' modifiez ProcessBioamjLib::$BLASTDB_DIR ou renseignez la variable d'envirennement BLASTDB
+
+=head2 Execution
+
+ Il y a 2 modes d'execution .
+
+ 1 - mode par defaut, sur la machine locale (--execute sh).
+ 2 - en batch sur un cluster via une soumission a un systeme de queue. (--execute nomDuSystem) ex : pbs, sge, ...
+ L execution reste sequentielle mais delocalisee.
+ Pour definir un nouveau systeme, voir ProcessBiomajLib::executeBatch()
+
+=head2 Variables d'Environnement
+
+ BLASTDB
+ Repertoire ou les fichiers alias blast seront crees.
+ Si BLASTDB n'est pas renseignee, le repertoire par defaut sera 'data.dir'/blastdb
+ (data.dir = propriete de BioMaJ - voir global.properties ou myBank.properties.)
+
+ Verification de l'environnement
+ La fonction ProcessBiomajLib::checkBiomajEnvironment() verifie que l'environnement d'execution du Process est correcte pour une interaction avec BioMaJ
+
+=head2 Warning
+
+ Version 0.9 : L'option --test n'est pas active. Il faut revoir la fonction Test()
+
+=head2 Exemples d'utilisation
+
+ La Banque BioMaJ se nomme : "est"
+ Exemple avec 3 banques blast dans le repertoire flat (est_human est_mouse est_other) et la banque qui regroupe les 3 autres :
+ est.nal
+ est_human.nal est_mouse.nal est_otehr.nal
+ est_human.00.nhr est_mouse.00.nhr est_other.00.nhr
+ est_human.00.nin est_mouse.00.nin est_other.00.nin
+ est_human.01.nhr est_other.01.nhr
+ est_human.01.nin est_other.01.nin
+ ... ...
+
+ 1) formatdbTLSE.pl
+ Par defaut, si --bank n'est pas precise, l'argument recoit le nom de la banque BioMaJ.
+ De meme, si --fasta n'est pas precise, il recoit la valeur de --bank
+ Ici, il y aura creation d'un fichier fasta est.gz (il y a compression via gzip par defaut) regroupant toutes les sequences de est_human, est_mouse et est_other
+
+ 2) formatdbTLSE.pl --bank 'est_human est_mouse est_other'
+ 2') formatdbTLSE.pl --bank 'est_human est_mouse est_other' --fasta 'est_human est_mouse est_other'
+ Il y aura creation de 3 fichiers fasta : est_human.gz est_mouse.gz est_other.gz
+
+ 3 ) formatdbTLSE.pl --bank 'est_human est_mouse est_other' --fasta 'toto1 toto2 toto3'
+ Il y aura création de 3 fichiers fasta : toto1.gz(pour la banque est_human) toto2.gz(pour la banque est_mouse) toto3.gz(Pour la banque est_other)
+
+ 4 ) formatdbTLSE.pl --bank 'est_human est_mouse est_other' --fasta 'toto1 toto2'
+ Ici, le programme sort sur erreur ( exit(-1) )
+ Il faut le meme nombre d'argument pour --bank et --fasta
+
+=cut
+
+
+use strict;
+use Getopt::Long;
+use lib ("$ENV{BIOMAJ_ROOT}/conf/process/.");
+use ProcessBiomajLib;
+
+# Execute path var
+my %H_CMD;
+
+my $FASTACMD = "fastacmd";
+
+# Arguments du programme
+my $DB_NAME = "";
+my ($BANK_LIST,$OUTPUT_FILE) = ("","");
+my (@A_BANK_LIST, at A_OUTPUT_FILE);
+my $COMPRESS = "T";
+my $BATCH_SYSTEM = "sh";
+my $HELP;
+my $VERBOSE;
+my $TEST;
+
+# Variables globales au programme
+my $PATH_BLAST_DIR;
+my $PATH_FASTA_DIR;
+my $PATH_FLAT_DIR;
+my $PATH_BLASTDB_DIR;
+
+my $FASTA_DIR = "fasta";
+my $INDEX_DIR = "blast";
+
+# Traitement des arguments
+my $result = GetOptions ("dbname=s" => \$DB_NAME,
+ "bank=s" => \$BANK_LIST,
+ "fasta=s" => \$OUTPUT_FILE,
+ "compress=s" => \$COMPRESS, #T/F
+ "execute=s" => \$BATCH_SYSTEM,
+ "test" => \$TEST,
+ "verbose" => \$VERBOSE,
+ "help" => \$HELP,
+ );
+
+# MAIN
+MAIN:{
+
+ &usage() if ($HELP);
+ &initGlobalVar;
+
+ # Creation du repertoire fasta et chdir dedans
+ if ( !-e $PATH_FASTA_DIR )
+ {
+ mkdir "$PATH_FASTA_DIR";
+ &Info("mkdir $PATH_FASTA_DIR .");
+ }
+ chdir "$PATH_FASTA_DIR";
+
+ # Recup le nombre des sous banques a traiter
+ my $cpt = $#A_BANK_LIST;
+
+ # Pour chaqu'une de ces sous banques
+ for (my $i=0 ; $i<=$cpt ; $i++)
+ {
+ my $bank = $A_BANK_LIST[$i];
+ my $ofile = $A_OUTPUT_FILE[$i];
+
+ &computeFastaFile($bank,$ofile);
+ &test() if ($TEST);
+
+ my $bool_prot_seq = &getSequenceType($ofile,$COMPRESS);
+ &createAliasFile($bank,$bool_prot_seq);
+ }
+
+ # On place un lien symbolique blast sur le repertoire flat
+ &createLinkIndexDir;
+
+}
+#############################################################################
+
+=head1 Routines
+
+=head2 function computeFastaFile
+
+ Title : computeFastaFile
+ Usage : computeFastaFile($bank,$ofile)
+ Prerequiiste : none
+ Fonction : Chaine de traitement pour la banque $bank
+ Returns : none
+ Args : $bank : nom de la banque a traiter
+ : $ofile : nom du fichier de sortie fasta
+ Globals : none
+
+=cut
+sub computeFastaFile()
+{
+ my ($bank,$ofile) = (shift,shift);
+
+ &clearOutputFiles();
+ &outputFile(&createFastaFile($bank,$ofile));
+ &printOutputFiles();
+ return;
+}
+
+=head2 procedure createFastaFile
+
+ Title : createFastaFile
+ Usage : createFastaFile($bank,$ofile)
+ Prerequisite : none
+ Fonction : Constitue la ligne de commande pour fastacmd et l'execute
+ Returns : none
+ Args : $bank : nom de la banque
+ : $ofile : nom du fichier fasta de sortie
+ Globals : $FASTACMD : path pour les commandes system
+ : $PATH_FLAT_DIR : path du repertoire flat de la release
+ : $COMPRESS : boolean. 1 si il faut compresser le fichiei fasta
+ : $BATCH_SYSTEM : systeme pour l'execution des lignes de commandes
+
+=cut
+sub createFastaFile
+{
+ my ($bank,$ofile) = (shift,shift);
+ my @a_cmd;
+ my $product_file = "$PATH_FASTA_DIR/$ofile";
+
+ push (@a_cmd,"$FASTACMD -D 1 -d $PATH_FLAT_DIR/$bank -o $product_file");
+
+ if ($COMPRESS)
+ {
+ push (@a_cmd,"$H_CMD{UNIX_RM} -f $product_file.gz") if (-e("$product_file.gz"));
+ push (@a_cmd,"$H_CMD{UNIX_GZIP} $product_file");
+ $product_file = "$product_file.gz";
+ }
+
+ &ProcessBiomajLib::executeBatch(\@a_cmd,$BATCH_SYSTEM,$bank);
+
+ if ( !-e($product_file) || -z($product_file) )
+ {
+ &Error("Output file >$product_file< not exist or null !");
+ }
+
+ return $product_file;
+}
+
+=head2 procedure createAliasFile
+
+ Title : createAliasFile
+ Usage : createAliasFile($bank,$bool_prot_seq)
+ Prerequisite : none
+ Fonction : Cree le fichier alias pour blast
+ Returns : none
+ Args : $bank : nom de la banque
+ : $bool_prot_seq : 1 pour prot, sinon 0
+ Globals : Variable l'environnement BLASTDB (rien n'est fait si elle n'existe pas)
+ : $BLAST_DIR : "blast"
+
+=cut
+sub createAliasFile()
+{
+ my ($bank,$bool_prot_seq) = (shift,shift);
+
+ my $extension = &getAliasFileExtension($bool_prot_seq);
+ my $release = &ProcessBiomajLib::getRemoteRelease();
+
+ my $file_alias = "$PATH_BLASTDB_DIR/$bank"."$extension";
+ open (ALIAS,">$file_alias");
+ print ALIAS <<END
+# Alias file
+TITLE $bank $release
+#
+DBLIST $PATH_BLAST_DIR/$bank
+
+END
+;
+ close(ALIAS);
+ return;
+}
+
+=head2 function getAliasFileExtension
+
+ Title : getAliasFileExtension
+ Usage : getAliasFileExtension($bool_prot_seq)
+ Prerequisite : none
+ Fonction : Selectionne la bonne extension du fichier alias blast (.pal ou .nal)
+ Returns : $extension : ".pal" si prot, sinon ".nal"
+ Args : $bool_prot_seq : 1 pour prot, sinon 0
+ Globals : none
+
+=cut
+sub getAliasFileExtension()
+{
+ my $bool_prot_seq = shift;
+ my $extension = ($bool_prot_seq) ? ".pal" : ".nal";
+
+ return $extension;
+}
+
+=head2 procedure createLinkIndexDir
+
+ Title : createLinkIndexDir
+ Usage : createLinkIndexDir()
+ Prerequisite : none
+ Fonction : Place un lien symbolique blast sur le repertoire flat
+ Returns : none
+ Args : none
+ Globals : $PATH_FLAT_DIR : path du repertoire flat
+
+=cut
+sub createLinkIndexDir
+{
+ my $cmd = "";
+
+ $cmd = "$H_CMD{UNIX_LN} -s $PATH_FLAT_DIR $PATH_BLAST_DIR";
+ `$cmd` if ( !-e($PATH_BLAST_DIR) );
+ return;
+}
+
+=head2 function test
+
+ Title : test
+ Usage : test()
+ Prerequisite :
+ Fonction :
+ Returns : $bool : 1 ou 0
+ Args :
+ Globals :
+
+=cut
+sub test()
+{
+ return 1;
+}
+
+=head2 procedure initGlobalVar
+
+ Title : initGlobalVar
+ Usage : initGlobalVar()
+ Prerequisite : none
+ Fonction : Recupere les valeurs du fichier tmp/bank.var et controle la validite des arguments
+ Returns : none
+ Args : none
+ Globals :
+
+=cut
+sub initGlobalVar()
+{
+ &ProcessBiomajLib::checkBiomajEnvironment();
+ &ProcessBiomajLib::readCfgFile(\%H_CMD);
+
+ ### Variable specifique a la banque ###
+ $DB_NAME = $ENV{'dbname'} if ( $DB_NAME eq "" );
+
+ $PATH_FLAT_DIR = &ProcessBiomajLib::getPathFuturReleaseFlatDir();
+ $PATH_BLAST_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($INDEX_DIR);
+ $PATH_FASTA_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($FASTA_DIR);
+
+ $PATH_BLASTDB_DIR = &ProcessBiomajLib::getPathBlastDbDir();
+
+ &Error("No such flat directory for $DB_NAME bank.") if ( !-e($PATH_FLAT_DIR) );
+
+ ### Variable du programme ###
+ &Error("nonvalid option : --compress $COMPRESS") if ( $COMPRESS !~ /(T|F)/ );
+ $COMPRESS = ( $COMPRESS =~ /T/i ) ? 1 : 0;
+ $BANK_LIST = $DB_NAME if ($BANK_LIST eq "");
+ $OUTPUT_FILE = $BANK_LIST if ($OUTPUT_FILE eq "");
+
+ @A_BANK_LIST = split /\s+/, $BANK_LIST;
+ @A_OUTPUT_FILE = split /\s+/, $OUTPUT_FILE;
+
+ &usage("No bank of defines") if ( $#A_BANK_LIST == -1 );
+ &usage("There is not the same number of bank only of output files\nOption --bank_list and --output_file_list") if ($#A_BANK_LIST != $#A_OUTPUT_FILE);
+
+ $FASTACMD = $H_CMD{FASTACMD} if ( defined($H_CMD{FASTACMD}) );
+
+ return;
+}
+
+=head2 procedure usage
+
+ Title : usage
+ Usage : usage($msg)
+ Prerequisite : none
+ Fonction : Affiche $msg + l'usage du script + exit(1)
+ Returns : none
+ Args : $msg : message precisant l'erreur
+ Globals : none
+
+=cut
+sub usage()
+{
+
+ my $message = shift;
+
+print STDERR "$message\n" if ( defined($message) && $message ne "" );
+
+print STDOUT <<END
+
+fastacmdTLSE.pl [--dbname myBank] [--bank bankName1,[bankName2],...] [--fasta fastaFile1,[fastaFile2],...]
+ [--compress T/F] [--execute system] [--test] [--verbose] [--help]
+
+Arguments :
+
+ --dbname (-d) : bank name (BioMaJ) [deafault : $ENV{dbname}]
+ --bank (-b) : bank name (blast) (without extension)
+ --fasta (-f) : output fasta file (same order that bank)
+ --compress (-c) : T/F [T] (compress output fasta file)
+ --execute (-e) : [sh] (exec mode)
+ --test (-t) : test le fichier fasta obtenu
+ --verbose (-v)
+ --help (-h) : ce message
+
+--dbname (-d) myBank
+
+ BioMaJ bank name
+ default = $ENV{dbname}
+
+--bank (-b) 'bankName1[ bankName2[ bankName3]]'
+
+ Liste des banques blast dont un fichier fasta doit etre genere.
+ Si l'option n'est pas renseignee, c'est --dbname qui sera utilise.
+ Les noms de banques doivent etre separes par des espaces.
+ Ex : --bank 'bank_prot bank_nuc'.
+ default = [valeur de --dbname]
+
+--fasta (-f) 'fastaFile1[ fastaFile2[ fastaFile3]]'
+
+ Nom des fichiers fasta pour chaque banque de --bank
+ Le premier fichier correspond a la premiere bank ect...
+ Si --fasta n'est pas renseigne, le nom du fichier fasta sera le meme que le nom de la banque.
+ Si --bank pocede 3 valeurs, --fasta doit comporter 3 noms de fichier ou aucun
+ (dans le cas ou on veut donner le meme nom au fichier fasta qu'aux banques)
+ default = '--bank'
+
+--compress (-c) T/F
+
+ Compression via gzip du fichier fasta.
+ defaut = T
+
+--execute (-e) system
+
+ La ligne de commande pour la generation du fichier fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque systeme, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+--test (-t)
+
+ Execution d'un test pour verifier la coherence du fichier fasta obtenu.
+ VERSION 0.9 --> NON OPERATIONNEL
+
+--verbose (-v)
+
+--help (-h)
+
+END
+;
+ exit(-1);
+}
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/fastacmdTLSE.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/formatdbTLSE.pl
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/formatdbTLSE.pl (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/formatdbTLSE.pl 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,885 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+formatdbTLSE.pl - Formatage blast des fichiers fasta de BioMaJ
+
+=head1 SYNOPSIS
+
+formatdbTLSE.pl [--dbname myBank] [--fastahome fastadir] [--fasta regex1,[regexp2],...] [--bank bankName1,[bankName2],...]
+ [--no_parse_seqid] [--uncompress T/F] [--execute system] [--test] [--verbose] [--help]
+
+=head1 Description
+
+Ce script fait partie des PostProcess de BioMaJ.
+Utilise pour l'indexation via formatdb des fichiers fasta.
+
+=over 10
+
+=item * Creation d'index NCBI blast via formatdb a partir de fichier / banque fasta
+
+=item * Test la validite des index (VERSION 0.9 --> NON FONCTIONNELLE)
+
+=item * Creation d'un lien symbolique 'fasta' sur le repertoire flat du repertoire de production de la banque BioMaJ
+
+=item * Creation d'un fichier alias blast dans le repertoire pointe par la variable d'environnement $BLASTDB
+
+=back
+
+=head1 VERSION
+
+Version 0.9
+March 2007
+
+=head1 COPYRIGHT
+
+This program is distributed under the CeCILL License. (http://www.cecill.info)
+
+=head1 ARGUMENTS
+
+B<--dbname (-d) myBank>
+
+ BioMaJ bank name
+ default = $ENV{dbname}
+
+B<--fastahome (-F)>
+
+ nom du repertoire ou se trouve les fichiers fasta. Par defaut cette valeur vaut 'flat'
+
+B<--fasta (-f) 'regexp1[ regexp2[ regexp3]]'>
+
+ Expression reguliere perl pour selectionner les fichiers a formater
+ La premiere expression correspond aux fichiers de la premiere bank ect... ...
+ Un groupe de regexp peut contenir plusieurs regexp separes par une virgule et
+ chaque groupe d'expresions doivent etre separes par des espaces.
+ Ex : --file '*.aa,*.a *.nt'. Tous les fichier *.aa et *.a constituront la bank 'bank_prot' (cf:--bank)
+ Si il y a plus d'expressions que de nom de banques, chaque fichier fasta donnera une banque blast du meme nom.
+ default = '.*'
+
+B<--bank (-b) 'bankName1[ bankName2[ bankName3]]'>
+
+ Nom des banques a associer aux regexp de fichiers fasta de l'option --file
+ Si l'option n'est pas renseignee, chaque fichiers fasta donnera une banque blast du meme nom.
+ Les noms de banques doivent etre separes par des espaces.
+ Ex : --bank 'bank_prot bank_nuc'.
+ default = ""
+
+B<--no_parse_seqid (-n)>
+
+ Do not parse SeqId. Do not create indexes. (formatdb option -o F)
+ default = No activated
+
+B<--uncompress (-u) T/F>
+
+ Permet de determiner le comportement du programme si le(s) fichier(s) sont compresser.
+ Si True, le fichier fasta est decompresse par gunzip, indexer par formatdb puis recompresse.
+ Si False, la commande sera : gunzip -c bank.fasta | formatdb -i stdin
+ defaut = F
+
+B<--execute (-e) system>
+
+ La ligne de commande pour le formatage des fichiers fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque system, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+B<--test (-t)>
+
+ Execution d'un test pour verifier le bon formatage des banques blast.
+ VERSION 0.9 --> NON OPERATIONNEL
+
+B<--verbose (-v)>
+
+B<--help (-h)>
+
+=head1 AUTHOR
+
+ Yoann Beausse <Yoann.Beausse at toulouse.inra.fr>
+ Plateforme Bioinformatique - Genopole Midi-Pyrenees Toulouse
+
+=head1 COMMENTS
+
+=head2 Prerequis
+
+ Ce script fait appel a la librairie Perl 'ProcessBiomajLib.pm'.
+ Cette librairie et formatdbTLSE.pl doivent etre presents dans le repertoire des Process de BioMaJ :
+ ($BIOMAJ_ROOT/conf/process/).
+
+ Pour les appels aux commandes systeme, le fichier 'unix_command_system.cfg' doit etre renseigne,
+ notament pour l'acces aux commandes 'formatdb' et 'fastacmd'.
+
+=head2 Repertoire de sortie
+
+ Tous les index produits sont places dans un repertoire nomme 'blast' (cf $INDEX_DIR),
+ au meme niveau que 'flat', le repertoire des rawdata BioMaJ.
+ Un lien symbolique 'fasta' (cf $FASTA_DIR) est place sur le repertoire 'flat'.
+
+=head2 Fichier Alias Blast
+
+ Les fichiers alias .pal ou .nal sont places par defaut dans le repertoire de la variable d'environnement 'BLASTDB'.
+ Si BLASTDB n'est pas initialisee, par defaut, les alias sont places dans le repertoire 'datadir/blastdb'.
+ (datadir une variable defini dans BioMaJ).
+ Si necessaire, le repertoire datadir/blastdb est cree a la premier execution.
+ Pour Changer le nom du repertoire 'blastdb' modifiez ProcessBioamjLib::$BLASTDB_DIR ou renseignez la variable d'envirennement BLASTDB
+
+=head2 Execution
+
+ Il y a 2 modes d'execution .
+
+ 1 - mode par defaut, sur la machine locale (--execute sh).
+ 2 - en batch sur un cluster via une soumission a un systeme de queue. (--execute nomDuSystem) ex : pbs ou sge
+ L execution reste sequentielle mais delocalisee.
+ Pour definir un nouveau systeme, voir ProcessBiomajLib::executeBatch()
+
+=head2 Variables d'Environnement
+
+ BLASTDB
+ Repertoire ou les fichiers alias blast seront crees.
+ Si BLASTDB n'est pas renseignee, le repertoire par defaut sera 'data.dir'/blastdb
+ (data.dir = propriete de BioMaJ - voir global.properties ou myBank.properties.)
+
+ Verification de l'environnement
+ La fonction ProcessBiomajLib::checkBiomajEnvironment() verifie que l'environnement d'execution du Process est correcte pour une interaction avec BioMaJ
+
+=head2 Exemples d'utilisation
+
+ --fasta permet de definir des expressions regulieres PERL pour selectionner les fichiers fasta a indexer.
+ --bank permet de donner un nom a la (aux) banque(s) indexee(s)
+
+ Pour --fasta : On peut definir plusieurs expression reguliere (regexp) separees par des virgules ou des espaces.
+ Une virgule separe 2 regexp regroupant des fichiers fasta dans une meme banque.
+ Un espace separe 2 regexp regroupant des fichiers fasta de banque differentes.
+
+ Exemple avec 3 fichiers fasta de protein a index : file1 file2 file3
+
+=over 24
+
+=item 1 formatdbTLSE.pl (par defaut : '.*')
+
+ Il y aura creation de 3 banques avec 3 fichiers alias (file1.pal, file2.pal et file3.pal)
+ Chaque fichier du repertoire 'flat' est considere comme une banques blast a indexer
+
+=item 2 formatdbTLSE.pl --fasta 'file.*' (Voir 1)
+
+ Il y aura creation de 3 banques avec 3 fichiers alias (file1.pal, file2.pal et file3.pal)
+
+=item 3 formatdbTLSE.pl --fasta 'file.*' --bank 'myBank'
+
+ Il y aura creation d'une seule banque myBank.pal regroupant les index de file1 file2 et file3
+
+=item 4 formatdbTLSE.pl --fasta 'file[1-2] file3' --bank 'myBank1 myBank2'
+
+=item 4 formatdbTLSE.pl --fasta 'file1,file2 file3' --bank 'myBank1 myBank2'
+
+ Il y aura creation de 2 banques. myBank1.pal avec les index file1 et file2. myBank2.pal avec les index toto3
+
+=item 5 formatdbTLSE.pl --fasta 'file[1-2] file3' --bank 'myBank1'
+
+=item 5 formatdbTLSE.pl --fasta 'file1,file2 file3' --bank 'myBank1'
+
+ Il y aura creation de 2 banques. myBank1.pal avec les index file1 et file2. file3.pal avec les index file3
+
+=item 6 formatdbTLSE.pl --fasta 'file[1-2] file.*' --bank 'myBank1 myTotalBank'
+
+ Il y aura creation de 2 banques. myBank1.pal avec les index file1 et file2.
+ myTotalBank.pal avec les index file1 file2 et file3
+
+=back
+
+=head2 Warning
+
+ Version 0.9 : L'option --test n'est pas active. Il faut revoir la fonction Test()
+
+=cut
+
+use strict;
+use Getopt::Long;
+use lib ("$ENV{BIOMAJ_ROOT}/conf/process/.");
+use ProcessBiomajLib;
+
+my $VERSION = "0.9";
+
+# Execute path var
+my %H_CMD;
+
+my ($FORMATDB,$FASTACMD) = ("formatdb","fastacmd");
+
+my @A_BANK = ();
+my @A_REGEXP = ();
+
+# Variables globales au programme
+my $PATH_BLAST_DIR;
+my $PATH_FLAT_DIR;
+my $PATH_LOG_DIR;
+my $PATH_FASTA_DIR;
+my $PATH_BLASTDB_DIR;
+
+my $FASTA_DIR = "fasta";
+my $INDEX_DIR = "blast";
+
+my @A_LIST_FILE;
+my @A_LIST_DIR;
+my %H_ALIAS_FILE;
+
+# Arguments du programme
+my $DB_NAME;
+my $VERBOSE;
+my $UNCOMPRESS = "F";
+my $BATCH_SYSTEM = "sh";
+my $TEST;
+my $HELP;
+my $BANK_BLAST = "";
+my $INPUT_FILE_REGEXP = ".*";
+my $NO_PARSE;
+# chemin par default des fasta
+# par default rien n est fait
+
+my $FastaHome="flat";
+
+my $result = GetOptions ("dbname=s" => \$DB_NAME,
+ "bank=s" => \$BANK_BLAST,
+ "fasta=s" => \$INPUT_FILE_REGEXP, # regexp
+ "fastahome=s" => \$FastaHome,
+ "uncompress=s" => \$UNCOMPRESS, #T/F
+ "verbose" => \$VERBOSE,
+ "execute=s" => \$BATCH_SYSTEM,
+ "test" => \$TEST,
+ "help" => \$HELP,
+ "no_parse_seqid" => \$NO_PARSE,
+ );
+
+MAIN:
+{
+ &usage() if ($HELP);
+ &initGlobalVar();
+
+ # Creation du repertoire des index et chdir dedans
+ if ( !-e $PATH_BLAST_DIR )
+ {
+ mkdir "$PATH_BLAST_DIR";
+ &Info("Create repertory : $PATH_BLAST_DIR") if ($VERBOSE);
+ }
+ chdir "$PATH_BLAST_DIR";
+
+ if ( !-e $PATH_LOG_DIR )
+ {
+ mkdir "$PATH_LOG_DIR";
+ &Info("Create repertory : $PATH_LOG_DIR") if ($VERBOSE);
+ }
+
+ my $rh_list_fasta_file = &getFastaFile();
+
+ foreach my $fasta_list_nb ( keys %{$rh_list_fasta_file})
+ {
+ foreach my $fasta_file ( split /,/,$rh_list_fasta_file->{$fasta_list_nb} )
+ {
+ &Info("File : $fasta_file");
+
+ #Pour chaque fichier correspondant a l'expression reguliere
+ my $bool_prot_seq = &checkSequenceType("$PATH_FLAT_DIR/$fasta_file");
+
+ my $bank = &computeFastaFile($fasta_file,$bool_prot_seq);
+ if ( $TEST && !&test($bank) )
+ {
+ &Error("Error test de la banque >$bank< !!! ");
+ exit(-1);
+ }
+
+ my $bank_name = ( defined($A_BANK[$fasta_list_nb]) ) ? $A_BANK[$fasta_list_nb] : "";
+ &buildHashAliasFile($bank,$bool_prot_seq,$bank_name);
+ }
+ }
+
+ &createAliasFile;
+
+ # On place un lien symbolique fasta sur le repertoire flat
+ # A PASSER SOUS LE CONTROLE D'UNE OPTION
+ &createLinkFastaDir;
+}
+#############################################################################
+
+=head1 Routines
+
+=head3 function getFastaFile
+
+ Title : getFastaFile
+ Usage : getFastaFile()
+ Prerequisite : none
+ Fonction : Liste tous les fichiers des sous repertoire des rawdata (/flat)
+ : Pour chaque fichier, determine s'il correpond a une regexp
+ Returns : ref sur hash (key=numero de la regexp, value=liste des fichiers correspondant separes par ,)
+ Args : none
+ Globals : @A_LIST_DIR = liste des repertoire des rawdata (/flat)
+ : @A_LIST_FILE = liste de tous les fichiers rawdata
+ : $PATH_FLAT_DIR = Chemin absolu du repertoire flat de la nouvelle release
+
+=cut
+sub getFastaFile()
+{
+ my @a_list_fasta_file = ();
+ my %h_list_fasta_file = ();
+
+ push (@A_LIST_DIR,$PATH_FLAT_DIR);
+
+ while ( $#A_LIST_DIR != -1 )
+ {
+ &readDir( shift(@A_LIST_DIR) );
+ }
+
+ foreach my $file ( @A_LIST_FILE )
+ {
+ $file =~ s/$PATH_FLAT_DIR//;
+
+ $file=~ s/^\/// if ( $file =~ /^\//);
+
+ &selectFastaFile(\%h_list_fasta_file,$file);
+ }
+
+ return \%h_list_fasta_file;
+}
+
+=head3 procedure selectFastaFile
+
+ Title : selectFastaFile
+ Usage : selectFastaFile($rh_list_file,$file)
+ Prerequisite : none
+ Fonction : classe le $file (dans $rh_list_file) selon son appartenance a une regexp de --fasta
+ Returns : none
+ Args : $rh_list_file : ref sur hash contenant la liste des fichiers fasta classe par regexp.
+ les regexp sont numerote de 0 a n selon leur ordre de declaration dans --fasta
+ : $file = fichier a tester
+ Globals : @A_REGEXP = tableau des regexp de --fasta
+
+=cut
+sub selectFastaFile
+{
+ my ($rh_list_file,$file) = (shift,shift);
+
+ for( my $i=0 ; $i<=$#A_REGEXP ; $i++)
+ {
+ my @a_regexp = split /,/, $A_REGEXP[$i];
+ foreach my $regexp (@a_regexp)
+ {
+ if ( $file =~ /^$regexp$/ )
+ {
+ $rh_list_file->{$i} .= "$file,";
+ }
+ }
+ }
+}
+
+=head3 procedure readDir
+
+ Title : readDir
+ Usage : readDir($dir)
+ Prerequisite : none
+ Fonction : Liste tous les fichiers et repertoire de $dir
+ : Ajoute les fichiers dans @A_LIST_FILE et les repertoires dans @A_LIST_DIR
+ Returns : ref sur array
+ Args : $dir : repertoire a explorer
+ Globals : @A_LIST_FILE et @A_LIST_DIR
+
+=cut
+sub readDir()
+{
+ my $dir = shift;
+ my $list_file;
+
+ opendir(REP,$dir);
+ while ( my $file = readdir(REP) )
+ {
+ next if ( $file =~ /^\.+$/);
+
+ if ( -d("$dir/$file") )
+ {
+ push(@A_LIST_DIR,"$dir/$file");
+ }
+ else
+ {
+ push (@A_LIST_FILE,"$dir/$file");
+ }
+ }
+ close(REP);
+ return;
+}
+
+=head2 function computeFastaFile
+
+ Title : computeFastaFile
+ Usage : computeFastaFile($file,$bool_prot_seq)
+ Prerequisite : none
+ Fonction : Chaine de traitement pour l'indexation du fichier fasta
+ Returns : $bank : nom de la banque blast
+ Args : $file : nom du fichier a indexer
+ : $bool_prot_seq : boolean. 1 si c'est un fichier de proteines
+ Globals : $PATH_BLAST_DIR : Chemin complet du repertoire des index blast
+
+=cut
+sub computeFastaFile()
+{
+ my ($file,$bool_prot_seq) = (shift,shift);
+
+ &clearOutputFiles();
+ &Info("Indexed file : $file") if ( $VERBOSE );
+
+ my $bank = &indexFastaFile($file,$bool_prot_seq);
+
+ # On recupere la liste des fichiers index produits pour les transmettres via STDOUT a BioMaJ
+ opendir(BLASTDIR,$PATH_BLAST_DIR);
+ while ( my $file = readdir(BLASTDIR) )
+ {
+ &outputFile("$PATH_BLAST_DIR/$file") if ( $file =~ /^$bank.*\.\w\w\w$/ );
+ }
+ closedir(BLASTDIR);
+
+ &printOutputFiles();
+ return $bank;
+}
+
+
+=head2 function checkSequenceType
+
+ Title : checkSequenceType
+ Usage : checkSequenceType($file)
+ Prerequisite : none
+ Fonction : Determine si le fichier fasta $file est prot ou nucleique
+ : en analysant les lettres des sequences sur les 100 premieres lignes
+ Returns : $bool_prot_seq : 1 pour prot, 0 si nucleique
+ Args : $file : chemin complet du fichier a tester
+ Globals :
+
+=cut
+sub checkSequenceType()
+{
+ my $file = shift;
+
+ # Recupere le nom des fichiers (avec .gz, sans .gz, s'il est compresse)
+ my ($file_compress,$file_uncompress,$bool_compress) = &getNameCompressFile($file);
+
+ my $file = ($bool_compress) ? $file_compress : $file_uncompress;
+
+ return &ProcessBiomajLib::getSequenceType($file,$bool_compress);
+}
+
+=head2 procedure indexFastaFile
+
+ Title : indexFastaFile
+ Usage : indexFastaFile($file,$bool_prot_seq)
+ Prerequisite : none
+ Fonction : Construit la ligne de commande pour l'indexation et appel &Execute pour l'executer
+ Returns : nom de la banque blast
+ Args : $file : fichier fasta
+ : $bool_prot_seq : 1 pour seq prot sinon 0
+ Globals : $FORMATDB
+ : $PATH_FLAT_DIR : path du repertoire flat de la release
+ : $PATH_BLAST_DIR : path du repertoire blast de la release
+ : $UNCOMPRESS
+ : %H_CMD
+
+=cut
+sub indexFastaFile()
+{
+ my ($file,$bool_prot_seq) = (shift,shift);
+
+ # Recupere le nom des fichiers (avec .gz, sans .gz, s'il est compresse)
+ my ($file_compress,$file_uncompress,$bool_compress) = &getNameCompressFile($file);
+ my ($protein_option,$mask_move_index) = &getOptionSeq($bool_prot_seq);
+ my @a_path = split /\//, $file_uncompress;
+ my $outfile = $a_path[$#a_path];
+
+ my @a_cmd = ();
+
+ chdir($PATH_BLAST_DIR);
+ my $parse_option = ($NO_PARSE) ? "F" : "T";
+
+ push(@a_cmd,"$FORMATDB -o $parse_option -p $protein_option -i $PATH_FLAT_DIR/$file_uncompress -l $PATH_LOG_DIR/$file_uncompress.log");
+ push(@a_cmd,"$H_CMD{UNIX_MV} -f $PATH_FLAT_DIR/$file_uncompress$mask_move_index $PATH_BLAST_DIR");
+
+ if ($bool_compress)
+ {
+ # Soit il est decompresse, indexe puis recompresse
+ if ( $UNCOMPRESS )
+ {
+ unshift(@a_cmd,"$H_CMD{UNIX_GUNZIP} -f $PATH_FLAT_DIR/$file_compress");
+ push(@a_cmd,"$H_CMD{UNIX_GZIP} -f $PATH_FLAT_DIR/$file_uncompress");
+ }
+ # Soit decopmpresse et indexe a la vole
+ else
+ {
+ @a_cmd = ();
+ push(@a_cmd,"$H_CMD{UNIX_GUNZIP} -c $PATH_FLAT_DIR/$file_compress | $FORMATDB -i stdin -n $PATH_BLAST_DIR/$outfile -o $parse_option -p $protein_option -l $PATH_LOG_DIR/$outfile.log");
+ }
+ }
+
+ &ProcessBiomajLib::executeBatch(\@a_cmd,$BATCH_SYSTEM,$outfile);
+ return $outfile;
+}
+
+=head2 function getNameCompressFile
+
+ Title : getNameCompressFile
+ Usage : getNameCompressFile($file)
+ Prerequisite : none
+ Fonction : A partir du nom du fichier fasta de la release, determine s'il est gzippe et retourne le nom du fichier zippe, non zippe
+ Returns : $file_compress : nom du fichier gzippe
+ : $file_uncompress : nom du fichier non zippe
+ : $bool_compress : 1 si le fichier $file est gzippe sinon 0
+ Args : $file : fichier fasta
+ Globals : none
+
+=cut
+sub getNameCompressFile()
+{
+ my $file_compress = shift;
+
+ my $file_uncompress = $file_compress;
+ my $bool_compress = 0;
+
+ if ( $file_compress =~ /\.gz$/ )
+ {
+ $file_uncompress =~ s/\.gz//;
+ $bool_compress = 1;
+ }
+
+ return ($file_compress,$file_uncompress,$bool_compress);
+}
+
+=head2 function getOptionSeq
+
+ Title : getOptionSeq
+ Usage : getOptionSeq($bool_prot_seq)
+ Prerequisite : Determiner si le fichier fasta est prot ou nucleique via GetSequenceType
+ Fonction : Selon $bool_prot_seq, retourne les valeurs pour les options du programme formatdb et le move des index
+ Returns : $protein_option : T ou F (option -p de formatdb)
+ : $mask_move_index : "\.p*" ou "\.n*" (regexp sur les extensions des fichiers index)
+ Args : $bool_prot_seq : 1 pour prot, 0 pour nucleique
+ Globals : none
+
+=cut
+sub getOptionSeq()
+{
+ my $bool_prot_seq = shift;
+ my $protein_option = ($bool_prot_seq) ? "T" : "F";
+ my $mask_move_index = ($bool_prot_seq) ? "\.p*" : "\.n*";
+
+ return($protein_option,$mask_move_index);
+}
+=head2 procedure buildHashAliasFile
+
+ Title : buildHashAliasFile
+ Usage : buildHashAliasFile($bank,$bool_prot_seq)
+ Prerequisite : none
+ Fonction : Renseigne le Hash %H_ALIAS_FILE
+ : Si l'option --bank_blast est renseignee, il y aura creation d'un seul fichier alias (bank_blast.pal ou .nal) regroupant tous les fichiers fasta indexe.
+ : Sinon, un fichier alias est cree par fichier fasta indexe.
+ Returns : none
+ Args : $fasta_file : fichier fasta indexe
+ : $bool_prot_seq : 1 pour prot, sinon 0
+ Globals : %H_ALIAS_FILE
+
+=cut
+sub buildHashAliasFile()
+{
+ my ($fasta_file,$bool_prot_seq,$bank_name) = (shift,shift,shift);
+ $bank_name = "" if ( !defined($bank_name) );
+
+
+ # On recupere le nom du fichier fasta compresse, le nom du fichier decompresse et un bool si le fichier est compresse ou pas
+ # Si le fichier n'est pas compresse, $file_compress = $file_uncompress
+ my ($file_compress,$file_uncompress,$bool_compress) = &getNameCompressFile($fasta_file);
+ my $extension = &getAliasFileExtension($bool_prot_seq);
+
+ # Selon si $BANK_BLAST est renseigne, la banque blast prendra le nom du fichier fasta indexe ou $BANK_BLAST
+ my $title_bank = ($bank_name eq "") ? "$file_uncompress" : "$bank_name";
+ my $file_alias = ($bank_name eq "") ? "$PATH_BLASTDB_DIR/$file_uncompress"."$extension" : "$PATH_BLASTDB_DIR/$bank_name"."$extension";
+
+ $H_ALIAS_FILE{$file_alias}{TITLE} = "$title_bank ".&ProcessBiomajLib::getRemoteRelease();
+ $H_ALIAS_FILE{$file_alias}{DBLIST} .= "$PATH_BLAST_DIR/$file_uncompress ";
+ return;
+}
+
+=head2 procedure createAliasFile
+
+ Title : createAliasFile
+ Usage : createAliasFile($bank,$bool_prot_seq)
+ Prerequisite : none
+ Fonction : Cree le fichier alias pour blast
+ Returns : none
+ Args : $bank : nom de la banque
+ : $bool_prot_seq : 1 pour prot, sinon 0
+ Globals :
+
+=cut
+sub createAliasFile()
+{
+ foreach my $file_alias ( keys %H_ALIAS_FILE )
+ {
+
+ unlink($file_alias) if ( -e($file_alias) );
+
+ open (ALIAS,">$file_alias") or &Warning("Cannot create file alias >$file_alias<");
+print ALIAS <<END
+# Alias file
+TITLE $H_ALIAS_FILE{$file_alias}{TITLE}
+#
+DBLIST $H_ALIAS_FILE{$file_alias}{DBLIST}
+
+END
+;
+ close(ALIAS);
+
+ &Info("Create alias file : $file_alias") if ($VERBOSE);
+ }
+
+ return;
+}
+
+=head2 function getAliasFileExtension
+
+ Title : getAliasFileExtension
+ Usage : getAliasFileExtension($bool_prot_seq)
+ Prerequisite : none
+ Fonction : Selectionne la bonne extension du fichier alias blast (.pal ou .nal)
+ Returns : $extension : ".pal" si prot, sinon ".nal"
+ Args : $bool_prot_seq : 1 pour prot, sinon 0
+ Globals : none
+
+=cut
+sub getAliasFileExtension()
+{
+ my $bool_prot_seq = shift;
+ my $extension = ($bool_prot_seq) ? ".pal" : ".nal";
+
+ return $extension;
+}
+
+=head2 procedure createLinkFastaDir
+
+ Title : createLinkFastaDir
+ Usage : createLinkFastaDir()
+ Prerequisite : none
+ Fonction : Place un lien symbolique fasta sur le repertoire flat
+ Returns : none
+ Args : none
+ Globals : $PATH_FASTA_DIR : path du link fasta
+ : $PATH_FLAT_DIR : path du repertoire flat
+ : $LN : commande system ln
+
+=cut
+sub createLinkFastaDir
+{
+ my $cmd = "";
+
+ $cmd = "$H_CMD{UNIX_LN} -s $PATH_FLAT_DIR $PATH_FASTA_DIR";
+ `$cmd` if ( !-e($PATH_FASTA_DIR) );
+ return;
+}
+
+=head2 function test
+
+ Title : test
+ Usage : test($bank)
+ Prerequisite : Indexation de la banque
+ Fonction : Test si l'indexation est fonctionnelle (fastacmd)
+ Returns : $bool : 1 ou 0
+ Args : $bank : la banque a tester
+ Globals : FASTACMD : executable fastacmd
+
+=cut
+sub test()
+{
+ my $bank = shift;
+
+#############################
+# REVOIR LA FONCTION DE TEST
+####
+ return 1;
+#############################
+
+ my ($fastabank,$nb_seq,$nb_letter) = ("","","");
+
+ my $cmd = "$FASTACMD -d $bank -I";
+ open (FASTACMD,"$cmd |");
+ while (my $line = <FASTACMD>)
+ {
+ chomp($line);
+ if ( $line =~ /Database:\s*(.+)/)
+ {
+ $fastabank = $1;
+ }
+ if ($line =~ /\s+(\S+) sequences; (\S+) total letters/)
+ {
+ ($nb_seq,$nb_letter) = ($1,$2);
+ }
+ if ($line =~ /ERROR/)
+ {
+ ($fastabank,$nb_seq,$nb_letter) = ("","","");
+ last;
+ }
+ }
+ close(FASTACMD);
+
+ &Info("Bank --> $fastabank");
+ &Info("$nb_seq sequences -- $nb_letter letters");
+
+ my $rvl = ( $fastabank eq "") ? 0 : 1;
+ return $rvl;
+}
+
+=head2 procedure initGlobalVar
+
+ Title : initGlobalVar
+ Usage : initGlobalVar()
+ Prerequisite : none
+ Fonction : Recupere les valeurs du fichier tmp/bank.var et controle la validite des arguments
+ Returns : none
+ Args : none
+ Globals :
+
+=cut
+sub initGlobalVar()
+{
+ &ProcessBiomajLib::checkBiomajEnvironment();
+ &ProcessBiomajLib::readCfgFile(\%H_CMD);
+
+ ### Variable spe a la banque ###
+ $DB_NAME = $ENV{'dbname'} if ( $DB_NAME eq "" );
+
+# modif david pour permettre le formatage de fichier or du repertoire flat
+ if( $FastaHome eq ("null")) {
+ $PATH_FLAT_DIR = &ProcessBiomajLib::getPathFuturReleaseFlatDir();
+ } else {
+ chomp($FastaHome);
+ $PATH_FLAT_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($FastaHome);
+ print " fastahome sub dir =".$FastaHome.". ";
+ print " absolut path for fasta is =".$PATH_FLAT_DIR;
+
+ }
+
+ $PATH_LOG_DIR = &ProcessBiomajLib::getPathFuturReleaseLogDir();
+ $PATH_BLAST_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($INDEX_DIR);
+ $PATH_FASTA_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($FASTA_DIR);
+ $PATH_BLASTDB_DIR = &ProcessBiomajLib::getPathBlastDbDir();
+
+ &Error("No such flat directory for $DB_NAME $PATH_FLAT_DIR bank.") if ( !-e($PATH_FLAT_DIR) );
+ &Warning("option -file : default value [.*]") if ($INPUT_FILE_REGEXP eq ".*");
+
+ $FORMATDB = $H_CMD{FORMATDB} if ( defined($H_CMD{FORMATDB}) );
+ $FASTACMD = $H_CMD{FASTACMD} if ( defined($H_CMD{FASTACMD}) );
+
+ ### Variable du programme ###
+ &Usage("nonvalid option : --uncompress $UNCOMPRESS") if ( $UNCOMPRESS !~ /(T|F)/ );
+ $UNCOMPRESS = ( $UNCOMPRESS =~ /T/i ) ? 1 : 0;
+
+ @A_BANK = split /\s+/, $BANK_BLAST;
+ @A_REGEXP = split /\s+/, $INPUT_FILE_REGEXP;
+
+ return;
+}
+
+=head2 procedure usage
+
+ Title : usage
+ Usage : usage($msg)
+ Prerequisite : none
+ Fonction : Affiche $msg + l'usage du script + exit(1)
+ Returns : none
+ Args : $msg : message precisant l'erreur
+ Globals : none
+
+=cut
+sub usage()
+{
+
+ my $message = shift;
+
+ &Error("$message") if ( defined($message) && $message ne "" );
+
+print STDOUT <<END
+
+formatdbTLSE.pl - version $VERSION
+
+formatdbTLSE.pl [--dbname myBank] [--fasta regex1,[regexp2],...] [--bank bankName1,[bankName2],...]
+ [--no_parse_seqid] [--uncompress T/F] [--execute sh/pbs/sge/other] [--test] [--verbose] [--help]
+
+Arguments :
+
+ --dbname (-d) : bank name (BioMaJ) [defaut : $ENV{dbname}]
+ --fastahome (-F) : In fasta base dir ( default value = flat )
+ --fasta (-f) : regexp file [.*]
+ --bank (-b) : bank name (bank blast) [defaut : ""]
+ --no_parse_seqid : Do not parse SeqId. Do not create indexes. (formatdb option -o F)
+ --uncompress (-u) : T/F [F]
+ --execute (-e) : exec mode [default : 'sh']
+ --test (-t) : execute test after indexing (not functional in 0.9)
+ --verbose (-v) :
+ --help (-h) : This message
+
+
+--dbname (-d) myBank
+
+ BioMaJ bank name
+ default = \$ENV{dbname}
+--fastahome (-F)
+ directory ou se trouve les fichiers fasta a formater
+
+--fasta (-f) 'regexp1[ regexp2[ regexp3]]'
+
+ Expression reguliere perl pour selectionner les fichiers a formater
+ La premiere expression correspond aux fichiers de la premiere bank ect... ...
+ Un groupe de regexp peut contenir plusieurs regexp separes par une virgule et
+ chaque groupe d'expresions doivent etre separes par des espaces.
+ Ex : --file '*.aa,*.a *.nt'. Tous les fichier *.aa et *.a constituront la bank 'bank_prot' (cf:--bank)
+ Si il y a plus d'expressions que de nom de banques, chaque fichier fasta donnera une banque blast du meme nom.
+ default = '.*'
+
+--bank (-b) 'bankName1[ bankName2[ bankName3]]'
+
+ Nom des banques a associer aux regexp de fichiers fasta de l'option --file
+ Si l'option n'est pas renseignee, chaque fichiers fasta donnera une banque blast du meme nom.
+ Les noms de banques doivent etre separes par des espaces.
+ Ex : --bank 'bank_prot bank_nuc'.
+ default = ""
+
+--no_parse_seqid (-n)
+
+ Do not parse SeqId. Do not create indexes. (formatdb option -o F)
+ default = No activated
+
+--uncompress (-u) T/F
+
+ Permet de determiner le comportement du programme si le(s) fichier(s) sont compresser.
+ Si True, le fichier fasta est decompresse par gunzip, indexer par formatdb puis recompresse.
+ Si False, la commande sera : gunzip -c bank.fasta | formatdb -i stdin
+ defaut = F
+
+--execute (-e) system
+
+ La ligne de commande pour le formatage des fichiers fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque system, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+--test (-t)
+
+ Execution d'un test pour verifier le bon formatage des banques blast.
+ VERSION 0.9 --> NON OPERATIONNEL
+
+--verbose (-v)
+
+--help (-h)
+
+END
+;
+ exit(-1);
+}
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/formatdbTLSE.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/indexSrsTLSE.pl
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/indexSrsTLSE.pl (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/indexSrsTLSE.pl 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,870 @@
+#!/usr/bin/perl
+# Author : Genopole Toulouse - Jean-Marc.Larre at toulouse.inra.fr - Yoann.Beausse at toulouse.inra.fr
+# Version : 0.2
+# Date : 02/01/2007
+#
+# Author : Genopole Toulouse - Jean-Marc.Larre at toulouse.inra.fr
+# Version : 0.1
+# Date : 01/25/2007
+#
+# Globals
+#
+
+=head1 NAME
+
+indexSrsTLSE.pl - Indexation de banque SRS
+
+=head1 SYNOPSIS
+
+indexSrsTLSE.pl [--dbname bankName] [--logdir logDirectory] [--only_check] [--execute execute_system] [--pvm]
+ [--cpu_number cpuNumber] [--force] [--help] [--verbose]
+
+=head1 Description
+
+Ce script fait partie des PostProcess de BioMaJ.
+Il permet l'indexation de banques via SRS et le calcul des liens entre cette banque et celles deja indexees.
+
+=over 10
+
+=item * Verifie si la banque a besion d'etre indexee
+
+=item * Appel 'srscheck' pour creer un fichier makefile d'indexation
+
+=item * Execute via la commande 'make' le fichier makefile, soit en local, soit via un system de queue pour du calcul distribue
+
+=item * Verifie l'indexation de la banque
+
+=back
+
+=head1 VERSION
+
+Version 0.9
+March 2007
+
+=head1 COPYRIGHT
+
+This program is distributed under the CeCILL License. (http://www.cecill.info)
+
+=head1 ARGUMENTS
+
+B<--dbname (-d) bankname>
+
+ SRS bank name
+ default = \$ENV{dbname}
+
+B<--logdir (-l) 'logDirectory'>
+
+ default = Resultat de &ProcessBiomajLib::getPathFuturReleaseLogDir()
+
+B<--only_check (-o)>
+
+ Test seulement si la banque a besoin d'etre indexee.
+ default = off
+
+B<--execute (-e) system>
+
+ La ligne de commande pour le formatage des fichiers fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque system, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+B<--pvm (-p)>
+
+ Utilisation de pvm pour une execution avec pbs.
+ default = off
+
+B<--cpu_number (-c)>
+
+ Specify the CPU number or node number
+ default:$CPU_OPTION
+
+B<--force (f)>
+
+ Force l'indexation
+ default:off
+
+B<--verbose (-v)>
+
+B<--help (-h)>
+
+=head1 AUTHOR
+
+ Yoann Beausse <Yoann.Beausse at toulouse.inra.fr>
+ Plateforme Bioinformatique - Genopole Midi-Pyrenees Toulouse
+
+=head1 COMMENTS
+
+=head2 Prerequis
+
+ Ce script fait appel a la librairie Perl 'ProcessBiomajLib.pm'.
+ Cette librairie et formatdbTLSE.pl doivent etre presents dans le repertoire des Process de BioMaJ :
+ ($BIOMAJ_ROOT/conf/process/).
+
+ Pour les appels aux commandes systeme, le fichier 'unix_command_system.cfg' doit etre renseigne,
+ notament pour l'acces aux commandes 'formatdb' et 'fastacmd'.
+
+ Ce script ne comprend pas l'installation de SRS. Il faut que celle-ci soit correctement realisee.
+ Il est fait appel aux commande 'srsscheck' pour constituer un fichier makefile pour indexer la banque et a
+ 'make' pour executer ce makefile.
+
+=head2 Repertoire de sortie
+
+ Tous les index produits sont places dans un repertoire nomme 'index' (cf $INDEX_DIR),
+ au meme niveau que 'flat', le repertoire des rawdata BioMaJ.
+
+=head2 Execution
+
+ Il y a 2 modes d'execution .
+
+ 1 - mode par defaut, sur la machine locale (--execute sh).
+ 2 - en batch sur un cluster via une soumission a un systeme de queue. (--execute nomDuSystem) ex : pbs ou sge
+ L execution reste sequentielle mais delocalisee.
+ Pour definir un nouveau systeme, voir executeBatch()
+
+=head2 Variables d'Environnement
+
+ SRSROOT
+ Repertoire ou les fichiers alias blast seront crees.
+ Si BLASTDB n'est pas renseignee, le repertoire par defaut sera 'data.dir'/blastdb
+ (data.dir = propriete de BioMaJ - voir global.properties ou myBank.properties.)
+
+ Verification de l'environnement
+ La fonction __initEnvSrsForBiomaj() verifie si toutes les repertoires pour l'indexation SRS sont presents (rep : dir offDir indexDir offIndexDir definit dans srsdb.i)
+ La fonction ProcessBiomajLib::checkBiomajEnvironment() verifie que l'environnement d'execution du Process est correcte pour une interaction avec BioMaJ.
+
+=head2 Warning
+
+ Version 0.9
+
+=cut
+
+use strict;
+#use vars qw/ %opt /;
+use Getopt::Long;
+use lib ("$ENV{BIOMAJ_ROOT}/conf/process/.");
+use ProcessBiomajLib;
+
+############################################################################
+#
+#
+my ($CPU_OPTION,$BATCH_SYSTEM,$FORCE,$ONLY_CHECK,$LOGDIROPTION,$DB_NAME,$VERBOSE,$HELP,$USEPVM) = ("1","sh","","","","","","","");
+my $result = GetOptions (
+ "cpu_number=i" => \$CPU_OPTION,
+ "execute=s" => \$BATCH_SYSTEM,
+ "pvm" => \$USEPVM,
+ "force" => \$FORCE,
+ "only_check" => \$ONLY_CHECK,
+ "logdir=s" => \$LOGDIROPTION,
+ "dbname=s" => \$DB_NAME,
+ "verbose" => \$VERBOSE,
+ "help" => \$HELP,
+ );
+
+###### SRS Parameters #####
+my $SRSROOT = $ENV{SRSROOT};
+my $SRSINDEX = "$SRSROOT/index";
+my $SRSOFFINDEX = "$SRSROOT/offindex";
+
+my $PATH_MAKEFILE_DIR="$SRSROOT/pbs/makefile/"; # Path of srscheck makefile generation
+
+my $SRS_OPTIONS="-nomove -links"; # SrsCheck default options
+my $SRSCHECK_OPTIONS;
+
+my $LOCK="$ENV{SRSFLAGS}/BiomajSRSLock"; # Flag name to lock only one indexing
+my $CPUNUMBER=4; # Specify the number of default CPU used to indexing
+my $SLEEPTIME=5; # Time in hours to wait for the lock, if 0 no wait.
+
+##### SRS Commands #####
+my $GETZ="$SRSROOT/bin/linux73/getz"; # Getz command
+my $SRSCHECK="$SRSROOT/etc/srscheck"; # SrsCheck command
+
+##### PVM Commands #####
+my $PVM = "/work/pvm3/lib/pvm";
+my $PVMGMAKE = "/work/pvm3/bin/LINUX64/pvmgmake";
+
+##### Biomaj Variable #####
+my $INDEX_DIR = "srs";
+
+##### Global Variable #####
+my %H_CMD;
+my @A_UNLINK_DIR = ();
+my @A_BANKS = ();
+
+my $PATH_SRS_DIR;
+my $PATH_LOG_DIR;
+
+my $PATH_MAKEFILE_FILE;
+my $PATH_LOG_FILE;
+#End paramters definition
+#
+############################################################################
+#Do not modify below
+#
+
+
+MAIN:
+{
+ &init();
+
+ foreach my $bank (@A_BANKS)
+ {
+ &clearOutputFiles();
+
+ &setLogFile($bank);
+ &setMakefile($bank);
+ &computeBank($bank);
+
+ }
+
+ &cleanEnvSrsForBiomaj();
+}
+
+
+############################################################################
+# Subroutine definition
+############################################################################
+
+=head2 procedure computeBank
+
+ Title : computeBank
+ Usage : computeBank($bank)
+ Prerequisite : none
+ Fonction : Chaine de traitement pour l'indexation de la bank
+ Returns : none
+ Args : $bank : Nom de la banque SRS a indexer
+ Globals : none
+
+=cut
+sub computeBank {
+
+ my $bank = shift;
+
+ if (&isNecessaryIndexing($bank))
+ {
+ &ProcessBiomajLib::Info("Indexing is necessary for $bank.");
+ if (!$ONLY_CHECK)
+ {
+ &srsdo($bank);
+
+ if (&isCorrectIndexing($bank))
+ {
+ &ProcessBiomajLib::Info("SRS indexing finished and seems correct.");
+ &getOutputFiles($bank);
+ &ProcessBiomajLib::printOutputFiles();
+ }
+ else
+ {
+ &ProcessBiomajLib::Error("SRS indexing error.");
+ }
+ }
+ }
+ else
+ {
+ &ProcessBiomajLib::Info("Nothing to do for $bank.");
+ }
+
+ return;
+}
+
+=head2 procedure isNecessaryIndexing
+
+ Title : isNecessaryIndexing
+ Usage : isNecessaryIndexing($bank)
+ Prerequisite : none
+ Fonction : Test si la banque a besoin d'etre indexee (srscheck -checkonly -l $bank)
+ Returns : 0 si la banque a besoin d'etre indexee
+ : 1 si pas besoin
+ Args : $bank : Nom de la banque SRS
+ Globals : $SRSCHECK, $SRSCHECK_OPTIONS
+
+=cut
+sub isNecessaryIndexing()
+{
+ my $bank = shift;
+ my $returnValue=`$SRSCHECK -checkonly -l \"$bank\" $SRSCHECK_OPTIONS`;
+
+ if (($returnValue eq "") || ($returnValue =~ /needs to be moved online/)) {
+ if ($returnValue =~ /needs to be moved online/) {
+ &ProcessBiomajLib::Info("Index files need to be moved to online.") if $VERBOSE;
+ }
+ return 0
+ } else {
+ return 1
+ }
+}
+
+=head2 procedure isCorrectIndexing
+
+ Title : isCorrectIndexing
+ Usage : isCorrectIndexing($bank)
+ Prerequisite : none
+ Fonction : Test l'indexation de la banque par une requete getz (getz -off -c $bank)
+ Returns : Le numbre l'enregistrement de la banque indexee.
+ : 0 si erreur
+ Args : $bank : Nom de la banque SRS
+ Globals : $GETZ
+
+=cut
+sub isCorrectIndexing()
+{
+ my $bank = shift;
+
+ my $returnValue=`$GETZ -off -c \"$bank\"`;
+ if ($returnValue=~ /^[0-9]+$/) {
+ return $returnValue;
+ } else {
+ return 0;
+ }
+}
+
+=head2 procedure srsdo
+
+ Title : srsdo
+ Usage : srsdo($bank)
+ Prerequisite : none
+ Fonction : Execute 'srscheck'
+ : Execute 'srsdo'
+ Returns : none
+ Args : $bank : nom de la banque SRS
+ Globals : $PATH_SRS_DIR
+
+=cut
+sub srsdo()
+{
+ my $bank = shift;
+ &lockIndexing();
+
+ &ProcessBiomajLib::Info("Indexing running for $bank.") if $VERBOSE;
+
+ my $cmd = "$SRSCHECK -l \"$bank\" -o $PATH_MAKEFILE_FILE $SRSCHECK_OPTIONS 1>$PATH_LOG_FILE";
+ &ProcessBiomajLib::executeCmdSystem($cmd);
+
+ my @a_cmdFile = ( &getCmdFile($bank) );
+ executeBatch(\@a_cmdFile,$BATCH_SYSTEM,$bank,"srs");
+
+ my $ls = `$H_CMD{UNIX_LS} -1 $SRSOFFINDEX/.`;
+ system ("$H_CMD{UNIX_MV} $SRSOFFINDEX/* $SRSINDEX/.") if ( $ls ne "" );
+ system ("$H_CMD{UNIX_CHMOD} 644 $SRSINDEX/*");
+
+ &unlock();
+ return;
+}
+
+=head2 procedure getCmdFile
+
+ Title : getCmdFile
+ Usage : getCmdFile($bank)
+ Prerequisite : none
+ Fonction : Cree un fichier de commande pour l'execution du srsdo (via make)
+ Returns : Chemin absolu du fichier de commande
+ Args : $bank : nom de la banque SRS
+ Globals : $CPUNUMBER, $PATH_MAKEFILE_FILE, $PATH_LOG_FILE, $USEPVM
+
+=cut
+sub getCmdFile
+{
+ my $bank = shift;
+ my $cmdFile = "run_srs_$bank.sh";
+
+ open (RUNSRS,">$cmdFile") or &ProcessBiomajLib::Error("Cannot create file : $cmdFile");
+
+ if ( $USEPVM )
+ {
+ print RUNSRS &getCmdForPVM($bank);
+ }
+ else
+ {
+ print RUNSRS "cd $ENV{SRSFLAGS}; $H_CMD{UNIX_MAKE} -j $CPUNUMBER -k -f $PATH_MAKEFILE_FILE all 1>>$PATH_LOG_FILE";
+ }
+ close(RUNSRS);
+
+ system ("$H_CMD{UNIX_CHMOD} +x $cmdFile");
+
+ my $path = `pwd`;
+ chomp($path);
+
+ return "$path/$cmdFile";
+}
+
+=head2 procedure getCmdForPVM
+
+ Title : getCmdForPVM
+ Usage : getCmdForPVM()
+ Prerequisite : none
+ Fonction : Constitue le fichier de commande pour une execution via pvm
+ Returns : String : Le contunue du fichier
+ Args : none
+ Globals : $BATCH_SYSTEM, $PATH_LOG_DIR,$CPUNUMBER, $PATH_LOG_FILE, $PVM, $PVMGMAKE, $PATH_MAKEFILE_FILE
+
+=cut
+sub getCmdForPVM
+{
+ my $cmd = "";
+
+ if ( $BATCH_SYSTEM eq "pbs" )
+ {
+
+ # $cmd .= "#PBS -A SRS\n";
+ # $cmd .= "#PBS -j oe\n";
+ # $cmd .= "#PBS -V\n";
+ $cmd .= "#PBS -e \"localhost:$PATH_LOG_DIR\"\n";
+ $cmd .= "#PBS -l select=$CPUNUMBER:ncpus=2\n";
+ $cmd .= "#PBS -l place=scatter\n";
+
+ $cmd .= "#!/bin/sh -x\n";
+
+ $cmd .= "# Clean /tmp for PVM\n";
+ $cmd .= "/usr/bin/find /tmp/* -type s -exec /bin/rm -vf {} \;\n";
+
+ $cmd .= "date 1>>$PATH_LOG_FILE\n";
+ $cmd .= "echo conf | $PVM \$PBS_NODEFILE\n";
+ $cmd .= "cd $ENV{SRSFLAGS}; $PVMGMAKE -j $CPUNUMBER -k -f $PATH_MAKEFILE_FILE all 1>>$PATH_LOG_FILE\n";
+ $cmd .= "echo halt | $PVM \n";
+ $cmd .= "date 1>>$PATH_LOG_FILE\n";
+ }
+ elsif ( $BATCH_SYSTEM eq "sge" )
+ {
+ $cmd .= "date 1>>$PATH_LOG_FILE\n";
+ $cmd .= "echo conf | $PVM \$PBS_NODEFILE\n";
+ $cmd .= "cd $ENV{SRSFLAGS}; $PVMGMAKE -j $CPUNUMBER -k -f $PATH_MAKEFILE_FILE all 1>>$PATH_LOG_FILE\n";
+ $cmd .= "date 1>>$PATH_LOG_FILE\n";
+ }
+ return $cmd;
+}
+
+=head2 procedure executeBatch
+
+ Title : executeBatch
+ Usage : executeBatch($ra_cmdLine,$system,$bank,$option)
+ Prerequisite : none
+ Fonction : Execute une suite de commandes systeme via differentes methode (sh ou cluster)
+ Returns : none
+ Args : $ra_cmdLine : Reference sur array contennat les lignes de commande a executer
+ : $system : systeme a utiliser (sh pbs ... ...)
+ : $bank : nom de la banque (pour nommer le fichier a executer si utilisation de cluster. Peut etre vide)
+ : $option : les options a utiliser. Vide pour les options par defaut(voir ci-dessous)
+ Globals : none
+
+ Definition des options pour l'utilisation du calcul distribue :
+ L'executable et les options a utiliser pour le calcul distribue sont definis dans le fihier "unix_command_system.cfg".
+ Exemple :
+ - Executable pour PBS --> il faut definir une variable "EXECUTE_BATCH_CMD_PBS=/path/qsub"
+ - Executable pour SGE --> il faut definir une variable "EXECUTE_BATCH_CMD_SGE=/path/qsub"
+
+ - Options par defaut pour PBS --> il faut definir une variable "EXECUTE_BATCH_OPTION_PBS=options par defaut"
+ - Options par defaut pour SGE --> il faut definir une variable "EXECUTE_BATCH_OPTION_SGE=options par defaut"
+ - Options particulieres pour PBS --> il faut definir une variable "EXECUTE_BATCH_OPTION_PBS_OPTIONNAME=options pour OPTIONNAME"
+ ...
+
+=cut
+sub executeBatch
+{
+ my ($ra_cmd,$system,$bank,$option) = (shift,shift,shift,shift);
+ $system = "sh" if ( !defined($system) );
+ $option = ( !defined($option) ) ? "" :"_".uc($option);
+ $bank = time if ( !defined($bank) );
+
+ if ($system ne "" && $system ne "sh")
+ {
+ $system = uc($system);
+ &ProcessBiomajLib::Error("The command for --execute pbs is not defined in unix_command_system.cfg ( EXECUTE_BATCH_CMD_$system=? )!!\n") if ( !exists($H_CMD{"EXECUTE_BATCH_CMD_$system"}) );
+
+ my $execute_cmd = $H_CMD{"EXECUTE_BATCH_CMD_$system"};
+ my $execute_option = ( exists($H_CMD{"EXECUTE_BATCH_OPTION_$system$option"}) ) ? $H_CMD{"EXECUTE_BATCH_OPTION_$system$option"} : "";
+
+ foreach my $cmd ( @{$ra_cmd} )
+ {
+ my $cmd_batch = "$execute_cmd $execute_option $cmd";
+ &ProcessBiomajLib::Info( "Execute : ".&executeCmdSystem($cmd_batch,"$PATH_LOG_DIR/execute.cmd.$bank.log") );
+ }
+ }
+ elsif ($system eq "sh")
+ {
+ foreach my $cmd ( @{$ra_cmd} )
+ {
+ &ProcessBiomajLib::Info( "Execute : ".&executeCmdSystem($cmd,"$PATH_LOG_DIR/execute.cmd.$bank.log") );
+ }
+ }
+
+ return;
+}
+
+=head2 procedure lockIndexing
+
+ Title : lockIndexing
+ Usage : lockIndexing()
+ Prerequisite : none
+ Fonction : Test si un 'lock' existe. Si oui, verifie toutes les 5 minutes pendant le nombre d'heure de $SLEEPTIME (5 par defaut)
+ : Sinon place un 'lock'
+ Returns : Si la fonction a pu placer un 'lock'
+ : Fait appel a ProcessBiomajLib::Error si le 'lock' n'a pas pu etre place.
+ Args : none
+ Globals : $SLEEPTIME, $LOCK
+
+=cut
+sub lockIndexing()
+{
+ my ($sleeptime,$step,$wait);
+
+ if (-e $LOCK) {
+ # A lock already exists
+ if ($SLEEPTIME==0) {
+ &ProcessBiomajLib::Error("Lock exists, perhaps an indexing is already running, we cannot index data. Lock file is $LOCK");
+ } else {
+ $sleeptime=$SLEEPTIME*3600; #Convert in seconds
+ $step=300; # 5 minutes = 300 seconds
+ $wait=0;
+ while ($wait <= $sleeptime) {
+ sleep($step);
+ $wait=$wait+$step;
+ if (-e $LOCK) {
+ &ProcessBiomajLib::Info("Lock exists, perhaps an indexing is already running, we cannot index data. Lock file is $LOCK") if $VERBOSE;
+ } else {
+ &ProcessBiomajLib::Info("Set lock. Lock file is $LOCK") if $VERBOSE;
+ system ("$H_CMD{UNIX_TOUCH} $LOCK");
+ return 0;
+ }
+ }
+ if ($wait >= $sleeptime) {
+ &ProcessBiomajLib::Error("Lock exists, we have waited, but the lock file is never free. Lock file is $LOCK");
+ }
+ }
+ } else {
+ &ProcessBiomajLib::Info("Set lock. Lock file is $LOCK") if $VERBOSE;
+ system ("$H_CMD{UNIX_TOUCH} $LOCK");
+ return 0;
+ }
+}
+
+=head2 procedure unlock
+
+ Title : unlock
+ Usage : unlock()
+ Prerequisite : none
+ Fonction : Retire le 'lock' a la fin de l'indexation
+ Returns : none
+ Args : none
+ Globals : $LOCK
+
+=cut
+sub unlock()
+{
+ unlink($LOCK);
+ &ProcessBiomajLib::Info("Removing lock file. Lock file is $LOCK") if $VERBOSE;
+}
+
+=head2 procedure cleanEnvSrsForBiomaj
+
+ Title : cleanEnvSrsForBiomaj
+ Usage : cleanEnvSrsForBiomaj()
+ Prerequisite : none
+ Fonction : Efface les repertoires temporaire qui ont du etre crees pour le bon fonctionnement de l'indexation
+ Returns : none
+ Args : none
+ Globals : @A_UNLINK_DIR
+
+=cut
+sub cleanEnvSrsForBiomaj()
+{
+ foreach my $dir (@A_UNLINK_DIR)
+ {
+ my $cmd = "$H_CMD{UNIX_RM} -rf $dir";
+ `$cmd`;
+ }
+}
+
+=head2 procedure init
+
+ Title : init
+ Usage : init()
+ Prerequisite : none
+ Fonction : Initialise l'environnement de travail du script.
+ Returns : none
+ Args : none
+ Globals : $FORCE, $CPU_OPTION, $HELP
+
+=cut
+sub init()
+{
+ &getUsage() if $HELP;
+ &__initGlobalVar();
+
+ &ProcessBiomajLib::Info("Verbose mode ON.") if $VERBOSE;
+ &setForce() if $FORCE;
+ &setBank();
+ &setCpu() if $CPU_OPTION;
+
+ &__initEnvSrsForBiomaj();
+
+ return;
+}
+
+sub __initGlobalVar()
+{
+ &ProcessBiomajLib::checkBiomajEnvironment();
+ &ProcessBiomajLib::readCfgFile(\%H_CMD);
+
+ &ProcessBiomajLib::Error("SRSROOT is not defined !!") if ( $SRSROOT eq "" );
+ &ProcessBiomajLib::Error("No such or directory \$SRSROOT: $SRSROOT") if ( !-e($SRSROOT) );
+
+ $DB_NAME = $ENV{'dbname'} if ( $DB_NAME eq "" );
+ &ProcessBiomajLib::Error("dbname is not define. You must define --dbname or environment variable 'dbname'") if ($DB_NAME eq "");
+
+ $PATH_LOG_DIR = &ProcessBiomajLib::getPathFuturReleaseLogDir();
+ $PATH_SRS_DIR = &ProcessBiomajLib::getPathFuturReleaseMyDir($INDEX_DIR);
+ system("$H_CMD{UNIX_MKDIR} $PATH_LOG_DIR") if ( !-e($PATH_LOG_DIR) );
+ system("$H_CMD{UNIX_MKDIR} $PATH_SRS_DIR") if ( !-e($PATH_SRS_DIR) );
+
+# &ProcessBiomajLib::Error ("--batch_system sh and --pvm : incompatible options") if ( $BATCH_SYSTEM eq "sh" & $USEPVM );
+ &ProcessBiomajLib::Error ("You must define --batch_system whith pbs|sge|other for used --pvm") if ( $USEPVM & $BATCH_SYSTEM !~ /(sge|pbs|other)/ );
+
+ $BATCH_SYSTEM = "sh" if ( $BATCH_SYSTEM eq "" );
+ &ProcessBiomajLib::Error ("nonvalid option : --batch_system $BATCH_SYSTEM\nPossible value : sh,sge,pbs,other") if ( $BATCH_SYSTEM !~ /(sh|sge|pbs|other)/ );
+
+ $PATH_MAKEFILE_DIR = $ENV{SRS_MAKEFILEDIR} if ( $ENV{SRS_MAKEFILEDIR} ne "");
+ $SRS_OPTIONS = $ENV{SRS_OPTIONS} if ( $ENV{SRS_OPTIONS} ne "");
+ $SRSCHECK_OPTIONS = $SRS_OPTIONS;
+ $CPUNUMBER = $ENV{SRS_CPUNUMBER} if ( $ENV{SRS_CPUNUMBER} ne "");
+ $LOCK = $ENV{SRS_LOCK} if ( $ENV{SRS_LOCK} ne "");
+}
+
+sub __initEnvSrsForBiomaj()
+{
+ my $dir_version = &ProcessBiomajLib::getPathDirVersion();
+ my $srs_online_dir = "$dir_version/".&ProcessBiomajLib::getCurrentLink();
+ my $srs_online_data_dir = "$srs_online_dir/".&ProcessBiomajLib::getFlatDir();
+ my $srs_online_index_dir = "$srs_online_dir/$INDEX_DIR";
+ my $srs_offline_dir = "$dir_version/".&ProcessBiomajLib::getFuturReleaseLink();
+ my $srs_offline_data_dir = "$srs_offline_dir/".&ProcessBiomajLib::getFlatDir();
+ my $srs_offline_index_dir = "$srs_offline_dir/$INDEX_DIR";
+
+ if ( !-e("$srs_online_dir") )
+ {
+ system("$H_CMD{UNIX_MKDIR} $srs_online_dir");
+ system("$H_CMD{UNIX_MKDIR} $srs_online_data_dir");
+ system("$H_CMD{UNIX_MKDIR} $srs_online_index_dir");
+
+ push(@A_UNLINK_DIR,$srs_online_dir);
+ push(@A_UNLINK_DIR,$srs_online_data_dir);
+ push(@A_UNLINK_DIR,$srs_online_index_dir);
+ }
+ elsif ( !-e($srs_online_index_dir) )
+ {
+ system("$H_CMD{UNIX_MKDIR} $srs_online_index_dir");
+ push(@A_UNLINK_DIR,$srs_online_index_dir);
+ }
+ elsif ( !-e($srs_online_data_dir) )
+ {
+ system("$H_CMD{UNIX_MKDIR} $srs_online_data_dir");
+ push(@A_UNLINK_DIR,$srs_online_data_dir);
+ }
+
+ system("$H_CMD{UNIX_MKDIR} $srs_offline_index_dir") if ( !-e($srs_offline_index_dir) );
+
+ &ProcessBiomajLib::Error("No such or directory : $srs_offline_data_dir") if ( !-e($srs_offline_data_dir) );
+ &ProcessBiomajLib::Error("No such or directory : $srs_offline_index_dir") if ( !-e($srs_offline_index_dir) );
+ &ProcessBiomajLib::Error("No such or directory : $srs_online_data_dir") if ( !-e($srs_online_data_dir) );
+ &ProcessBiomajLib::Error("No such or directory : $srs_online_index_dir") if ( !-e($srs_online_index_dir) );
+
+ $GETZ = $H_CMD{GETZ} if ( defined($H_CMD{GETZ}) );
+ $SRSCHECK = $H_CMD{SRSCHECK} if ( defined($H_CMD{SRSCHECK}) );
+}
+
+=head2 procedure setBank
+
+ Title : setBank
+ Usage : setBank()
+ Prerequisite : none
+ Fonction : Initialise @A_BANKS avec les valeur de --dbname (split sur virgule ',')
+ Returns : none
+ Args : nome
+ Globals : @A_BANKS
+
+=cut
+sub setBank()
+{
+ if (!$DB_NAME)
+ {
+ Warning("dbname in -d option not specified.\nDefault SRS bank : $ENV{dbname}");
+ $DB_NAME = $ENV{dbname};
+ }
+ if (!$DB_NAME)
+ {
+ &ProcessBiomajLib::Error("--dbname and environment variable dbname are not specified !!");
+ }
+
+ @A_BANKS = split /,/,$DB_NAME;
+}
+
+=head2 procedure setLogFile
+
+ Title : setLogFile
+ Usage : setLogFile($bank)
+ Prerequisite : none
+ Fonction : Renseigne $PATH_LOG_FILE avec de chemin absolu du fichier de log
+ Returns : none
+ Args : $bank : nom de la banque SRS
+ Globals : $PATH_LOG_FILE et $PATH_LOG_DIR
+
+=cut
+sub setLogFile()
+{
+ my $bank = shift;
+
+ $PATH_LOG_FILE="$PATH_LOG_DIR/$bank.srs.log";
+ &ProcessBiomajLib::Info("The file log is $PATH_LOG_FILE for the bank : $bank.") if $VERBOSE;
+}
+
+=head2 procedure setMakefile
+
+ Title : setMakefile
+ Usage : setMakefile($bank)
+ Prerequisite : none
+ Fonction : Renseigne $PATH_MAKEFILE_FILE avec de chemin absolu du fichier makefile
+ Returns : none
+ Args : $bank : nom de la banque SRS
+ Globals : $PATH_MAKEFILE_FILE et $PATH_MAKEFILE_DIR
+
+=cut
+sub setMakefile($bank)
+{
+ my $bank = shift;
+ $PATH_MAKEFILE_FILE="$PATH_MAKEFILE_DIR/$bank";
+}
+
+=head2 procedure setCpu
+
+ Title : setCpu
+ Usage : setCpu()
+ Prerequisite : none
+ Fonction : Renseigne $CPUNUMBER avec la valeur --cpu
+ Returns : none
+ Args : none
+ Globals : $CPUNUMBER et $CPU_OPTION
+
+=cut
+sub setCpu() {
+ &ProcessBiomajLib::Info("Force CPU number to $CPU_OPTION.") if $VERBOSE;
+ $CPUNUMBER=$CPU_OPTION;
+}
+
+=head2 procedure setForce
+
+ Title : setForce
+ Usage : setForce()
+ Prerequisite : none
+ Fonction : Ajoute l'option -force a la ligne d'option de 'srscheck'
+ Returns : none
+ Args : none
+ Globals : $SRSCHECK_OPTIONS
+
+=cut
+sub setForce()
+{
+ &ProcessBiomajLib::Info("Force indexing mode ON.") if $VERBOSE;
+ $SRSCHECK_OPTIONS .= " -force ";
+}
+
+=head2 procedure getOutputFiles
+
+ Title : getOutputFiles
+ Usage : getOutputFiles()
+ Prerequisite : none
+ Fonction : Extrait du repertoire des index SRS ($PATH_SRS_DIR), la liste des fichiers index
+ et fait appel a ProcessBiomajLib::outputFile() pour chaque fichier.
+ : Place les droit 644 (rw-r--r--) sur chaque fichier.
+ Returns : none
+ Args : none
+ Globals : $PATH_SRS_DIR
+
+=cut
+sub getOutputFiles()
+{
+ opendir (SRS_DIR,$PATH_SRS_DIR);
+ while (my $file = readdir(SRS_DIR))
+ {
+ next if ( $file =~ /^\.+$/ );
+ &ProcessBiomajLib::outputFile("$PATH_SRS_DIR/$file");
+
+ chmod(0644,"$PATH_SRS_DIR/$file");
+ }
+ closedir(SRS_DIR);
+}
+
+
+#
+# Message about this program and how to use it
+#
+sub getUsage()
+{
+print STDERR "
+This program indexing a bank for SRS.
+
+indexSrsTLSE.pl [--dbname bankName] [--logdir logDirectory] [--only_check] [--execute execute_system] [--pvm]
+ [--cpu_number cpuNumber] [--force] [--help] [--verbose]
+
+ --dbname (d) bankname : SRS bank name [default:$ENV{dbname}]
+ --logdir (l) directory : log directory
+ --only_check (o) : Test if an indexing is necessary [default:off]
+ --execute (e) execute_system : submit indexing on scheduler (sh|pbs|sge|other) [default:$BATCH_SYSTEM]
+ --pvm (p) : Used pvm [default:off]
+ --cpu_number (c) CpuNumber : specify the CPU number or node number [default:$CPU_OPTION]
+ --force (f) : force indexing [default:off]
+ --help (h) : this (help) message
+ --verbose (v) : verbose output [default:off]
+
+--dbname (-d) bankname
+
+ SRS bank name
+ default = \$ENV{dbname}
+
+--logdir (-l) 'logDirectory'
+
+ default = Resultat de &ProcessBiomajLib::getPathFuturReleaseLogDir()
+
+--only_check (-o)
+
+ Test seulement si la banque a besoin d'etre indexee.
+ default = off
+
+--execute (-e) system
+
+ La ligne de commande pour le formatage des fichiers fasta peut etre executee sur la machine local
+ ou etre transcrite dans un fichier pour une execution via un systeme de queue.
+ Voir ProcessBiomajLib::executeBatch() pour une utilisation sur votre systeme.
+ On doit preciser pour chaque system, la commande systeme a utiliser et les options via le fichier unix_command_system.cfg
+ Ex pour --execute pbs :
+ EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+ EXECUTE_BATCH_OPTIONS_PBS=-q longq
+ Par defaut, les commandes sont executees via un appel systeme classique (--execute sh)
+ default = sh
+
+--pvm (-p)
+
+ Utilisation de pvm pour une execution avec pbs.
+ default = off
+
+--cpu_number (-c)
+
+ Specify the CPU number or node number
+ default:$CPU_OPTION
+
+--force (f)
+
+ Force l'indexation
+ default:off
+
+--verbose (-v)
+
+--help (-h)
+
+";
+
+exit 1;
+}
+
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/indexSrsTLSE.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/sendMailTLSE.pl
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/sendMailTLSE.pl (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/sendMailTLSE.pl 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,246 @@
+#!/usr/bin/perl
+# Author : Genopole Toulouse - Yoann.Beausse at toulouse.inra.fr
+# Version : 0.8
+# Date : 01/03/2007
+#
+#-------------------------------------------------------------------------------
+# PROGRAMME : sendMailTLSE.pl
+# VERSION : 0.8
+# DATE : 01/03/2007
+# COMMENTAIRES :
+# Au 01/03/2007 : Ce script envoye des mails dans le cadre des pre et post process de Biomaj.
+#
+# PREREQUIS : Toutes les commandes system dans ce script sont definis dans le fichier unix_command_system.cfg
+# Pour le moment, ce fichier doit exister dans $BIOMAJ_ROOT/scripts/ avec le path des commandes unix ci-dessous pour la bonne execution de ce script :
+# UNIX_MAIL
+#
+# AIDE : sendMailTLSE.pl --help
+#
+#
+# VARIABLES
+# D'ENVIRONNEMENT : Donnees par Biomaj : BIOMAJ_ROOT PP_WARNING PP_END dbname datadir dirversion remoterelease offlinedir remotedir dirversion noextract localfiles remotefiles
+#
+# UTILISATION : --to (-t) 'toto at titi.fr'
+# --subject (-s) Sujet du message
+# --message (-m) Corps de message
+#
+# Si --to n'est pas renseigne, on utilise $ENV{BIOMAJ_ADMIN_MAIL}. Si toujours vide, exit (0). Ici le code de retour sur erreur est 0 pour ne pas faire arreter Biomaj sur une erreur d'envoi de mail.
+# Si --subject n'est pas renseigne, le sujet par defaut est : "No subject !!!"
+# Si --message n'est pas renseigne, seul un warning est emis et le mail est envoye.
+#
+# Dans --subject et --message, on peut utiliser certaine variable qui seront interpretees par sendMailTLSE.pl
+# - db.name data.dir dir.version offline.dir remote.dir dir.version no.extract local.files remote.files
+# ---> reprend les valeurs de ces meme variables dans le fichier bank.properties
+# - remote.release ---> Variable de Biomaj calcule dynamiquement (N'est disponible que pour un POST process)
+# - removed.release ---> Variable de Biomaj calcule dynamiquement (N'est disponible que pour un REMOVE process)
+# - local.time ---> date et heure (Thu Mar 1 15:05:48 2007)
+#-------------------------------------------------------------------------------
+
+=head1 NAME
+
+sendMailTLSE.pl - Envoie de mail
+
+=head1 SYNOPSIS
+
+sendMailTLSE.pl [--to adresse at mail] [--subject "subject"] [--message "msg"] [--help]
+
+=head1 Description
+
+Ce script fait partie des PostProcess de BioMaJ.
+Il permet d'envoyer un mail a l'administrateur de Biomaj (par defaut) ou a tout autre adresses.
+Ce script peut substituer certaines variables de BioMaJ par leur valeur :
+
+ - db.nanme
+ - data.dir
+ - dir.version
+ - offline.dir
+ - remote.release
+ - removed.release
+ - remote.dir
+ - remote.files
+ - local.files
+ - no.extract
+
+ et - local.time qui est remplace par la date et l'heure selon de format "ddd mmm jj hh:mm:ss aaaa"
+ d:Jour de la semaine, m:mois, j:numero du jour, h:heure, m:minute, s:seconde, a:annee
+
+=head1 VERSION
+
+Version 0.9
+March 2007
+
+=head1 COPYRIGHT
+
+This program is distributed under the CeCILL License. (http://www.cecill.info)
+
+=head1 ARGUMENTS
+
+B<--to (-t) adresse at mail>
+
+ Adresse mail du destinataire.
+ Un mail sera toujours envoye a l'adresse precissee par la variable 'mail.admin' dans global.properties (BioMaJ)
+ default = $ENV{mailadmin}
+
+B<--subject (-s) 'subject'>
+
+ Sujet du mail.
+ default = "No subject !!!"
+
+B<--message (-m) 'message'>
+
+ Message du mail
+ default = ""
+
+B<--help (-h)>
+
+=head1 AUTHOR
+
+ Yoann Beausse <Yoann.Beausse at toulouse.inra.fr>
+ Plateforme Bioinformatique - Genopole Midi-Pyrenees Toulouse
+
+=cut
+
+
+
+use strict;
+use Getopt::Long;
+use lib ("$ENV{BIOMAJ_ROOT}/conf/process/.");
+use ProcessBiomajLib;
+
+my %H_CMD;
+my ($TO,$SUBJECT,$MESSAGE,$HELP)=("","","");
+
+my $result = GetOptions ( "to=s" => \$TO,
+ "subject=s" => \$SUBJECT,
+ "message=s" => \$MESSAGE,
+ "help" => \$HELP,
+ );
+
+MAIN:
+{
+ &Usage() if ($HELP);
+
+ &InitGlobalVar();
+ $SUBJECT = &SubstituteFlag($SUBJECT);
+ $MESSAGE = &SubstituteFlag($MESSAGE);
+
+ my $file_msg = "/tmp/bmaj.msg";
+ open(MSG,">$file_msg");
+ print MSG $MESSAGE;
+ close(MSG);
+
+ my $cmd = "$H_CMD{UNIX_MAIL} -s \"$SUBJECT\" $TO < $file_msg";
+ `$cmd`;
+
+ unlink($file_msg);
+}
+
+=head1 Routines
+
+=head2 procedure SubstituteFlag
+
+ Title : SubstituteFlag
+ Usage : SubstituteFlag($string)
+ Prerequisite : none
+ Fonction : Substitue les flag par leur valeur.
+ Returns : $string
+ Args : $string : string a traiter
+ Globals : none
+
+=cut
+sub SubstituteFlag
+{
+ my $string = shift;
+
+ $string =~ s/db.name/$ENV{dbname}/gm if ( $ENV{dbname} ne "" );
+ $string =~ s/remote.release/$ENV{remoterelease}/gm if ( $ENV{remoterelease} ne "" );
+ $string =~ s/removed.release/$ENV{removedrelease}/gm if ( $ENV{remoterelease} ne "" );
+ $string =~ s/data.dir/$ENV{datadir}/gm if ( $ENV{datadir} ne "" );
+ $string =~ s/offline.dir/$ENV{offlinedir}/gm if ( $ENV{offlinedir} ne "" );
+ $string =~ s/remote.dir/$ENV{remotedir}/gm if ( $ENV{remotedir} ne "" );
+ $string =~ s/dir.version/$ENV{dirversion}/gm if ( $ENV{dirversion} ne "" );
+ $string =~ s/no.extract/$ENV{noextract}/gm if ( $ENV{noextract} ne "" );
+ $string =~ s/local.files/$ENV{localfiles}/gm if ( $ENV{localfiles} ne "" );
+ $string =~ s/remote.files/$ENV{remotefiles}/gm if ( $ENV{remotefiles} ne "" );
+
+
+ my $time = scalar localtime(time);
+ $string =~ s/local.time/$time/g;
+ return $string;
+}
+
+=head2 procedure InitGlobalVar
+
+ Title : InitGlobalVar
+ Usage : InitGlobalVar()
+ Prerequisite : none
+ Fonction : Initialisation des variables.
+ Returns : none
+ Args : none
+ Globals :
+
+=cut
+sub InitGlobalVar
+{
+ &ProcessBiomajLib::readCfgFile(\%H_CMD);
+
+ if ( exists($ENV{mailadmin}) )
+ {
+ if ( $TO !~ /$ENV{mailadmin}/ )
+ {
+ $TO .= ";" if ($TO ne "");
+ $TO .= "$ENV{mailadmin}"
+ }
+ }
+
+ $TO = "\"$TO\"";
+
+ if ( $TO !~ /\S+@\S+\.\S+/ )
+ {
+ &Warning("Address not valid : $TO");
+ &Warning("Message not send");
+ exit(0);
+ }
+
+ &Warning("Message is empty") if ( $MESSAGE eq "" );
+
+ if ( $SUBJECT eq "")
+ {
+ $SUBJECT = "No subject !!!";
+ &Warning("Subject is empty. Default subject is : $SUBJECT");
+ }
+ return;
+}
+
+=head2 procedure Usage
+
+ Title : Usage
+ Usage : Usage($msg)
+ Prerequisite : none
+ Fonction : Affiche $msg + l'usage du script + exit(1)
+ Returns : none
+ Args : $msg : message precisant l'erreur
+ Globals : none
+
+=cut
+sub Usage()
+{
+
+ my $message = shift;
+
+print STDERR "$message\n" if ( defined($message) && $message ne "" );
+
+print STDOUT <<END
+
+./sendMailTLSE.pl
+
+Arguments :
+ optional :
+ --to (-t) : adresse mail du destinataire. Default : \$ENV{mail.admin}
+ --subject (-s) : sujet du message. Default : "No subject !!!"
+ --message (-m) : Corps du message. Default : ""
+ --help (-h) : This mesage
+END
+;
+ exit(-1);
+}
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/sendMailTLSE.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/unix_command_system.cfg
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/unix_command_system.cfg (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/conf/process/unix_command_system.cfg 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,31 @@
+# unix_cmd.cfg
+#
+# Complete path to every unix command used in Biomaj
+#
+
+EXECUTE_BATCH_CMD_PBS=/usr/pbs/bin/qsub
+
+EXECUTE_BATCH_OPTION_PBS=-q longq -W block=true
+EXECUTE_BATCH_OPTION_PBS_SRS=-q srsq -W block=true -A SRS -j oe -V
+
+FASTACMD=/usr/bin/fastacmd
+FORMATDB=/usr/bin/formatdb
+GETZ=/data/srs/srs/bin/linux73/getz
+SRSCHECK=/data/srs/srs/etc/srscheck
+
+UNIX_CHMOD=/bin/chmod
+UNIX_DATE=/bin/date
+UNIX_GZIP=/bin/gzip
+UNIX_GUNZIP=/bin/gunzip
+UNIX_HEAD=/usr/bin/head
+UNIX_LN=/bin/ln
+UNIX_LS=/bin/ls
+UNIX_MAIL=/usr/bin/Mail
+UNIX_MAKE=/usr/bin/make
+UNIX_MKDIR=/bin/mkdir
+UNIX_MV=/bin/mv
+UNIX_PWD=/bin/pwd
+UNIX_RM=/bin/rm
+UNIX_SH=/bin/sh
+UNIX_TOUCH=/bin/touch
+UNIX_ZCAT=/bin/zcat
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/commons-cli-2.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/commons-cli-2.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/jakarta-oro-2.1-dev-1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/lib/jakarta-oro-2.1-dev-1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/hsql.sql
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/hsql.sql (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/hsql.sql 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,442 @@
+
+-- -----------------------------------------------------
+-- Sequence used to generator non pk fields
+-- -----------------------------------------------------
+DROP SEQUENCE generator IF EXISTS;
+CREATE SEQUENCE generator AS INTEGER START WITH 0 INCREMENT BY 1;
+
+-- -----------------------------------------------------
+-- Table remoteInfo
+-- -----------------------------------------------------
+DROP TABLE remoteInfo IF EXISTS CASCADE;
+CREATE CACHED TABLE remoteInfo (
+ idremoteInfo INT GENERATED BY DEFAULT AS IDENTITY,
+ protocol VARCHAR(45) NULL ,
+ port INT NULL ,
+ dbName VARCHAR(45) NULL ,
+ dbFullname VARCHAR(512) NULL ,
+ dbType VARCHAR(128) NULL ,
+ server VARCHAR(256) NULL ,
+ remoteDir VARCHAR(256) NULL ,
+ PRIMARY KEY (idremoteInfo) )
+
+
+
+-- -----------------------------------------------------
+-- Table localInfo
+-- -----------------------------------------------------
+DROP TABLE localInfo IF EXISTS CASCADE;
+CREATE CACHED TABLE localInfo (
+ idlocalInfo INT GENERATED BY DEFAULT AS IDENTITY,
+ offlineDirectory VARCHAR(256) NULL ,
+ versionDirectory VARCHAR(256) NULL ,
+ frequency INT NULL ,
+ dolinkcopy BOOLEAN NULL ,
+ logfile BOOLEAN NULL ,
+ releaseFile VARCHAR(45) NULL ,
+ releaseRegexp VARCHAR(128) NULL ,
+ remoteFiles VARCHAR(128) NULL ,
+ remoteExcludedFiles VARCHAR(128) NULL ,
+ localFiles VARCHAR(128) NULL ,
+ nversions INT NULL ,
+ PRIMARY KEY (idlocalInfo) )
+
+
+-- -----------------------------------------------------
+-- Table bank
+-- -----------------------------------------------------
+DROP TABLE bank IF EXISTS CASCADE;
+CREATE CACHED TABLE bank (
+ idbank INT GENERATED BY DEFAULT AS IDENTITY,
+ name VARCHAR(45) NULL,
+ PRIMARY KEY (idbank))
+
+
+-- -----------------------------------------------------
+-- Table configuration
+-- -----------------------------------------------------
+DROP TABLE configuration IF EXISTS CASCADE;
+CREATE CACHED TABLE configuration (
+ idconfiguration BIGINT,
+ ref_idremoteInfo INT NOT NULL ,
+ ref_idlocalInfo INT NOT NULL ,
+ ref_idbank INT NOT NULL ,
+ date DATETIME NULL ,
+ file VARCHAR(256) NULL ,
+ insert_hack INT NULL,
+ PRIMARY KEY (idconfiguration) ,
+ CONSTRAINT fk_configuration_remoteInfo1
+ FOREIGN KEY (ref_idremoteInfo )
+ REFERENCES remoteInfo (idremoteInfo )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_configuration_localInfo1
+ FOREIGN KEY (ref_idlocalInfo )
+ REFERENCES localInfo (idlocalInfo )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_configuration_bank1
+ FOREIGN KEY (ref_idbank )
+ REFERENCES bank (idbank )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_configuration_remoteInfo1 ON configuration (ref_idremoteInfo ASC) ;
+
+CREATE INDEX fk_configuration_localInfo1 ON configuration (ref_idlocalInfo ASC) ;
+
+CREATE INDEX fk_configuration_bank1 ON configuration (ref_idbank ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table updateBank
+-- -----------------------------------------------------
+DROP TABLE updateBank IF EXISTS CASCADE;
+CREATE CACHED TABLE updateBank (
+ idupdateBank INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idconfiguration BIGINT NOT NULL ,
+ release VARCHAR(45) NULL ,
+ productionDirectoryPath VARCHAR(256) NULL ,
+ productionDirectoryDeployed BOOLEAN NULL ,
+ sizeDownload VARCHAR(45) NULL ,
+ sizeRelease VARCHAR(45) NULL ,
+ startTime DATETIME NULL ,
+ endTime DATETIME NULL ,
+ elapsedTime VARCHAR(45) NULL ,
+ update BOOLEAN NULL ,
+ nbSessions INT NULL ,
+ idLastSession BIGINT NULL ,
+ PRIMARY KEY (idupdateBank) ,
+ CONSTRAINT fk_updateBank_configuration1
+ FOREIGN KEY (ref_idconfiguration )
+ REFERENCES configuration (idconfiguration )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_updateBank_configuration1 ON updateBank (ref_idconfiguration ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table sessionTask
+-- -----------------------------------------------------
+DROP TABLE sessionTask IF EXISTS CASCADE;
+CREATE CACHED TABLE sessionTask (
+ idsessionTask INT GENERATED BY DEFAULT AS IDENTITY,
+ startTime DATETIME NULL ,
+ endTime DATETIME NULL ,
+ elapsedTime VARCHAR(45) NULL ,
+ status VARCHAR(45) NULL ,
+ value VARCHAR(128) NULL ,
+ nbExtract INT NULL ,
+ nbLocalOnlineFiles INT NULL ,
+ nbLocalOfflineFiles INT NULL ,
+ nbDownloadFiles INT NULL ,
+ bandwidth FLOAT NULL ,
+ nbFilesMoved INT NULL ,
+ nbFilesCopied INT NULL ,
+ taskType VARCHAR(45) NULL ,
+ nbreMetaProcess INT NULL ,
+ PRIMARY KEY (idsessionTask) )
+
+
+
+-- -----------------------------------------------------
+-- Table session
+-- -----------------------------------------------------
+DROP TABLE session IF EXISTS CASCADE;
+CREATE CACHED TABLE session (
+ idsession BIGINT NOT NULL ,
+ ref_idupdateBank INT NOT NULL ,
+ href VARCHAR(256) NULL ,
+ parse VARCHAR(45) NULL ,
+ status BOOLEAN NULL ,
+ startTime DATETIME NULL ,
+ endTime DATETIME NULL ,
+ elapsedTime VARCHAR(45) NULL ,
+ logfile VARCHAR(128) NULL ,
+ insert_hack INT NULL,
+ PRIMARY KEY (idsession) ,
+ CONSTRAINT fk_session_updateBank1
+ FOREIGN KEY (ref_idupdateBank )
+ REFERENCES updateBank (idupdateBank )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+CREATE INDEX fk_session_updateBank1 ON session (ref_idupdateBank ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table metaprocess
+-- -----------------------------------------------------
+DROP TABLE metaprocess IF EXISTS CASCADE;
+CREATE CACHED TABLE metaprocess (
+ idmetaprocess VARCHAR(45) NOT NULL,
+ name VARCHAR(45) NULL ,
+ startTime DATETIME NULL ,
+ endTime DATETIME NULL ,
+ elapsedTime VARCHAR(45) NULL ,
+ status VARCHAR(45) NULL ,
+ logfile VARCHAR(256) NULL ,
+ block VARCHAR(45) NULL ,
+ ref_idsessionTask INT NOT NULL ,
+ insert_hack INT NULL,
+ PRIMARY KEY (idmetaprocess) ,
+ CONSTRAINT fk_metaprocess_sessionTask1
+ FOREIGN KEY (ref_idsessionTask )
+ REFERENCES sessionTask (idsessionTask )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_metaprocess_sessionTask1 ON metaprocess (ref_idsessionTask ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table process
+-- -----------------------------------------------------
+DROP TABLE process IF EXISTS CASCADE;
+CREATE CACHED TABLE process (
+ idprocess INT GENERATED BY DEFAULT AS IDENTITY,
+ name VARCHAR(45) NULL ,
+ keyname VARCHAR(45) NULL ,
+ exe VARCHAR(128) NULL ,
+ args VARCHAR(128) NULL ,
+ desc VARCHAR(512) NULL ,
+ type VARCHAR(45) NULL ,
+ startTime DATETIME NULL ,
+ endTime DATETIME NULL ,
+ elapsedTime VARCHAR(45) NULL ,
+ biomaj_error BOOLEAN NULL ,
+ timestamp BIGINT NULL ,
+ value VARCHAR(45) NULL ,
+ ref_idmetaprocess VARCHAR(45) NOT NULL ,
+ PRIMARY KEY (idprocess) ,
+ CONSTRAINT fk_process_metaprocess1
+ FOREIGN KEY (ref_idmetaprocess )
+ REFERENCES metaprocess (idmetaprocess )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_process_metaprocess1 ON process (ref_idmetaprocess ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table file
+-- -----------------------------------------------------
+DROP TABLE file IF EXISTS CASCADE;
+CREATE CACHED TABLE file (
+ idfile INT GENERATED BY DEFAULT AS IDENTITY ,
+ location VARCHAR(128) NULL ,
+ size BIGINT NULL ,
+ time BIGINT NULL ,
+ link BOOLEAN NULL ,
+ _extract BOOLEAN NULL ,
+ volatile BOOLEAN NULL ,
+ refHash VARCHAR(45) NULL ,
+ fileType VARCHAR(45) NULL ,
+ ref_idprocess INT NULL ,
+ PRIMARY KEY (idfile) ,
+ CONSTRAINT fk_file_process1
+ FOREIGN KEY (ref_idprocess )
+ REFERENCES process (idprocess )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+CREATE INDEX fk_file_process1 ON file (ref_idprocess ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table productionDirectory
+-- -----------------------------------------------------
+DROP TABLE productionDirectory IF EXISTS CASCADE;
+CREATE CACHED TABLE productionDirectory (
+ idproductionDirectory INT GENERATED BY DEFAULT AS IDENTITY,
+ remove DATETIME NULL ,
+ creation DATETIME NULL ,
+ size VARCHAR(45) NULL ,
+ state VARCHAR(45) NULL ,
+ session BIGINT NULL ,
+ path VARCHAR(256) NULL ,
+ ref_idbank INT NOT NULL ,
+ PRIMARY KEY (idproductionDirectory) ,
+ CONSTRAINT fk_productionDirectory_bank1
+ FOREIGN KEY (ref_idbank )
+ REFERENCES bank (idbank )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_productionDirectory_bank1 ON productionDirectory (ref_idbank ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table message
+-- -----------------------------------------------------
+DROP TABLE message IF EXISTS CASCADE;
+CREATE CACHED TABLE message (
+ idmessage INT GENERATED BY DEFAULT AS IDENTITY,
+ message VARCHAR(512) NULL ,
+ type VARCHAR(45) NULL ,
+ PRIMARY KEY (idmessage) )
+
+
+
+-- -----------------------------------------------------
+-- Table session_has_message
+-- -----------------------------------------------------
+DROP TABLE session_has_message IF EXISTS CASCADE;
+CREATE CACHED TABLE session_has_message (
+ idsession_has_message INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idsession BIGINT NOT NULL ,
+ ref_idmessage INT NOT NULL ,
+ PRIMARY KEY (idsession_has_message) ,
+ CONSTRAINT fk_session_has_message_session1
+ FOREIGN KEY (ref_idsession )
+ REFERENCES session (idsession )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_session_has_message_message1
+ FOREIGN KEY (ref_idmessage )
+ REFERENCES message (idmessage )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_session_has_message_session1 ON session_has_message (ref_idsession ASC) ;
+
+CREATE INDEX fk_session_has_message_message1 ON session_has_message (ref_idmessage ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table sessionTask_has_message
+-- -----------------------------------------------------
+DROP TABLE sessionTask_has_message IF EXISTS CASCADE;
+CREATE CACHED TABLE sessionTask_has_message (
+ idsessionTask_has_message INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idsessionTask INT NOT NULL ,
+ ref_idmessage INT NOT NULL ,
+ PRIMARY KEY (idsessionTask_has_message) ,
+ CONSTRAINT fk_sessionTask_has_message_sessionTask1
+ FOREIGN KEY (ref_idsessionTask )
+ REFERENCES sessionTask (idsessionTask )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_sessionTask_has_message_message1
+ FOREIGN KEY (ref_idmessage )
+ REFERENCES message (idmessage )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_sessionTask_has_message_sessionTask1 ON sessionTask_has_message (ref_idsessionTask ASC) ;
+
+CREATE INDEX fk_sessionTask_has_message_message1 ON sessionTask_has_message (ref_idmessage ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table metaprocess_has_message
+-- -----------------------------------------------------
+DROP TABLE metaprocess_has_message IF EXISTS CASCADE;
+CREATE CACHED TABLE metaprocess_has_message (
+ idmetaprocess_has_message INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idmetaprocess VARCHAR(45) NOT NULL ,
+ ref_idmessage INT NOT NULL ,
+ PRIMARY KEY (idmetaprocess_has_message) ,
+ CONSTRAINT fk_metaprocess_has_message_metaprocess1
+ FOREIGN KEY (ref_idmetaprocess )
+ REFERENCES metaprocess (idmetaprocess )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_metaprocess_has_message_message1
+ FOREIGN KEY (ref_idmessage )
+ REFERENCES message (idmessage )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_metaprocess_has_message_metaprocess1 ON metaprocess_has_message (ref_idmetaprocess ASC) ;
+
+CREATE INDEX fk_metaprocess_has_message_message1 ON metaprocess_has_message (ref_idmessage ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table process_has_message
+-- -----------------------------------------------------
+DROP TABLE process_has_message IF EXISTS CASCADE;
+CREATE CACHED TABLE process_has_message (
+ idprocess_has_message INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idprocess INT NOT NULL ,
+ ref_idmessage INT NOT NULL ,
+ PRIMARY KEY (idprocess_has_message) ,
+ CONSTRAINT fk_process_has_message_process1
+ FOREIGN KEY (ref_idprocess )
+ REFERENCES process (idprocess )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_process_has_message_message1
+ FOREIGN KEY (ref_idmessage )
+ REFERENCES message (idmessage )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+
+CREATE INDEX fk_process_has_message_process1 ON process_has_message (ref_idprocess ASC) ;
+
+CREATE INDEX fk_process_has_message_message1 ON process_has_message (ref_idmessage ASC) ;
+
+
+
+-- -----------------------------------------------------
+-- Table session_has_sessionTask
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS session_has_sessionTask;
+CREATE CACHED TABLE session_has_sessionTask (
+ idsession_has_sessionTask INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idsession BIGINT NOT NULL ,
+ ref_idsessionTask INT NOT NULL ,
+ PRIMARY KEY (idsession_has_sessionTask) ,
+ CONSTRAINT fk_session_has_sessionTask_session1
+ FOREIGN KEY (ref_idsession )
+ REFERENCES session (idsession )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_session_has_sessionTask_sessionTask1
+ FOREIGN KEY (ref_idsessionTask )
+ REFERENCES sessionTask (idsessionTask )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+CREATE INDEX fk_session_has_sessionTask_session1 ON session_has_sessionTask (ref_idsession ASC) ;
+
+CREATE INDEX fk_session_has_sessionTask_sessionTask1 ON session_has_sessionTask (ref_idsessionTask ASC) ;
+
+
+
+-- -----------------------------------------------------
+-- Table sessionTask_has_file
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS sessionTask_has_file ;
+
+CREATE CACHED TABLE sessionTask_has_file (
+ idsessionTask_has_file INT GENERATED BY DEFAULT AS IDENTITY,
+ ref_idsessionTask INT NOT NULL ,
+ ref_idfile INT NOT NULL ,
+ PRIMARY KEY (idsessionTask_has_file) ,
+ CONSTRAINT fk_sessionTask_has_file_sessionTask1
+ FOREIGN KEY (ref_idsessionTask )
+ REFERENCES sessionTask (idsessionTask )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT fk_sessionTask_has_file_file1
+ FOREIGN KEY (ref_idfile )
+ REFERENCES file (idfile )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+
+CREATE INDEX fk_sessionTask_has_file_sessionTask1 ON sessionTask_has_file (ref_idsessionTask ASC) ;
+
+CREATE INDEX fk_sessionTask_has_file_file1 ON sessionTask_has_file (ref_idfile ASC) ;
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/mysql.sql
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/mysql.sql (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/sql/mysql.sql 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,469 @@
+SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
+SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
+SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
+
+DROP SCHEMA IF EXISTS `biomaj_log` ;
+CREATE SCHEMA IF NOT EXISTS `biomaj_log` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
+USE `biomaj_log`;
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`remoteInfo`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`remoteInfo` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`remoteInfo` (
+ `idremoteInfo` INT NOT NULL AUTO_INCREMENT ,
+ `protocol` VARCHAR(45) NULL ,
+ `port` INT NULL ,
+ `dbName` VARCHAR(45) NULL ,
+ `dbFullname` TEXT NULL ,
+ `dbType` VARCHAR(128) NULL ,
+ `server` VARCHAR(256) NULL ,
+ `remoteDir` VARCHAR(256) NULL ,
+ PRIMARY KEY (`idremoteInfo`) )
+ENGINE = InnoDB;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`localInfo`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`localInfo` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`localInfo` (
+ `idlocalInfo` INT NOT NULL AUTO_INCREMENT ,
+ `offlineDirectory` VARCHAR(256) NULL ,
+ `versionDirectory` VARCHAR(256) NULL ,
+ `frequency` INT NULL ,
+ `dolinkcopy` TINYINT(1) NULL ,
+ `logfile` TINYINT(1) NULL ,
+ `releaseFile` VARCHAR(512) NULL ,
+ `releaseRegexp` VARCHAR(512) NULL ,
+ `remoteFiles` TEXT NULL ,
+ `remoteExcludedFiles` VARCHAR(512) NULL ,
+ `localFiles` VARCHAR(512) NULL ,
+ `nversions` INT NULL ,
+ PRIMARY KEY (`idlocalInfo`) )
+ENGINE = InnoDB;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`bank`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`bank` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`bank` (
+ `idbank` INT NOT NULL AUTO_INCREMENT ,
+ `name` VARCHAR(45) NULL ,
+ PRIMARY KEY (`idbank`) )
+ENGINE = InnoDB;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`configuration`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`configuration` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`configuration` (
+ `idconfiguration` BIGINT NOT NULL ,
+ `ref_idremoteInfo` INT NOT NULL ,
+ `ref_idlocalInfo` INT NOT NULL ,
+ `ref_idbank` INT NOT NULL ,
+ `date` DATETIME NULL ,
+ `file` VARCHAR(256) NULL ,
+ PRIMARY KEY (`idconfiguration`) ,
+ CONSTRAINT `fk_configuration_remoteInfos1`
+ FOREIGN KEY (`ref_idremoteInfo` )
+ REFERENCES `biomaj_log`.`remoteInfo` (`idremoteInfo` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_configuration_localInfo1`
+ FOREIGN KEY (`ref_idlocalInfo` )
+ REFERENCES `biomaj_log`.`localInfo` (`idlocalInfo` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_configuration_bank1`
+ FOREIGN KEY (`ref_idbank` )
+ REFERENCES `biomaj_log`.`bank` (`idbank` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_configuration_remoteInfos1` ON `biomaj_log`.`configuration` (`ref_idremoteInfo` ASC) ;
+
+CREATE INDEX `fk_configuration_localInfo1` ON `biomaj_log`.`configuration` (`ref_idlocalInfo` ASC) ;
+
+CREATE INDEX `fk_configuration_bank1` ON `biomaj_log`.`configuration` (`ref_idbank` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`updateBank`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`updateBank` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`updateBank` (
+ `idupdateBank` INT NOT NULL AUTO_INCREMENT ,
+ `ref_idconfiguration` BIGINT NOT NULL ,
+ `updateRelease` VARCHAR(45) NULL ,
+ `productionDirectoryPath` VARCHAR(256) NULL ,
+ `productionDirectoryDeployed` TINYINT(1) NULL ,
+ `sizeDownload` VARCHAR(45) NULL ,
+ `sizeRelease` VARCHAR(45) NULL ,
+ `startTime` DATETIME NULL ,
+ `endTime` DATETIME NULL ,
+ `elapsedTime` VARCHAR(45) NULL ,
+ `isUpdated` TINYINT(1) NULL ,
+ `nbSessions` INT NULL ,
+ `idLastSession` BIGINT NULL ,
+ PRIMARY KEY (`idupdateBank`) ,
+ CONSTRAINT `fk_updateBank_configuration1`
+ FOREIGN KEY (`ref_idconfiguration` )
+ REFERENCES `biomaj_log`.`configuration` (`idconfiguration` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_updateBank_configuration1` ON `biomaj_log`.`updateBank` (`ref_idconfiguration` ASC) ;
+
+CREATE INDEX `index_idLastSession` ON `biomaj_log`.`updateBank` (`idLastSession` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`session`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`session` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`session` (
+ `idsession` BIGINT NOT NULL ,
+ `ref_idupdateBank` INT NOT NULL ,
+ `href` VARCHAR(256) NULL ,
+ `parse` VARCHAR(45) NULL ,
+ `status` TINYINT(1) NULL ,
+ `startTime` DATETIME NULL ,
+ `endTime` DATETIME NULL ,
+ `elapsedTime` VARCHAR(45) NULL ,
+ `logfile` VARCHAR(128) NULL ,
+ PRIMARY KEY (`idsession`) ,
+ CONSTRAINT `fk_session_updateBank1`
+ FOREIGN KEY (`ref_idupdateBank` )
+ REFERENCES `biomaj_log`.`updateBank` (`idupdateBank` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_session_updateBank1` ON `biomaj_log`.`session` (`ref_idupdateBank` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`sessionTask`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`sessionTask` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`sessionTask` (
+ `idsessionTask` INT NOT NULL AUTO_INCREMENT ,
+ `startTime` DATETIME NULL ,
+ `endTime` DATETIME NULL ,
+ `elapsedTime` VARCHAR(45) NULL ,
+ `status` VARCHAR(45) NULL ,
+ `value` VARCHAR(128) NULL ,
+ `nbExtract` INT NULL ,
+ `nbLocalOnlineFiles` INT NULL ,
+ `nbLocalOfflineFiles` INT NULL ,
+ `nbDownloadFiles` INT NULL ,
+ `bandwidth` FLOAT NULL ,
+ `nbFilesMoved` INT NULL ,
+ `nbFilesCopied` INT NULL ,
+ `taskType` VARCHAR(45) NULL ,
+ `nbreMetaProcess` INT NULL ,
+ PRIMARY KEY (`idsessionTask`) )
+ENGINE = InnoDB;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`metaprocess`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`metaprocess` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`metaprocess` (
+ `idmetaprocess` VARCHAR(45) NOT NULL ,
+ `name` VARCHAR(45) NULL ,
+ `startTime` DATETIME NULL ,
+ `endTime` DATETIME NULL ,
+ `elapsedTime` VARCHAR(128) NULL ,
+ `status` VARCHAR(45) NULL ,
+ `logfile` VARCHAR(256) NULL ,
+ `block` VARCHAR(45) NULL ,
+ `ref_idsessionTask` INT NOT NULL ,
+ PRIMARY KEY (`idmetaprocess`) ,
+ CONSTRAINT `fk_metaprocess_sessionTask1`
+ FOREIGN KEY (`ref_idsessionTask` )
+ REFERENCES `biomaj_log`.`sessionTask` (`idsessionTask` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_metaprocess_sessionTask1` ON `biomaj_log`.`metaprocess` (`ref_idsessionTask` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`process`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`process` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`process` (
+ `idprocess` INT NOT NULL AUTO_INCREMENT ,
+ `name` VARCHAR(45) NULL ,
+ `keyname` VARCHAR(45) NULL ,
+ `exe` VARCHAR(128) NULL ,
+ `args` VARCHAR(512) NULL ,
+ `description` VARCHAR(512) NULL ,
+ `type` VARCHAR(45) NULL ,
+ `startTime` DATETIME NULL ,
+ `endTime` DATETIME NULL ,
+ `elapsedTime` VARCHAR(45) NULL ,
+ `biomaj_error` TINYINT(1) NULL ,
+ `timestamp` BIGINT NULL ,
+ `value` VARCHAR(45) NULL ,
+ `ref_idmetaprocess` VARCHAR(45) NOT NULL ,
+ PRIMARY KEY (`idprocess`) ,
+ CONSTRAINT `fk_process_metaprocess1`
+ FOREIGN KEY (`ref_idmetaprocess` )
+ REFERENCES `biomaj_log`.`metaprocess` (`idmetaprocess` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_process_metaprocess1` ON `biomaj_log`.`process` (`ref_idmetaprocess` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`file`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`file` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`file` (
+ `idfile` INT NOT NULL AUTO_INCREMENT ,
+ `location` VARCHAR(512) NULL ,
+ `size` BIGINT NULL ,
+ `time` BIGINT NULL ,
+ `link` TINYINT(1) NULL ,
+ `is_extract` TINYINT(1) UNSIGNED NULL ,
+ `volatile` TINYINT(1) NULL ,
+ `refHash` VARCHAR(256) NULL ,
+ `fileType` VARCHAR(45) NULL ,
+ `ref_idprocess` INT NULL ,
+ PRIMARY KEY (`idfile`) ,
+ CONSTRAINT `fk_file_process1`
+ FOREIGN KEY (`ref_idprocess` )
+ REFERENCES `biomaj_log`.`process` (`idprocess` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_file_process1` ON `biomaj_log`.`file` (`ref_idprocess` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`productionDirectory`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`productionDirectory` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`productionDirectory` (
+ `idproductionDirectory` INT NOT NULL AUTO_INCREMENT ,
+ `remove` DATETIME NULL ,
+ `creation` DATETIME NULL ,
+ `size` VARCHAR(45) NULL ,
+ `state` VARCHAR(45) NULL ,
+ `session` BIGINT NULL ,
+ `path` VARCHAR(256) NULL ,
+ `ref_idbank` INT NOT NULL ,
+ PRIMARY KEY (`idproductionDirectory`) ,
+ CONSTRAINT `fk_productionDirectory_bank1`
+ FOREIGN KEY (`ref_idbank` )
+ REFERENCES `biomaj_log`.`bank` (`idbank` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_productionDirectory_bank1` ON `biomaj_log`.`productionDirectory` (`ref_idbank` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`message`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`message` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`message` (
+ `idmessage` INT NOT NULL AUTO_INCREMENT ,
+ `message` TEXT NULL ,
+ `type` VARCHAR(45) NULL ,
+ PRIMARY KEY (`idmessage`) )
+ENGINE = InnoDB;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`session_has_message`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`session_has_message` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`session_has_message` (
+ `idsession_has_message` INT NOT NULL AUTO_INCREMENT ,
+ `ref_idsession` BIGINT NOT NULL ,
+ `ref_idmessage` INT NOT NULL ,
+ PRIMARY KEY (`idsession_has_message`) ,
+ CONSTRAINT `fk_session_has_message_session1`
+ FOREIGN KEY (`ref_idsession` )
+ REFERENCES `biomaj_log`.`session` (`idsession` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_session_has_message_message1`
+ FOREIGN KEY (`ref_idmessage` )
+ REFERENCES `biomaj_log`.`message` (`idmessage` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_session_has_message_session1` ON `biomaj_log`.`session_has_message` (`ref_idsession` ASC) ;
+
+CREATE INDEX `fk_session_has_message_message1` ON `biomaj_log`.`session_has_message` (`ref_idmessage` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`sessionTask_has_message`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`sessionTask_has_message` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`sessionTask_has_message` (
+ `ref_idsessionTask` INT NOT NULL ,
+ `ref_idmessage` INT NOT NULL ,
+ `idsessionTask_has_message` INT NOT NULL AUTO_INCREMENT ,
+ PRIMARY KEY (`idsessionTask_has_message`) ,
+ CONSTRAINT `fk_sessionTask_has_message_sessionTask1`
+ FOREIGN KEY (`ref_idsessionTask` )
+ REFERENCES `biomaj_log`.`sessionTask` (`idsessionTask` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_sessionTask_has_message_message1`
+ FOREIGN KEY (`ref_idmessage` )
+ REFERENCES `biomaj_log`.`message` (`idmessage` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_sessionTask_has_message_sessionTask1` ON `biomaj_log`.`sessionTask_has_message` (`ref_idsessionTask` ASC) ;
+
+CREATE INDEX `fk_sessionTask_has_message_message1` ON `biomaj_log`.`sessionTask_has_message` (`ref_idmessage` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`metaprocess_has_message`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`metaprocess_has_message` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`metaprocess_has_message` (
+ `ref_idmetaprocess` VARCHAR(45) NOT NULL ,
+ `ref_idmessage` INT NOT NULL ,
+ `idmetaprocess_has_message` INT NOT NULL AUTO_INCREMENT ,
+ PRIMARY KEY (`idmetaprocess_has_message`) ,
+ CONSTRAINT `fk_metaprocess_has_message_metaprocess1`
+ FOREIGN KEY (`ref_idmetaprocess` )
+ REFERENCES `biomaj_log`.`metaprocess` (`idmetaprocess` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_metaprocess_has_message_message1`
+ FOREIGN KEY (`ref_idmessage` )
+ REFERENCES `biomaj_log`.`message` (`idmessage` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_metaprocess_has_message_metaprocess1` ON `biomaj_log`.`metaprocess_has_message` (`ref_idmetaprocess` ASC) ;
+
+CREATE INDEX `fk_metaprocess_has_message_message1` ON `biomaj_log`.`metaprocess_has_message` (`ref_idmessage` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`process_has_message`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`process_has_message` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`process_has_message` (
+ `ref_idprocess` INT NOT NULL ,
+ `ref_idmessage` INT NOT NULL ,
+ `idprocess_has_message` INT NOT NULL AUTO_INCREMENT ,
+ PRIMARY KEY (`idprocess_has_message`) ,
+ CONSTRAINT `fk_process_has_message_process1`
+ FOREIGN KEY (`ref_idprocess` )
+ REFERENCES `biomaj_log`.`process` (`idprocess` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_process_has_message_message1`
+ FOREIGN KEY (`ref_idmessage` )
+ REFERENCES `biomaj_log`.`message` (`idmessage` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_process_has_message_process1` ON `biomaj_log`.`process_has_message` (`ref_idprocess` ASC) ;
+
+CREATE INDEX `fk_process_has_message_message1` ON `biomaj_log`.`process_has_message` (`ref_idmessage` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`session_has_sessionTask`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`session_has_sessionTask` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`session_has_sessionTask` (
+ `ref_idsession` BIGINT NOT NULL ,
+ `ref_idsessionTask` INT NOT NULL ,
+ `idsession_has_sessionTask` INT NOT NULL AUTO_INCREMENT ,
+ PRIMARY KEY (`idsession_has_sessionTask`) ,
+ CONSTRAINT `fk_session_has_sessionTask_session1`
+ FOREIGN KEY (`ref_idsession` )
+ REFERENCES `biomaj_log`.`session` (`idsession` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_session_has_sessionTask_sessionTask1`
+ FOREIGN KEY (`ref_idsessionTask` )
+ REFERENCES `biomaj_log`.`sessionTask` (`idsessionTask` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_session_has_sessionTask_session1` ON `biomaj_log`.`session_has_sessionTask` (`ref_idsession` ASC) ;
+
+CREATE INDEX `fk_session_has_sessionTask_sessionTask1` ON `biomaj_log`.`session_has_sessionTask` (`ref_idsessionTask` ASC) ;
+
+
+-- -----------------------------------------------------
+-- Table `biomaj_log`.`sessionTask_has_file`
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS `biomaj_log`.`sessionTask_has_file` ;
+
+CREATE TABLE IF NOT EXISTS `biomaj_log`.`sessionTask_has_file` (
+ `ref_idsessionTask` INT NOT NULL ,
+ `ref_idfile` INT NOT NULL ,
+ `idsessionTask_has_file` INT NOT NULL AUTO_INCREMENT ,
+ PRIMARY KEY (`idsessionTask_has_file`) ,
+ CONSTRAINT `fk_sessionTask_has_file_sessionTask1`
+ FOREIGN KEY (`ref_idsessionTask` )
+ REFERENCES `biomaj_log`.`sessionTask` (`idsessionTask` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION,
+ CONSTRAINT `fk_sessionTask_has_file_file1`
+ FOREIGN KEY (`ref_idfile` )
+ REFERENCES `biomaj_log`.`file` (`idfile` )
+ ON DELETE CASCADE
+ ON UPDATE NO ACTION)
+ENGINE = InnoDB;
+
+CREATE INDEX `fk_sessionTask_has_file_sessionTask1` ON `biomaj_log`.`sessionTask_has_file` (`ref_idsessionTask` ASC) ;
+
+CREATE INDEX `fk_sessionTask_has_file_file1` ON `biomaj_log`.`sessionTask_has_file` (`ref_idfile` ASC) ;
+
+
+
+SET SQL_MODE=@OLD_SQL_MODE;
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
+SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/log4j.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/log4j.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/log4j.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,8 @@
+log4j.logger.org.inria.biomaj.exe.migration=DEBUG, logger
+
+log4j.appender.logger=org.apache.log4j.RollingFileAppender
+log4j.appender.logger.File=xmlToSql.log
+log4j.appender.logger.MaxFileSize=5MB
+log4j.appender.logger.MaxBackupIndex=2
+log4j.appender.logger.layout=org.apache.log4j.PatternLayout
+log4j.appender.logger.layout.ConversionPattern=%d{HH:mm:ss} %-5p [%c] - %m%n
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternExcludeSelector.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternExcludeSelector.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternExcludeSelector.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+package org.gmod.ant.selectors;
+
+import java.io.File;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.types.selectors.BaseSelector;
+
+public class FilenamePatternExcludeSelector extends BaseSelector {
+
+ /**
+ * @uml.property name="patterns" multiplicity="(0 -1)" dimension="1"
+ */
+ private String[] patterns;
+
+ /**
+ * Set the pattern to search a fileset for.
+ *
+ * @param s A string consisting of the java pattern to use for searching.
+ */
+ public void setPattern(String s) {
+ patterns = s.split("\\s+");
+ }
+
+ @Override
+ public void verifySettings() {
+ if (patterns == null) {
+ setError("The pattern parameter should be set.");
+ }
+ }
+
+ @Override
+ public boolean isSelected(File arg0, String arg1, File arg2) {
+ validate();
+
+ for (int i=0; i<patterns.length; i++) {
+ if (patterns[i].trim().compareTo("")==0)
+ continue;
+ Pattern pattern = Pattern.compile(patterns[i]);
+ Matcher matcher = pattern.matcher(arg1);
+ if (matcher.find())
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public void validate() {
+ // TODO Auto-generated method stub
+ super.validate();
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternSelector.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternSelector.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/FilenamePatternSelector.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,100 @@
+/* File: FilenamePatternSelector.java
+ * Created by jogoodma
+ * Created on Feb 24, 2004 1:24:46 PM
+ * Project: citrina
+ *
+ * CVS Info:
+ * $Id: FilenamePatternSelector.java,v 1.5 2004/08/24 16:30:49 jogoodma Exp $
+ * $Author: jogoodma $
+ * $Date: 2004/08/24 16:30:49 $
+ *
+ * Copyright (c) 2004, Indiana University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Indiana University, Bloomington nor the names
+ * of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.gmod.ant.selectors;
+
+import java.io.File;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.selectors.BaseSelector;
+
+
+/**
+ * @author jogoodma
+ * @version CVS $Revision: 1.5 $
+ */
+public class FilenamePatternSelector extends BaseSelector {
+ /**
+ * @uml.property name="patterns" multiplicity="(0 -1)" dimension="1"
+ */
+ private String[] patterns;
+
+ /**
+ * Set the pattern to search a fileset for.
+ *
+ * @param s A string consisting of the java pattern to use for searching.
+ */
+ public void setPattern(String s) {
+ patterns = s.split("\\s+");
+ }
+
+ @Override
+ public void verifySettings() {
+ if (patterns == null) {
+ setError("The pattern parameter should be set.");
+ }
+ }
+
+ /**
+ * Compare the filename sent via the fileset to the pattern.
+ *
+ * @see org.apache.tools.ant.types.selectors.FileSelector#isSelected(java.io.File, java.lang.String, java.io.File)
+ */
+ @Override
+ public boolean isSelected(File base, String filename, File file) throws BuildException {
+ validate();
+
+ for (int i=0; i<patterns.length; i++) {
+ Pattern pattern = Pattern.compile(patterns[i]);
+ Matcher matcher = pattern.matcher(filename);
+ if (matcher.find())
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void validate() {
+ // TODO Auto-generated method stub
+ super.validate();
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant selectors Citrina.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/selectors-i.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/selectors-i.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/ant/selectors/selectors-i.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="selectors-i" id="org.gmod.ant.selectors" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332042696F6D616A5F4E564D">
+ <children xsi:type="editmodel:ClassEditModel" name="FilenamePatternSelector" location="200,100" size="346,160" id="org.gmod.ant.selectors/FilenamePatternSelector" runTimeClassModel="setPattern(Ljava.lang.String;),verifySettings(),patterns,isSelected(Ljava.io.File;Ljava.lang.String;Ljava.io.File;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="98,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="patterns" id="org.gmod.ant.selectors/FilenamePatternSelector#patterns"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="323,57">
+ <children xsi:type="editmodel:MethodEditModel" name="isSelected" id="org.gmod.ant.selectors/FilenamePatternSelector#isSelected(Ljava.io.File;Ljava.lang.String;Ljava.io.File;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPattern" id="org.gmod.ant.selectors/FilenamePatternSelector#setPattern(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="verifySettings" id="org.gmod.ant.selectors/FilenamePatternSelector#verifySettings()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" level="-1" showScope="InPackage" properties="wireOptions=1"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/DirectoryHasFilesCondition.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/DirectoryHasFilesCondition.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/DirectoryHasFilesCondition.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,100 @@
+/* File: DirectoryHasFilesCondition.java
+ * Created by jogoodma
+ * Created on Feb 12, 2004 10:22:38 AM
+ * Project: citrina
+ *
+ * CVS Info:
+ * $Id: DirectoryHasFilesCondition.java,v 1.2 2004/06/07 20:01:34 jogoodma Exp $
+ * $Author: jogoodma $
+ * $Date: 2004/06/07 20:01:34 $
+ *
+ * Copyright (c) 2004, Indiana University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Indiana University, Bloomington nor the names
+ * of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+package org.gmod.biomaj.ant.conditions;
+
+import java.util.Vector;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.taskdefs.condition.Condition;
+import org.apache.tools.ant.types.FileSet;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+
+/**
+ * Custom ant condition to check whether a directory contains files or not.
+ * Meant to be used within Ant's <condition> task.
+ *
+ * @author Josh Goodman
+ * @version CVS $Revision: 1.2 $
+ *
+ */
+public class DirectoryHasFilesCondition extends MatchingTask implements Condition {
+ /**
+ * @uml.property name="filesets"
+ * @uml.associationEnd multiplicity="(0 -1)" elementType="org.apache.tools.ant.types.FileSet"
+ */
+ private Vector<FileSet> filesets = new Vector<FileSet>();
+
+ /**
+ * Sets the FileSet to be checked for the presence or lack of files.
+ *
+ * @param fileset File set to check for files.
+ */
+ public void addFileset(FileSet fileset) {
+ filesets.add(fileset);
+ }
+
+
+ /**
+ * Method to evaluate whether the directory has files or not.
+ *
+ * @see org.apache.tools.ant.taskdefs.condition.Condition#eval()
+ * @return A boolean that is true if the directory has files or false if it doesn't.
+ */
+ public boolean eval() {
+ boolean hasFiles = false;
+
+ if (filesets.size() <= 0) {
+ throw new BiomajBuildException(this.getProject(),"directoryHasFilesCondition.error.fileset",new Exception());
+ }
+
+ for (int i=0; i < filesets.size(); i++) {
+ FileSet fs = filesets.elementAt(i);
+ DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+ String[] files = ds.getIncludedFiles();
+ log("Found " + files.length + " files",Project.MSG_DEBUG);
+ if (files.length >0) {
+ hasFiles = true;
+ }
+ }
+
+ return hasFiles;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/conditions/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant condition Citrina.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/InputValidation.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/InputValidation.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/InputValidation.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,48 @@
+
+package org.gmod.biomaj.ant.task;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+/**
+ *
+ * A set of common functions used for input validation in Ant
+ * tasks.
+ *
+ * @author Josh Goodman
+ * @version CVS $Revision: 1.1 $
+ *
+ */
+public class InputValidation {
+
+ /**
+ * Checks if String properties have been set.
+ * @param p TODO
+ * @param property Name of the property.
+ * @param desc A short description of the property.
+ *
+ * @throws org.apache.tools.ant.BuildException If a required property has not been set.
+ */
+ public static void checkString(Project p, String property, String desc) throws BuildException {
+ if ((property==null)||(property.length() <= 0)||(property.startsWith("${")) ) {
+ throw new BiomajBuildException(p,"inputvalidation.checkstring", desc,new Exception());
+ }
+ }
+
+ /**
+ * Passes filenames to the function {@linkplain org.gmod.biomaj.ant.task.InputValidation#checkString(Project, String, String) checkString}
+ * from File objects.
+ * @param p TODO
+ * @param file File object to check.
+ * @param desc A brief description of the file object.
+ *
+ * @throws org.apache.tools.ant.BuildException If a required property has not been set.
+ */
+ public static void checkString(Project p, File file, String desc) throws BuildException {
+ checkString(p,file.getPath(), desc);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/SymlinkList.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/SymlinkList.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/SymlinkList.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,154 @@
+/* File: SymlinkList.java
+ * Created by jogoodma
+ * Created on Aug 5, 2004 2:03:10 PM
+ * Project: citrina
+ *
+ * CVS Info:
+ * $Id: SymlinkList.java,v 1.2 2004/08/06 19:39:07 jogoodma Exp $
+ * $Author: jogoodma $
+ * $Date: 2004/08/06 19:39:07 $
+ *
+ * Copyright (c) 2004, Indiana University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Indiana University, Bloomington nor the names
+ * of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.gmod.biomaj.ant.task;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+/**
+ * This Ant task reads a list of file names from a file and loads
+ * them into an Ant property. Each filename will be delimited by
+ * the given delimiter character or the default one of ','. Each
+ * filename needs to be on its own line and lines with # are skipped.
+ *
+ * @author Josh Goodman
+ * @version CVS $Revision: 1.2 $
+ *
+ */
+public class SymlinkList extends Task {
+
+ /**
+ * @uml.property name="propertyName"
+ */
+ private String propertyName;
+ /**
+ * @uml.property name="sourceFile"
+ */
+ private File sourceFile;
+ /**
+ * @uml.property name="delimiter"
+ */
+ private String delimiter = ",";
+
+ /**
+ *
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ @Override
+ public void execute() throws BuildException {
+ //Verify the required input.
+ checkInput();
+ Project p = getProject();
+
+ try {
+ //Read in the entire file line by line.
+ BufferedReader br = new BufferedReader(new FileReader(sourceFile));
+ StringBuffer sb = new StringBuffer();
+ String line = null;
+
+ while ((line = br.readLine()) != null) {
+ //Skip lines starting with a # character.
+ if (!line.startsWith("#")) {
+ sb.append(line);
+ sb.append(delimiter);
+ }
+ }
+
+ //Set the property if it isn't empty.
+ if (sb.length() > 0) {
+ //Remove the last delimiter.
+ sb.deleteCharAt(sb.lastIndexOf(delimiter));
+ //Set the property with the filenames.
+ p.setProperty(propertyName,sb.toString());
+ }
+
+
+
+ } catch(FileNotFoundException fnfe) {
+ throw new BiomajBuildException(getProject(),fnfe);
+ } catch(IOException ioe) {
+ throw new BiomajBuildException(getProject(),ioe);
+ }
+ }
+
+ /**
+ * Checks the attributes passed to ftplisting task.
+ *
+ * @throws org.apache.tools.ant.BuildException If required attributes are not set.
+ */
+ private void checkInput() {
+ InputValidation.checkString(getProject(),propertyName, "the name of the Ant property to set");
+ InputValidation.checkString(getProject(),sourceFile, "the input file to get link names from");
+ }
+
+ /**
+ * Sets the delimiter to use in the property. Each file name in the source file will be concatenated together separated by the delimiter. The default delimiter is ','.
+ * @param delimiter The delimiter to set.
+ * @uml.property name="delimiter"
+ */
+ public void setDelimiter(String delimiter) {
+ this.delimiter = delimiter;
+ }
+
+ /**
+ * The property name to set using the file names from the source file.
+ * @param propertyName The propertyName to set.
+ * @uml.property name="propertyName"
+ */
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * Sets the source file to get file names from. Lines starting with a '#' character will be ignored.
+ * @param sourceFile The sourceFile to set.
+ * @uml.property name="sourceFile"
+ */
+ public void setSourceFile(File sourceFile) {
+ this.sourceFile = sourceFile;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FileCheck.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FileCheck.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FileCheck.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,916 @@
+/* Copyright (c) 2004, Indiana University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Indiana University, Bloomington nor the names
+ * of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.gmod.biomaj.ant.task.net;
+
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.task.BmajExtract;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * This class takes an ftp listing generated by Ant's FTP task and it compares
+ * the files in that listing to the same ones stored on local disk. It checks
+ * dates between the two to see if the file needs to be downloaded or not. It is
+ * particularly useful when you need to compare files that have been
+ * uncompressed and/or whose filenames have changed This is the main java class
+ * behind the Citrina package for mirroring biological databases.
+ *
+ * Olivier Filangi<br>
+ * This class has been modified to support multiple protocol.
+ *
+ * @author Josh Goodman
+ *
+ * @version Biomaj.0.9
+ *
+ */
+public class FileCheck extends BmajTask {
+
+ /**
+ * remote files
+ * @uml.property name="listingfile"
+ */
+ private File listingfile;
+ /**
+ * @uml.property name="output"
+ */
+ private File output;
+ /**
+ * @uml.property name="localFiles"
+ */
+ private String localFiles;
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server;
+ /**
+ * @uml.property name="port"
+ */
+ private int port;
+ /**
+ * @uml.property name="protocol"
+ */
+ private String protocol;
+ /**
+ * @uml.property name="remoteDir"
+ */
+ private String remoteDir;
+
+ /**
+ * @uml.property name="onlineDir"
+ */
+ private File onlineDir;
+ /**
+ * @uml.property name="offlineDir"
+ */
+ private File offlineDir;
+ /**
+ * @uml.property name="copyFileList"
+ */
+ private File copyFileList;
+ /**
+ * @uml.property name="up2dateFile"
+ */
+ private File up2dateFile;
+ /**
+ * @uml.property name="extractFileList"
+ */
+ private File extractFileList;
+ /**
+ * @uml.property name="keepOfflineFileList"
+ */
+ private File keepOfflineFileList;
+ /**
+ * @uml.property name="ftpListingFile"
+ */
+ private BufferedReader ftpListingFile;
+ /**
+ * @uml.property name="ftpFilesNeeded"
+ */
+ private BufferedWriter ftpFilesNeeded;
+
+ /**
+ * @uml.property name="keepOfflineFile"
+ */
+ private BufferedWriter keepOfflineFile;
+ /**
+ * @uml.property name="extractFile"
+ */
+ private BufferedWriter extractFile;
+ /**
+ * @uml.property name="copyFile"
+ */
+ private BufferedWriter copyFile;
+ /**
+ * @uml.property name="up2dateFileWriter"
+ */
+ private BufferedWriter up2dateFileWriter;
+
+ /**
+ * @uml.property name="countDownload"
+ */
+ private int countDownload = 0;
+ /**
+ * @uml.property name="countExtract"
+ */
+ private int countExtract = 0;
+
+
+ /**
+ * @uml.property name="countKeepOffline"
+ */
+ private int countKeepOffline = 0;
+ /**
+ * @uml.property name="countCopy"
+ */
+ private int countCopyLocalOnline = 0;
+
+ /**
+ * @uml.property name="countCopyLocalOffline"
+ */
+ private int countCopyLocalOffline = 0;
+
+ /**
+ * @uml.property name="filesUncompressedOnOffline"
+ */
+ private boolean filesUncompressedOnOffline = false;
+
+ /**
+ * @uml.property name="sizeToDownload"
+ */
+ private long sizeToDownload = 0;
+
+ private Bank lastUpdateSession = null;
+
+ private boolean fromScratch = false;
+
+ @Override
+ public void execute() {
+
+ checkInput(); //Check the required attributes.
+ setIO(); //Create the file IO objects.
+ log("Finished initializing filecheck task.",Project.MSG_VERBOSE);
+
+ boolean logFilesIsOk = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+
+
+ //Initialize the line and count variables.
+ String line = null;
+ Vector<RemoteFile> listRF = new Vector<RemoteFile>();
+ int compteur = 0;
+ try {
+ while ((line = ftpListingFile.readLine()) != null) {
+ RemoteFile rf = new RemoteFile(line);
+ listRF.add(rf);
+ sizeToDownload += rf.getSize();
+ }
+ ftpListingFile.close();
+
+ String name = getProject().getProperty(BiomajConst.dbNameProperty);
+ //on cherche le dernier repertoire de prod creee
+// Vector<ProductionDirectory> lpd = BiomajQueryXmlStateFile.getAvailableDirectoriesProduction(name);
+
+ List<ProductionDirectory> lpd = BiomajSQLQuerier.getAvailableProductionDirectories(name);
+
+ if (lpd.size()<=0) {
+ log("No production directories have been created !",Project.MSG_VERBOSE);
+ } else {
+ ProductionDirectory pd = lpd.get(lpd.size()-1);
+ lastUpdateSession = new Bank();
+ if (!BiomajSQLQuerier.getUpdateBank(name, pd.getSession(), lastUpdateSession, true))
+ lastUpdateSession = null ;
+
+ }
+ } catch (IOException ioe) {
+ throw new BiomajBuildException(getProject(),ioe);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+
+ //Loop over the ftp listing file line by line.
+ for (RemoteFile rFile : listRF) {
+
+ float a = ((float)++compteur/ (float)listRF.size())*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ //log(Integer.toString(compteur),Project.MSG_INFO);
+ long remoteDate = rFile.getDate().getTime();
+ long remoteSize = rFile.getSize();
+ String fileName = rFile.getAbsolutePath();
+
+ if (!fromScratch) {
+
+ //Correction de la methode getLocalNameFromStateFile : celle ci prend en compte si le fichier a ete extracte ou non!
+ /*
+ * TODO:
+ * On peut optimiser l algo ci dessous:
+ * On a plus besoin de savoir si le fichier a ete etrait ou non puisque ca depend de no.extract!
+ * Est ce necessaire de faire une modif de cet algo puisqu il est destine a etre complement modifie? (Pris en compte seulement du statefile)
+ */
+
+ //On test les archives seulement si les logs on ete generer.....
+
+ if (logFilesIsOk && lastUpdateSession != null) {
+ /*
+ * Cas ou on a une archive de type tar
+ * 1 archive correspond a plusieurs fichiers en prod
+ */
+ Vector<FileDesc> lFd = lastUpdateSession.getGeneratedFiles(getProject(), rFile);
+// Vector<FileDesc> lFd = null;
+ if (lFd != null && lFd.size() > 0) {
+ log("Archives "+rFile.getAbsolutePath()+" with "+Integer.toString(lFd.size())+" files",Project.MSG_VERBOSE);
+ for (int aF=0;aF<lFd.size();aF++)
+ log(" -> "+lFd.get(aF).getName()+" timestamp="+Long.toString(lFd.get(aF).getTime())+" size="+lFd.get(aF).getSize(),Project.MSG_VERBOSE);
+
+ int count = 0;
+ Vector<String> toCopy = new Vector<String>();
+ for (FileDesc fd : lFd) {
+ log(rFile.getName()+" contains "+fd.getLocation(),Project.MSG_DEBUG);
+// File inOnline = new File(onlineDir.getAbsolutePath()+"/"+fd.getLocation().replace(offlineDir.getAbsolutePath(), ""));
+ File inOnline = new File(fd.getLocation());
+ if (inOnline.exists()) {
+ log(fd.getLocation()+" find in production!",Project.MSG_VERBOSE);
+ try {
+ toCopy.add(inOnline.getCanonicalPath());
+ } catch (IOException e) {
+ log(e, Project.MSG_ERR);
+ }
+ count++;
+ } else {
+ File inOffline = new File(offlineDir.getAbsolutePath() + " / " + fd.getLocation().replace(onlineDir.getAbsolutePath(), ""));
+ if (inOffline.exists()) {
+ log(fd.getLocation()+" find in offline!",Project.MSG_VERBOSE);
+ filesUncompressedOnOffline = true;
+ addFileToKeepOfflineList(inOffline.getAbsolutePath());
+ count++;
+ } else {
+ log("file ["+fd.getLocation()+"] has been deleted, BioMAJ download "+rFile.getAbsolutePath(),Project.MSG_WARN);
+ count = 0;
+ break;
+ }
+ }
+ }
+ /*
+ * Si tous les fichiers existent, on ajoute en copy/link et on passe au remote file suivant!
+ */
+ if (count == lFd.size()) {
+ for (String path : toCopy) {
+ addFileToCopyList(path);
+ }
+ continue;
+ }
+ } else {
+ log("None file ["+rFile.getAbsolutePath()+"] have been stored in the last session ",Project.MSG_VERBOSE);
+ }
+ }
+ /*
+ * Cas ou on a 1 archive correspondant a 1 fichier en prod
+ */
+ String fileNameUncompressed = getLocalNameFromStateFile(rFile,logFilesIsOk);
+ File fLocalUncompressedInOffline = new File(offlineDir,fileNameUncompressed);
+ /*
+ * Fichier decompresse qui existe dans offline
+ */
+ if (fLocalUncompressedInOffline.exists()) {
+ FileDesc fd = null;//getFileDescFromFileCompressed(fileName);
+ if (fd == null)
+ {
+ //log(fLocalUncompressedInOffline.getName()+" not handle by the statefile",Project.MSG_INFO);
+ if (remoteDate<=fLocalUncompressedInOffline.lastModified()) {
+ log(fLocalUncompressedInOffline.getAbsolutePath() +" find in offline directory",Project.MSG_VERBOSE);
+ //!!! ON doit laisser une infos comme quoi il y a une nouvelle version a produire
+ filesUncompressedOnOffline = true;
+ addLocalOfflineFile(fLocalUncompressedInOffline.getAbsolutePath());
+ addFileToKeepOfflineList(fLocalUncompressedInOffline.getAbsolutePath());
+ countCopyLocalOffline++;
+ continue;
+ }
+ } else {
+ if ((remoteDate==fd.getTime())&&(remoteSize == fd.getSize()))
+ {
+ log(fLocalUncompressedInOffline.getAbsolutePath() +" find in offline directory",Project.MSG_VERBOSE);
+ addLocalOfflineFile(fLocalUncompressedInOffline.getAbsolutePath());
+ addFileToKeepOfflineList(fLocalUncompressedInOffline.getAbsolutePath());
+ filesUncompressedOnOffline = true;
+ countCopyLocalOffline++;
+ continue;
+ }
+ }
+ }
+
+ // le fichier existe en offline mais ne correspond pas au fichier distant : on doit l effacer
+ // pour que les links du online vers le offline possible fonctionne par la suite
+ fLocalUncompressedInOffline.delete();
+
+ File fLocalUncompressedInOnline = new File(onlineDir,fileNameUncompressed);
+ /*
+ * Fichier decompresse qui se trouve dans online
+ */
+ if (fLocalUncompressedInOnline.exists()) {
+ FileDesc fd = null;//getFileDescFromFileCompressed(fileName);
+ if (fd == null)
+ {
+ //log(fLocalUncompressedInOnline.getName()+" not handle by the statefile",Project.MSG_INFO);
+ long t = fLocalUncompressedInOnline.lastModified();
+ if (remoteDate<=t) {
+ log(fLocalUncompressedInOnline.getAbsolutePath() +" find in online directory",Project.MSG_VERBOSE);
+ try {
+ addFileToCopyList(fLocalUncompressedInOnline.getCanonicalPath());
+ } catch (IOException e) {
+ log(e, Project.MSG_ERR);
+ }
+ //si le meme fichier existe dans le offline, il faut l effacer
+ if (fLocalUncompressedInOffline.exists())
+ {
+ log("delete:"+fLocalUncompressedInOffline.getAbsolutePath());
+ fLocalUncompressedInOffline.delete();
+ }
+ continue;
+ } else {
+ log(rFile.getAbsolutePath()+": Local date ["+BiomajUtils.dateToString(new Date(fLocalUncompressedInOnline.lastModified()), Locale.US)+
+ "] Remote date ["+BiomajUtils.dateToString(new Date(remoteDate), Locale.US)+"]",Project.MSG_VERBOSE);
+ }
+ } else {
+ if ((remoteDate==fd.getTime())&&(remoteSize == fd.getSize())) {
+ try {
+ addFileToCopyList(fLocalUncompressedInOnline.getCanonicalPath());
+ } catch (IOException e) {
+ log(e, Project.MSG_ERR);
+ }
+ }
+ // si le meme fichier existe dans le offline, il faut l effacer
+ if (fLocalUncompressedInOffline.exists())
+ {
+ log("delete:"+fLocalUncompressedInOffline.getAbsolutePath());
+ fLocalUncompressedInOffline.delete();
+ }
+ continue;
+ }
+ }
+
+ File fLocalcompressedInOffline = new File(offlineDir,fileName);
+ /*
+ * Fichier compresse qui existe dans offline
+ */
+ if (fLocalcompressedInOffline.exists()) {
+ FileDesc fd = null;// getFileDescFromFileCompressed(fileName);
+ if (fd == null)
+ {
+ //log(fileName+" not handle by the statefile",Project.MSG_INFO);
+ if (remoteSize==fLocalcompressedInOffline.length()&&(remoteDate<=fLocalcompressedInOffline.lastModified())) {
+ log(fLocalcompressedInOffline.getAbsolutePath() +" find in offline directory",Project.MSG_VERBOSE);
+ addFileToExtractList(fileName);
+ addLocalOfflineFile(fLocalcompressedInOffline.getAbsolutePath());
+ addFileToKeepOfflineList(fLocalcompressedInOffline.getAbsolutePath());
+ countCopyLocalOffline++;
+ continue;
+ }
+ } else {
+ if ((remoteDate==fd.getTime())&&(fLocalcompressedInOffline.length()==fd.getSize())
+ &&(remoteSize == fd.getSize()))
+ {
+ log(fLocalcompressedInOffline.getAbsolutePath() +" find in offline directory",Project.MSG_VERBOSE);
+ addFileToExtractList(fileName);
+ addLocalOfflineFile(fLocalcompressedInOffline.getAbsolutePath());
+ addFileToKeepOfflineList(fLocalcompressedInOffline.getAbsolutePath());
+ countCopyLocalOffline++;
+ continue;
+ }
+ }
+ }
+
+ // YOANN Prise en compte des fichiers compresses dans le online
+ /*
+ * Fichier compresse qui se trouve dans online
+ */
+ // YOANN Prise en compte des fichiers compresses dans le online
+ File fLocalcompressedInOnline = new File(onlineDir,fileName);
+ // FIN YOANN
+ if (fLocalcompressedInOnline.exists()) {
+ FileDesc fd = null;//getFileDescFromFileCompressed(fileName);
+ if (fd == null)
+ {
+ //log(fLocalcompressedInOnline.getName()+" not handle by the statefile",Project.MSG_INFO);
+ long t = fLocalcompressedInOnline.lastModified();
+ if (remoteDate<=t) {
+ log(fLocalcompressedInOnline.getAbsolutePath() +" find in online directory",Project.MSG_VERBOSE);
+ try {
+ addFileToCopyList(fLocalcompressedInOnline.getCanonicalPath());
+ } catch (IOException e) {
+ log(e, Project.MSG_ERR);
+ }
+ //si le meme fichier existe dans le offline, il faut l effacer
+ if (fLocalcompressedInOffline.exists())
+ {
+ log("delete:"+fLocalcompressedInOffline.getAbsolutePath());
+ fLocalcompressedInOffline.delete();
+ }
+ continue;
+ }
+ } else {
+ if (remoteDate==fd.getTime() && remoteSize == fd.getSize()) {
+ try {
+ addFileToCopyList(fLocalcompressedInOnline.getCanonicalPath());
+ } catch (IOException e) {
+ log(e, Project.MSG_ERR);
+ }
+ }
+ // si le meme fichier existe dans le offline, il faut l effacer
+ if (fLocalcompressedInOffline.exists())
+ {
+ log("delete:"+fLocalcompressedInOffline.getAbsolutePath());
+ fLocalcompressedInOffline.delete();
+ }
+ continue;
+ }
+ }
+ }
+
+// FIN YOANN
+ addFileToDownloadList(rFile);
+
+ }
+ finished();
+ /*} catch (IOException ioe) {
+ throw new BiomajBuildException(getProject(),ioe);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+ */
+ }
+
+ protected String getLocalNameFromStateFile(RemoteFile rf,boolean logFilesIsOk) {
+ //FileDesc res = null ;
+ String defaultValue = rf.getAbsolutePath();
+
+ //Si on ne trouve pas dans le fichier xml le fichier par defaut, le fichier en local porte
+ //le meme nom si no.extract=true et sans l extension de compression si no.extract=false
+
+ if (!getProject().getProperties().containsKey(BiomajConst.noExtractProperty))
+ defaultValue = BiomajUtils.getLocalFileName(rf.getAbsolutePath());
+ else if ((!Boolean.valueOf(getProject().getProperty(BiomajConst.noExtractProperty)))) {
+ defaultValue = BiomajUtils.getLocalFileName(rf.getAbsolutePath());
+ }
+ if (logFilesIsOk) {
+ if (lastUpdateSession == null)
+ return defaultValue;
+
+ //res = lastUpdateSession.findFile(rf.getAbsolutePath(), rf.getDate().getTime(), rf.getSize(), Session.DOWNLOAD);
+ String refHash = BiomajUtils.getHashFromRemoteFile(rf);
+ /*
+ if (res == null)
+ {
+ log(rf.getAbsolutePath()+" never logged in statefiles",Project.MSG_VERBOSE);
+ return defaultValue;
+ }
+ */
+ Vector<FileDesc> lFd = lastUpdateSession.findDependancesFilesFromExtraction(refHash);
+ if (lFd.size()==1) {
+ log("Find !!!:"+lFd.get(0).getName());
+ return lFd.get(0).getName();
+ } else {
+ BiomajLogger.getInstance().log("FileCheck::getLocalNameFromStateFile find more than one local file :");
+ for (FileDesc f : lFd)
+ BiomajLogger.getInstance().log(f.toString());
+
+ }
+ }
+
+ return defaultValue;
+ }
+
+
+ /**
+ * Sets the file object in which the ant FTP task will store the remote ftp server directory listing.
+ *
+ * @param file File to store the ftp server listing.
+ */
+ public void setListingFile(File file) {
+ listingfile = file;
+ }
+
+ /**
+ * Sets the pattern that will match the file on the local disk after it has been downloaded and extracted. The pattern format needs to follow the <code>java.util.regex.Pattern</code> specifications.
+ * @param s Pattern to match the local files with.
+ * @see java.util.regex.Pattern
+ * @uml.property name="localFiles"
+ */
+ public void setLocalFiles(String s) {
+ localFiles = s;
+ }
+
+ /**
+ * Sets the file object which stores the filenames to be retrieved from the remote ftp server.
+ * @param file File to store the ftp filenames to retrieve.
+ * @uml.property name="output"
+ */
+ public void setOutput(File file) {
+ output = file;
+ }
+
+ /**
+ * Sets the online directory on the local disk for a database.
+ * @param dir Local online directory.
+ * @uml.property name="onlineDir"
+ */
+ public void setOnlineDir(File dir) {
+ onlineDir = dir;
+ }
+
+ /**
+ * Sets the offline directory on the local disk for a database.
+ * @param dir Local offline directory.
+ * @uml.property name="offlineDir"
+ */
+ public void setOfflineDir(File dir) {
+ offlineDir = dir;
+ }
+
+ /**
+ * Sets the file object used to store any filenames that need to be copied into the offline directory from the online directory before any post processing is done and it is moved online.
+ * @param file File used to store a list of files that need to be copied locally.
+ * @uml.property name="copyFileList"
+ */
+ public void setCopyFileList(File file) {
+ copyFileList = file;
+ }
+
+ /**
+ * Sets the file object used to store any filenames that need to be extracted. This file is used as an includesfile for filesets in the extract target.
+ * @param file The file to write the files requiring extraction to.
+ * @uml.property name="extractFileList"
+ */
+ public void setExtractFileList(File file) {
+ extractFileList = file;
+ }
+
+ /**
+ * Sets the file object used to store the number of files needed for the download.
+ *
+ * @param file The file object to store the property containing the number of files to download.
+ */
+ public void setUpdateFile (File file) {
+ up2dateFile = file;
+ }
+
+ /**
+ * Add a file in the download list and extract list
+ * @param parser
+ */
+ private void addFileToDownloadList(RemoteFile rFile) {
+
+
+ try {
+ //Log the actions.
+ log(rFile.getName() + " added to the download list.",Project.MSG_VERBOSE);
+ String extFile ;
+ //Write the ftp url to the appropriate file and increment the file count.
+ extFile=rFile.getAbsolutePath();
+
+
+ /* if (rFile.isLink())
+ extFile=rFile.getLinkName();
+ else */
+ extFile=rFile.getAbsolutePath();
+
+ //ftpFilesNeeded.write("locationOnServer="+location+",timeOnServer="+Long.toString(rFile.getDate().getTime())+",sizeOnServer="+Long.toString(rFile.getSize()));
+ ftpFilesNeeded.write(rFile.toString());
+ ftpFilesNeeded.newLine();
+
+ log("file extract:"+extFile,Project.MSG_VERBOSE);
+ log("rFile associated:"+rFile.toString(),Project.MSG_VERBOSE);
+ addFileToExtractList(extFile);
+
+ countDownload++;
+ } catch (Exception ioe) {
+ throw new BiomajBuildException(getProject(),ioe);
+ }
+ }
+
+ /**
+ * Add a file in the extraction list
+ * @param parser
+ */
+
+ private void addFileToExtractList(String fileName) {
+ try {
+ String extractName = BmajExtract.removeExtension(fileName);
+ if (extractName.compareTo(fileName)==0) {
+ log("no compressed format:"+fileName,Project.MSG_VERBOSE);
+ return;
+ }
+ log(fileName + " added to the extract list.",Project.MSG_VERBOSE);
+ extractFile.write(fileName);
+ extractFile.newLine();
+ countExtract++;
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),"fileCheck.error.extract.file",fileName,e);
+ }
+ }
+
+ /**
+ * Add a file in the copy list
+ * @param parser
+ */
+
+ private void addFileToCopyList(String path) {
+ try {
+ //Secure system : we test if the file exist!
+ File f = new File(path);
+ if (!f.exists())
+ throw new BiomajBuildException(getProject(),"fileCheck.error.add.file",path,new Exception());
+ //log("AVANT PATH COPYLIST:"+path,Project.MSG_INFO);
+ String newPath = path.replace(onlineDir.getCanonicalPath()+"/","");
+ //log("PATH COPYLIST:"+path,Project.MSG_INFO);
+
+ //Correction Bug 28 novembre , il faut creer les sous repertoires si il n existe pas dans le offline!
+ BiomajUtils.createSubDirectories(BiomajUtils.getRelativeDirectory(offlineDir.getAbsolutePath()+"/"+newPath));
+
+ copyFile.write(newPath);
+ copyFile.newLine();
+ countCopyLocalOnline++;
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+
+ private void addFileToKeepOfflineList(String fileName) {
+ try {
+ log(fileName + " added to the keep offline list.",Project.MSG_VERBOSE);
+ keepOfflineFile.write(fileName);
+ keepOfflineFile.newLine();
+ countKeepOffline++;
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),"fileCheck.error.keep.offline.file",fileName,e);
+ }
+ }
+
+ /**
+ * Checks the attributes passed to filecheck task.
+ *
+ * @throws org.apache.tools.ant.BuildException If required attributes are not set.
+ */
+ private void checkInput() {
+ if (!listingfile.isFile() || !listingfile.canRead()) {
+ throw new BiomajBuildException(getProject(),"fileCheck.error.correct.file",listingfile.getAbsolutePath(),new Exception());
+ }
+
+ InputValidation.checkString(getProject(),output, "the output file property");
+ InputValidation.checkString(getProject(),keepOfflineFileList, "the output file property to keep file in offline directory");
+ InputValidation.checkString(getProject(),localFiles, "the local ftp files regular expression");
+ //InputValidation.checkString(ftpLocation,"the ftp server name and directory location");
+ InputValidation.checkString(getProject(),onlineDir, "the online database directory");
+ InputValidation.checkString(getProject(),copyFileList, "the local copy file list property");
+ InputValidation.checkString(getProject(),up2dateFile, "the up2date file property");
+ InputValidation.checkString(getProject(),extractFileList, "the local extraction file list property");
+
+ //correction bug O.filangi delete \\s caractere in remote directory
+ remoteDir = remoteDir.trim();
+ }
+
+ /**
+ * Creates the File objects needed for input/output for this class.
+ */
+ private void setIO() {
+ try {
+
+ ftpListingFile = new BufferedReader(new FileReader(listingfile));
+ ftpFilesNeeded = new BufferedWriter(new FileWriter(output));
+ keepOfflineFile = new BufferedWriter(new FileWriter(keepOfflineFileList));
+ copyFile = new BufferedWriter(new FileWriter(copyFileList));
+ extractFile = new BufferedWriter(new FileWriter(extractFileList));
+ up2dateFileWriter = new BufferedWriter(new FileWriter(up2dateFile));
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+
+ private void finished() {
+ try {
+// The copy file is used as an includesfile in ant. So when it is empty all files get included.
+ //That is not what we want to happen so we use this line to prevent it.
+ copyFile.write("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE");
+ copyFile.newLine();
+
+ extractFile.write("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE");
+ extractFile.newLine();
+
+ keepOfflineFile.write("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE");
+ extractFile.newLine();
+
+ //Close the file buffers and flush them out.
+ copyFile.close();
+ ftpFilesNeeded.close();
+ extractFile.close();
+ keepOfflineFile.close();
+
+ //Set the count property to the final download count.
+ up2dateFileWriter.write("num.new.files.download_and_extract=" + Integer.toString(countDownload)+"\n");
+ up2dateFileWriter.write("remote.files.size=" + Long.toString(sizeToDownload)+"\n");
+ up2dateFileWriter.write("num.new.files.extract=" + Integer.toString(countExtract)+"\n");
+ up2dateFileWriter.write("num.new.files.offline=" + Integer.toString(countKeepOffline)+"\n");
+
+ up2dateFileWriter.newLine();
+
+ //On peut remplacer les test par Boolean.toString !!!!
+ if (countDownload > 0)
+ up2dateFileWriter.write(BiomajConst.filesDownloadNeedDynamicProperty+"=true\n");
+ else
+ up2dateFileWriter.write(BiomajConst.filesDownloadNeedDynamicProperty+"=false\n");
+
+ getProject().setProperty(BiomajConst.countDownloadProperty, Integer.toString(countDownload));
+
+ if (countExtract>0)
+ up2dateFileWriter.write(BiomajConst.filesExtractNeedDynamicProperty+"=true\n");
+ else
+ up2dateFileWriter.write(BiomajConst.filesExtractNeedDynamicProperty+"=false\n");
+
+ getProject().setProperty(BiomajConst.countExtractProperty, Integer.toString(countExtract));
+
+ //Pour pas se retrouver a creer une nouvelle version a chaque lancement de citrina
+ //on test si de nouveaux fichiers sont gerer
+ boolean copyNeeded = false ;
+
+ if ((countCopyLocalOnline > 0)&&(filesUncompressedOnOffline||(countExtract>0)||(countDownload > 0))) {
+ copyNeeded = true;
+ }
+ /*
+ else { //Modif 06/08/2007 : Prend en compte si une nouvelle version n a pas de nvx fichier
+ //et a des fichiers effaces....
+ if (countCopyLocalOnline < BiomajUtils.howManyFiles(onlineDir)) {
+ //log("New version use a subversion of the current version!",Project.MSG_WARN);
+ copyNeeded = true ;
+ } else {
+ copyNeeded = false ;
+ }
+ }*/
+
+ up2dateFileWriter.write(BiomajConst.filesCopyNeedDynamicProperty+"="+Boolean.toString(copyNeeded)+"\n");
+ getProject().setProperty(BiomajConst.filesCopyNeedDynamicProperty, Boolean.toString(copyNeeded));
+ getProject().setProperty(BiomajConst.countLocalOnlineFileProperty, Integer.toString(countCopyLocalOnline));
+ getProject().setProperty(BiomajConst.countLocalOfflineFileProperty, Integer.toString(countCopyLocalOffline));
+
+ //on en profite pour mettre la valeur de la release distant!
+ up2dateFileWriter.write(BiomajConst.remoteReleaseDynamicProperty+"="+getProject().getProperty(BiomajConst.releaseResultProperty)+"\n");
+
+ up2dateFileWriter.close();
+
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+
+
+ @Override
+ public String getTaskName() {
+ return "check files";
+ }
+
+
+
+ /**
+ * @return the port
+ * @uml.property name="port"
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * @param port the port to set
+ * @uml.property name="port"
+ */
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ /**
+ * @return the protocol
+ * @uml.property name="protocol"
+ */
+ public String getProtocol() {
+ return protocol;
+ }
+
+ /**
+ * @param protocol the protocol to set
+ * @uml.property name="protocol"
+ */
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * @return the remoteDir
+ * @uml.property name="remoteDir"
+ */
+ public String getRemoteDir() {
+ return remoteDir;
+ }
+
+ /**
+ * @param remoteDir the remoteDir to set
+ * @uml.property name="remoteDir"
+ */
+ public void setRemoteDir(String remoteDir) {
+ this.remoteDir = remoteDir;
+ }
+
+ /**
+ * @return the server
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return server;
+ }
+
+ /**
+ * @param server the server to set
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+ public boolean isFromScratch() {
+ return fromScratch;
+ }
+
+ public void setFromScratch(boolean fromScratch) {
+ this.fromScratch = fromScratch;
+ }
+
+ /**
+ * @return the keepOfflineFileList
+ * @uml.property name="keepOfflineFileList"
+ */
+ public File getKeepOfflineFileList() {
+ return keepOfflineFileList;
+ }
+
+ /**
+ * @param keepOfflineFileList the keepOfflineFileList to set
+ * @uml.property name="keepOfflineFileList"
+ */
+ public void setKeepOfflineFileList(File keepOfflineFileList) {
+ this.keepOfflineFileList = keepOfflineFileList;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FtpListingParser.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FtpListingParser.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/FtpListingParser.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,311 @@
+/* File: FtpListingParser.java
+ * Created by jogoodma
+ * Created on Feb 4, 2004 12:41:33 PM
+ * Project: citrina
+ *
+ * CVS Info:
+ * $Id: FtpListingParser.java,v 1.9 2004/08/03 17:46:46 jogoodma Exp $
+ * $Author: jogoodma $
+ * $Date: 2004/08/03 17:46:46 $
+ *
+ * Copyright (c) 2004, Indiana University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Indiana University, Bloomington nor the names
+ * of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.gmod.biomaj.ant.task.net;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.net.ListingParser;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+/**
+ * This class parses a single line from an ftp listing generated by Ant's FTP task. After parsing you can retrieve the filename and the date in milliseconds.
+ * @author Josh Goodman
+ * @version CVS $Revision: 1.9 $
+ */
+public class FtpListingParser implements ListingParser {
+
+ //* -r--r--r-- 1 IUBio archive 46700108 Jan 1 07:48 nc0101.flat.gz
+ private static final Pattern DATEWITHTIME = Pattern.compile("(\\d+)\\s+(\\w+\\s+\\d+\\s+\\d+:\\d+)\\s+([\\d\\w\\.\\/\\\\\\-]+)(\\s+->\\s+)?([\\d\\w\\.\\/\\\\\\-]+)?$");
+ private static final Pattern DATEWITHYEAR = Pattern.compile("(\\d+)\\s+(\\w+\\s+\\d+\\s+\\d+)\\s+([\\d\\w\\.\\/\\\\\\-]+)(\\s+->\\s+)?([\\d\\w\\.\\/\\\\\\-]+)?$");
+
+ /**
+ * @uml.property name="line"
+ */
+ private String line;
+ /**
+ * @uml.property name="currentDate"
+ */
+ private Calendar currentDate;
+ /**
+ * @uml.property name="remoteFileDate"
+ */
+ private Calendar remoteFileDate;
+ /**
+ * @uml.property name="fileName"
+ */
+ private String fileName;
+ /**
+ * @uml.property name="linkName"
+ */
+ private String linkName;
+ /**
+ * @uml.property name="fileSize"
+ */
+ private long fileSize;
+ /**
+ * @uml.property name="isLink"
+ */
+ private boolean isLink;
+ /**
+ * @uml.property name="unixTime"
+ */
+ private long unixTime;
+ /**
+ * @uml.property name="currentProject"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Project currentProject;
+
+ /**
+ * @uml.property name="matchDateWithTime"
+ */
+ private Matcher matchDateWithTime;
+ /**
+ * @uml.property name="matchDateWithYear"
+ */
+ private Matcher matchDateWithYear;
+
+ /**
+ * Constructor that takes the ftp listing line, a java regex pattern, and the current ant project for access
+ * to the log stream.
+ *
+ * @param p The current ant project usually accessed via <code>org.apache.tools.ant.Task.getProject()</code>
+ */
+ public FtpListingParser(Project p) {
+ currentProject = p;
+ init();
+ }
+
+ /**
+ * Method to parse out the filename and file date in miliseconds since the epoc.
+ *
+ * @return A boolean indicating weather the line was parsed correctly.
+ */
+ public boolean parse() throws ParseException {
+ if (line==null)
+ throw new BiomajBuildException(currentProject,"ftplistingParser.error.init",new Exception());
+
+// Parse the line using the time format.
+ if (parseDateWithTime()) {
+ currentProject.log("Matched date with time for line: " + line, Project.MSG_DEBUG);
+ }
+ //Parse the line using the year format if the time match fails.
+ else if (parseDateWithYear()) {
+ currentProject.log("Matched date with year for line: " + line,Project.MSG_DEBUG);
+ }
+ //Log the error is no matches were found.
+ else {
+ throw new BiomajBuildException(currentProject,"ftplistingParser.error.match",line,new Exception());
+ }
+ return true;
+ }
+
+ /**
+ * @param line the line to set
+ * @uml.property name="line"
+ */
+ public void setLine(String s) {
+ line = s;
+ }
+
+ /**
+ * Returns the remote filename parsed out of the ftp listing file.
+ * @return The remote filename.
+ * @uml.property name="fileName"
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Returns the remote file that the link points to.
+ * @return String with the name of the relative link target pointed to by the link file.
+ * @uml.property name="linkName"
+ */
+ public String getLinkName() {
+ return linkName;
+ }
+
+ /**
+ * Returns the size of the current parsed ftp file.
+ * @return An int indicating the size of the file in bytes.
+ * @uml.property name="fileSize"
+ */
+ public long getFileSize() {
+ return fileSize;
+ }
+
+ private void setFileSize(String size) {
+ fileSize = Long.parseLong(size);
+ }
+
+ /**
+ * Returns whether or not the current file being parsed is a link or not.
+ * @return A boolean indicating whether the file is a link or not.
+ * @uml.property name="isLink"
+ */
+ public boolean isLink() {
+ return isLink;
+ }
+
+ private void setIsLink(Matcher m) {
+ if (m.groupCount() == 5) {
+ String txt = m.group(4);
+ if (txt != null && txt.matches("\\s+->\\s+")) {
+ linkName = m.group(5);
+ isLink = true;
+ }
+ }
+ }
+
+ /**
+ * Returns the last modified date in miliseconds for the file parsed out of the ftp listing file.
+ *
+ * @return The remote file last modified date in miliseconds.
+ */
+ public long getTime() {
+ return unixTime;
+ }
+
+ /**
+ * Parses the ftp listing file line that has a format similar to
+ * -r--r--r-- 1 IUBio archive 46700108 Jan 1 07:48 nc0101.flat.gz
+ *
+ * @return A boolean indicating whether it matched or not.
+ */
+ private boolean parseDateWithTime() {
+ boolean found = false; //Initialize the return var.
+ matchDateWithTime.reset(line); //Pass the line to the date with time matcher object.
+
+ //If it matches do this.
+ if (matchDateWithTime.find()) {
+ found = true; //Set return value.
+ //Get the filename from the second regex group as defined in the pattern.
+ fileName = matchDateWithTime.group(3);
+ setFileSize(matchDateWithTime.group(1));
+ setIsLink(matchDateWithTime);
+
+ try {
+ //Create a new date parser object and use it to set the date of the file.
+ SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd HH:mm");
+ remoteFileDate.setTime(dateFormat.parse(matchDateWithTime.group(2)));
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(currentProject,pe);
+ }
+
+ //Set the current year since no year is specified.
+ remoteFileDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));
+
+ //If the date is in the future then the remote ftp server hasn't switched
+ //formats and the file is from last year.
+ if (remoteFileDate.getTimeInMillis() > currentDate.getTimeInMillis()) {
+ remoteFileDate.add(Calendar.YEAR, -1);
+ }
+ //Set the time.
+ unixTime = remoteFileDate.getTimeInMillis();
+ }
+
+ return found;
+ }
+
+ /**
+ * Parses the ftp listing file line that has a format similar to
+ * -r--r--r-- 1 IUBio archive 46700108 Jan 1 2004 nc0101.flat.gz
+ *
+ * @return A boolean indicating whether it matched or not.
+ */
+ private boolean parseDateWithYear() {
+ boolean found = false; //Initialize return var.
+ matchDateWithYear.reset(line); //Pass the current line to this matcher object.
+
+ //If we match do this.
+ if (matchDateWithYear.find()) {
+ //Set return value and store the filename.
+ found = true;
+ fileName = matchDateWithYear.group(3);
+ setIsLink(matchDateWithYear);
+ setFileSize(matchDateWithYear.group(1));
+
+ //Log some info.
+ currentProject.log("Filename found: " + fileName,Project.MSG_DEBUG);
+ try {
+ //Parse the date from the ftp listing line.
+ SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd yyyy");
+ remoteFileDate.setTime(dateFormat.parse(matchDateWithYear.group(2)));
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(currentProject,pe);
+ }
+ //Set the time.
+ unixTime = remoteFileDate.getTimeInMillis();
+ }
+ return found;
+ }
+
+ /**
+ * Method to initialize the matchers used for various patterns, Calendar objects,
+ * and the filename.
+ */
+ private void init() {
+ //Initialize matchers for each pattern.
+ matchDateWithTime = DATEWITHTIME.matcher("");
+ matchDateWithYear = DATEWITHYEAR.matcher("");
+
+ //Create calendar objects.
+ currentDate = Calendar.getInstance();
+ remoteFileDate = Calendar.getInstance();
+
+ //Create filename object.
+ fileName = null;
+ isLink = false;
+ }
+
+ public RemoteFile getRemoteFile() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/org.gmod.biomaj.ant.task.net.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/org.gmod.biomaj.ant.task.net.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/org.gmod.biomaj.ant.task.net.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.gmod.biomaj.ant.task.net" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0" name="FileCheck" location="85,105" size="104,64" id="org.gmod.biomaj.ant.task.net/FileCheck" runTimeClassModel="ftpFilesNeeded,keepOfflineFile,setExtractFileList(Ljava.io.File;),copyFileList,finished(),remoteDir,port,setServer(Ljava.lang.String;),setOfflineDir(Ljava.io.File;),checkInput(),lastUpdateSession,listingfile,localFiles,addFileToExtractList(Ljava.lang.String;),getTaskName(),up2dateFile,addFileToCopyList(Ljava.lang.String;),setKeepOfflineFileList(Ljava.io.File;),countKeepOffline,sizeToDownload,getKeepOfflineFileList(),execute(),copyFile,setLocalFiles(Ljava.lang.String;),onlineDir,countCopyLocalOffline,getProtocol(),countExtract,getPort(),protocol,getRemoteDir(),extractFileList,getLocalNameFromStateFile(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;Z),setCopyFileList(Ljava.io.File;),addFileToDownloadList(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),setOutput(Ljava.io.File;),server,extractFile,filesUncompressedOnOffline,keepOfflineFileList,setUpdateFile(Ljava.io.File;),setIO(),up2dateFileWriter,output,offlineDir,setProtocol(Ljava.lang.String;),countCopy,setOnlineDir(Ljava.io.File;),addFileToKeepOfflineList(Ljava.lang.String;),ftpListingFile,setPort(I),setRemoteDir(Ljava.lang.String;),setListingFile(Ljava.io.File;),getServer(),countDownload">
+ <children xsi:type="editmodel:CompartmentEditModel" size="197,513"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="398,532"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.gmod.biomaj.ant.task.net/FileCheck->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.0" target="//@children.3" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="51,64" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="106,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.gmod.biomaj.ant.task.net/FileCheck->org.inria.biomaj.internal.ant.task.net/RemoteFile" source="//@children.0" target="//@children.4" targetEnd="//@children.0/@sourceConnections.1/@children.2" label="//@children.0/@sourceConnections.1/@children.0" sourceEnd="//@children.0/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="104,32" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,32"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0" name="FtpListingParser" location="443,655" size="251,64" id="org.gmod.biomaj.ant.task.net/FtpListingParser" runTimeClassModel="getFileSize(),unixTime,FtpListingParser(Lorg.apache.tools.ant.Project;),dATEWITHYEAR,dATEWITHTIME,fileSize,setLine(Ljava.lang.String;),remoteFileDate,init(),line,linkName,setIsLink(Ljava.util.regex.Matcher;),isLink(),getRemoteFile(),parseDateWithYear(),currentDate,matchDateWithTime,getFileName(),matchDateWithYear,setFileSize(Ljava.lang.String;),parse(),isLink,fileName,currentProject,parseDateWithTime(),getTime(),getLinkName()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="161,228"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="169,266"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="70,520" size="405,78" fontInfo="Arial-9-1" note="Cette classe n'est plus fonctionnelle. Elle etait utilisé par Citrina 0.5 
Dans le FileCheck.
Depuis BioMAJ 0.8, on utilise la classe RemoteFile pour s'abstraire du protocole 
utilisé.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.2" target="//@children.1" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="388,78" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="15,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0" name="BiomajQueryXmlStateFile" location="30,380" size="556,51" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="620,418"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="266,143"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.1" name="RemoteFile" location="800,105" size="371,436" id="org.inria.biomaj.internal.ant.task.net/RemoteFile">
+ <children xsi:type="editmodel:CompartmentEditModel" size="130,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="322,380">
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;Ljava.io.File;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAbsolutePath" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getAbsolutePath()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBase" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getBase()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDate" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getDate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinkName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getLinkName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSize" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isDir" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#isDir()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isLink" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#isLink()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setAttributes" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setAttributes(Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBase" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setBase(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDate" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setDate(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDir" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setDir(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLinkName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setLinkName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSize" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setSize(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="toString" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#toString()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="250,190" size="423,61" fontInfo="Arial-9-1" note="L'algorythme du check repose sur des requetes sur le fichier d'état par l'intermédiaire
de BiomajQueryXmlStatefile ainsi que sur l'abstraction des attributs de fichier distant 
(classe RemoteFile)">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.5" target="//@children.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="94,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="104,45"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/net/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant remote task Citrina.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/gmod/biomaj/ant/task/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant task Citrina.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajConsoleLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajConsoleLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajConsoleLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,567 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+import java.io.PrintStream;
+import java.util.Random;
+import java.util.concurrent.Semaphore;
+
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextPane;
+import javax.swing.SwingConstants;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyledDocument;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajExecute;
+import org.inria.biomaj.exe.main.Biomaj;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.inria.biomaj.exe.workflow.*;
+
+/**
+ * Implementation of BuildLogger and WindowsListener to print information about current session
+ * in a BioMAJ console.
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajConsoleLogger implements BuildLogger , WindowListener {
+
+ public static final int PRE = 0;
+ public static final int SYNC = 1;
+ public static final int POST = 2;
+ public static final int DEP = 3;
+ public static final int SYNC_DEP = 4;
+ public static final int REMOVE = 5;
+
+ public static final Color OK_COLOR = new Color(153,204,51);
+ public static final Color ERROR_COLOR = Color.RED;
+
+ public static final String NOT_KEEP_LINE_ON_CONSOLE="__BiomajConsoleLogger__NOT_KEEP_LINE::";
+
+ public static final int SIZE_W=800;
+ public static final int SIZE_H=600;
+
+ /**
+ * @uml.property name="fenetre"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private static JFrame fenetre = null ;
+ /**
+ * @uml.property name="text"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private JTextPane text;
+
+ private static JTabbedPane jtp = null ;
+
+ private static Semaphore mySema = new Semaphore(1);
+
+ /**
+ * @uml.property name="sdoc"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private StyledDocument sdoc;
+ /**
+ * @uml.property name="level"
+ */
+ private int level = Project.MSG_INFO;
+ /**
+ * @uml.property name="we"
+ * @uml.associationEnd multiplicity="(0 -1)" elementType="java.lang.Object" qualifier="key:java.lang.String java.lang.Object"
+ */
+ private Thread we;
+ /**
+ * @uml.property name="lastTask"
+ * @uml.associationEnd multiplicity="(0 -1)" elementType="java.lang.Object" qualifier="key:java.lang.String java.lang.Object"
+ */
+ private String lastTask="";
+ private static int instance = 0;
+ /**
+ * @uml.property name="scroll"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private JScrollPane scroll = null;
+ /**
+ * @uml.property name="position"
+ */
+ private int position =0;
+ /**
+ * @uml.property name="currentTaskName"
+ * @uml.associationEnd multiplicity="(0 -1)" elementType="java.lang.Object" qualifier="key:java.lang.String java.lang.Object"
+ */
+ private String currentTaskName="";
+ /**
+ * Constructor
+ * @param titleConsole title of console
+ * @param we the workflow engine which is executed in the console
+ */
+
+ // Position de l'onglet associe à ce logger
+ private int tabIndex = 0;
+
+ public BiomajConsoleLogger(String titleConsole,Thread we,int type) {
+
+ if (we == null) {
+ BiomajLogger.getInstance().log("Error: Can't define a BiomajConsoleLogger with workflow engine null!");
+ System.exit(-1);
+ }
+
+ // Threads messing up and causing exceptions when several tab are
+ // opened at the same time.
+ Random rand = new Random();
+ int randomWait = rand.nextInt(500);
+ try {
+ Thread.sleep(randomWait);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ createWindows(titleConsole,we);
+
+ addTextPane(titleConsole,we,type);
+ }
+
+
+ public synchronized void createWindows(String titleConsole,Thread we) {
+
+ try {
+ mySema.acquire();
+
+ if ((fenetre != null)||(jtp != null))
+ {
+ mySema.release();
+ return;
+ }
+
+ this.we = we;
+ fenetre = new JFrame("BioMaj-"+Biomaj.VERSION);
+ fenetre.setSize(400,400);
+ fenetre.setVisible(true);
+
+ ImageIcon icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj.png","BioMAJ - cycle update");
+ fenetre.setIconImage(icon.getImage());
+
+ Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension ScreenSize=new Dimension((screenSize.width/2),(screenSize.height/2));
+ Dimension frameSize=new Dimension(SIZE_W,SIZE_H);
+ int x=(ScreenSize.width/2);
+ int y=(ScreenSize.height/2);
+ fenetre.setBounds(x+instance,y+instance,frameSize.width,frameSize.height);
+
+ jtp = new JTabbedPane(SwingConstants.TOP,JTabbedPane.WRAP_TAB_LAYOUT);
+
+ fenetre.getContentPane().setLayout(new BorderLayout());
+ fenetre.getContentPane().add(jtp,BorderLayout.CENTER);
+
+ //fenetre.getContentPane().add(new JScrollPane(debug_text),BorderLayout.CENTER);
+ fenetre.setVisible(true);
+
+ fenetre.addWindowListener(this);
+
+ mySema.release();
+ } catch (InterruptedException ie) {
+ BiomajLogger.getInstance().log(ie);
+ }
+ }
+
+
+ public synchronized void addTextPane(String titleConsole,Thread we,int type) {
+
+ instance = instance+50;
+ text=new JTextPane();
+ text.setEditable(false);
+ this.we = we;
+
+
+ sdoc = text.getStyledDocument();
+
+ Style titleStyle = sdoc.addStyle("info", null);
+ StyleConstants.setBackground(titleStyle , Color.WHITE);
+ StyleConstants.setForeground(titleStyle , Color.BLACK);
+ StyleConstants.setFontFamily(titleStyle , "dialoginput");
+ //StyleConstants.setBold(titleStyle,true);
+ StyleConstants.setFontSize(titleStyle , 12);
+
+ Style descrStyle = sdoc.addStyle("task", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.BLUE);
+ //StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("target", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.BLACK);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("erreur", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.RED);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("warning", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.MAGENTA);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("debug", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.GRAY);
+ //StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("verbose", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.DARK_GRAY);
+ //StyleConstants.setBold(descrStyle, true);
+ descrStyle = sdoc.addStyle("depends", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.GREEN);
+
+ descrStyle = sdoc.addStyle("depends_volatil", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.ORANGE);
+
+
+
+ //Font font = new Font("Arial", Font.BOLD, 10);
+ //textArea.setFont(font);
+
+ //fenetre.getContentPane().setLayout(new BorderLayout());
+ scroll = new JScrollPane(text);
+ scroll.setAutoscrolls(true);
+ ImageIcon icon = null;
+ scroll.setName(titleConsole);
+
+ if (type==BiomajConsoleLogger.PRE) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_pre.png","Preprocess");
+ }
+ else if (type==BiomajConsoleLogger.SYNC) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_sync.png","Synchronize");
+ }
+ else if (type==BiomajConsoleLogger.POST) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_post.png","Postprocess");
+ }
+ else if (type==BiomajConsoleLogger.DEP) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_dep.png","Deployement");
+ }
+ else if (type==BiomajConsoleLogger.SYNC_DEP) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_sync_dep.png","Synchronize/Deployement");
+ }
+ else if (type==BiomajConsoleLogger.REMOVE) {
+ icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj_remove.gif","Postprocess");
+ }
+
+ try {
+ // Semaphore not to have two identical indexes
+ mySema.acquire();
+ jtp.addTab(titleConsole,icon,scroll);
+ tabIndex = jtp.getTabCount() - 1;
+ mySema.release();
+ } catch (InterruptedException ex) {
+ BiomajLogger.getInstance().log(ex);
+ }
+
+ //fenetre.getContentPane().add(new JScrollPane(debug_text),BorderLayout.CENTER);
+ //fenetre.setVisible(true);
+
+ //fenetre.addWindowListener(this);
+ }
+
+ public void setEmacsMode(boolean arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setErrorPrintStream(PrintStream arg0) {
+ }
+
+ public void setMessageOutputLevel(int arg0) {
+ // TODO Auto-generated method stub
+ level = arg0;
+ }
+
+ public void setOutputPrintStream(PrintStream arg0) {
+
+ }
+
+ public void buildFinished(BuildEvent arg0) {
+ try {
+ mySema.acquire();
+ if (checkArg(arg0)) {
+ RemoteBankWorkflowEngine rbwe = null;
+ if (we instanceof RemoteBankWorkflowEngine)
+ rbwe = (RemoteBankWorkflowEngine) we;
+ else if (we instanceof ComputedBankWorkflowEngine)
+ rbwe = ((ComputedBankWorkflowEngine) we).getRemoteBankWorkflowEngine();
+
+ if (rbwe != null && rbwe.getBank() != null) {// Tests sur le workflow
+ if (rbwe.getBank().getCurrentSession().getStatus())
+ jtp.setBackgroundAt(tabIndex, OK_COLOR);
+ else
+ jtp.setBackgroundAt(tabIndex, ERROR_COLOR);
+ } else { // Tests sur les process
+ if (arg0.getException() != null)
+ jtp.setBackgroundAt(tabIndex, ERROR_COLOR);
+ else
+ jtp.setBackgroundAt(tabIndex, OK_COLOR);
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ mySema.release();
+ }
+ }
+
+ public void buildStarted(BuildEvent arg0) {
+ if (checkArg(arg0)) {
+
+ }
+ }
+
+ public void messageLogged(BuildEvent arg0) {
+ try {
+ if (checkArg(arg0)) {
+ if (arg0.getPriority() <= level)
+ {
+ String message = arg0.getMessage();
+ int newPosition;
+ boolean withReturn = true;
+ if (message.contains(NOT_KEEP_LINE_ON_CONSOLE)) {
+
+ if (position==0)
+ newPosition = sdoc.getLength();
+ else
+ newPosition = position;
+
+ message = message.replaceFirst(NOT_KEEP_LINE_ON_CONSOLE, "");
+ withReturn = false;
+ } else {
+ newPosition = 0;
+ }
+
+ Style s = sdoc.getStyle("info");
+
+ if (message.contains(BmajExecute.WARNING_FILTER)) {
+ message = message.replace(BmajExecute.WARNING_FILTER, "");
+ s = sdoc.getStyle("warning");
+ } else if (message.contains(BmajExecute.DEPENDANCE_VOLATILE__FILTER)) {
+ message = message.replace(BmajExecute.DEPENDANCE_VOLATILE__FILTER, "");
+ s = sdoc.getStyle("depends_volatil");
+ } else if (message.contains(BmajExecute.DEPENDANCE_FILTER)) {
+ message = message.replace(BmajExecute.DEPENDANCE_FILTER, "");
+ s = sdoc.getStyle("depends");
+ }
+ else if (arg0.getPriority() == Project.MSG_ERR)
+ s = sdoc.getStyle("erreur");
+ else if (arg0.getPriority() == Project.MSG_WARN)
+ s = sdoc.getStyle("warning");
+ else if (arg0.getPriority() == Project.MSG_DEBUG)
+ s = sdoc.getStyle("debug");
+ else if (arg0.getPriority() == Project.MSG_VERBOSE)
+ s = sdoc.getStyle("verbose");
+
+
+
+ if (position==0)
+ position = sdoc.getLength();
+ else {
+
+ String value = sdoc.getText(sdoc.getLength()-message.length(), message.length());
+ if (message.compareTo(value)==0) {
+ return;
+ }
+ sdoc.remove(position, sdoc.getLength()-position);
+ }
+ if (withReturn)
+ sdoc.insertString(position,message+"\n",s);
+ else {
+ sdoc.insertString(position,message,s);
+ }
+ text.setCaretPosition(text.getDocument().getLength ());
+
+ position = newPosition;
+ /*
+ try {
+ l = text.getDocument().getLength ();
+
+ if (l<0)
+ return;
+
+ Rectangle rec = text.modelToView(l);
+
+ text.scrollRectToVisible(rec);
+ } catch (javax.swing.text.BadLocationException err) {
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("***************************************["+Integer.toString(l)+"]*******************");
+ }*/
+
+ }
+ }
+ /*
+ if (arg0.getPriority() == Project.MSG_ERR) {
+ sdoc.insertString(sdoc.getLength(),"***"+arg0.getMessage()+"****\n",sdoc.getStyle("erreur"));
+ }
+
+ if (arg0.getPriority() == Project.MSG_WARN) {
+ sdoc.insertString(sdoc.getLength(),"***"+arg0.getMessage()+"****\n",sdoc.getStyle("warning"));
+ }
+ */
+ } catch (BadLocationException ex) {
+ BiomajLogger.getInstance().log(ex.getMessage());
+ }
+ }
+
+ public void targetFinished(BuildEvent arg0) {/*
+ if (checkArg(arg0)) {
+
+ System.out.println("\nTarget : "+arg0.getTarget().getName());
+ System.out.println("Exception : "+arg0.getException());
+ }*/
+ }
+
+ public void targetStarted(BuildEvent arg0) {
+ }
+
+ public void taskFinished(BuildEvent arg0) {
+ if (checkArg(arg0)) {
+ }
+
+ }
+
+ public void taskStarted(BuildEvent arg0) {
+ try {
+ if (checkArg(arg0)) {
+ if ((arg0.getTask() != null)&&(lastTask.compareTo(arg0.getTask().getTaskName())!=0)) {
+
+ String taskName = arg0.getTask().getTaskName();
+
+ if (currentTaskName.compareTo(taskName)==0)
+ return;
+ currentTaskName = taskName;
+
+ if (taskToNotWrite(taskName))
+ return;
+
+ sdoc.insertString(sdoc.getLength()," === ["+arg0.getTask().getTaskName()+"] === ".toUpperCase()+"\n",sdoc.getStyle("task"));
+ //lastTask = arg0.getTask().getTaskName();
+ }
+ }
+ } catch (BadLocationException ex) {
+ BiomajLogger.getInstance().log(ex);
+ }
+ }
+
+ public boolean checkArg(BuildEvent arg0) {
+ if (arg0 == null)
+ {
+ return false;
+ }
+ return true;
+ }
+
+
+ protected boolean taskToNotWrite(String taskName) {
+
+ if (taskName.contains("bmaj"))
+ return false;
+
+ return true;
+ }
+
+ public void windowActivated(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void windowClosed(WindowEvent e) {
+ //System.out.println("Close:"+fenetre.getTitle());
+ //we.interrupt();
+ //while (!we.isInterrupted()) {}
+ //System.out.println("Very very Close:"+fenetre.getTitle());
+ }
+
+ public void windowClosing(WindowEvent e) {
+ //System.out.println("Close:"+fenetre.getTitle());
+ // we.interrupt();
+ jtp.removeAll();
+ fenetre.dispose();
+ we.interrupt();
+ /*
+ try {
+ this.finalize();
+ } catch(Throwable t) {
+ System.err.println(t.getMessage());
+ }
+ */
+ //while (!we.isInterrupted()) {}
+ //System.out.println("Very very Close:"+fenetre.getTitle());
+
+ }
+
+ public void windowDeactivated(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void windowDeiconified(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void windowIconified(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void windowOpened(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajMirrorListenerHandler.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajMirrorListenerHandler.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajMirrorListenerHandler.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,388 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.SubBuildListener;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ *<p>This class implements a SubBuildListener of Ant to write the session state
+ * file with update information on each step of Ant.
+ * This listener is attached with the mirror file.</p>
+ * @author ofilangi<br>
+ * @since Biomaj 0.8.0.0
+ *
+ */
+public class BiomajMirrorListenerHandler implements SubBuildListener{
+
+ /**
+ * Listeners to use while citrina process
+ * @uml.property name="bankLogger"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private DBBankLogger bankLogger = new DBBankLogger();
+ private boolean moved = false;
+ private boolean deployed = false;
+
+ public BiomajMirrorListenerHandler() throws BiomajException {
+ }
+
+ /**
+ * Retourne la session courante!
+ * @return
+ */
+/* public Bank getXmlBank(Project p) {
+ if (bankLogger == null ) {
+ throw new BiomajBuildException(p,"session.not.find",null);
+ }
+ return bankLogger.getXmlDescriptionBank();
+ }
+*/
+ /**
+ * This method is called when ant script begin.
+ */
+
+ public void buildStarted(BuildEvent arg0) {
+ if (arg0!=null)
+ {
+ try {
+ String dbName = arg0.getProject().getProperty(BiomajConst.dbNameProperty);
+ bankLogger.beginSession(arg0);
+ Bank bank = BiomajSession.getInstance().getBank(dbName);//getXmlBank(arg0.getProject());
+ if (BiomajLogger.getInstance().getLogger(dbName)!=null)
+ bank.setLogFile(BiomajLogger.getInstance().getLogger(dbName).getNameFile());
+ else {
+ BiomajLogger.getInstance().log("Impossible d initialiser le log de "+arg0.getProject().getProperty(BiomajConst.dbNameProperty)+" logger de cette banque n est pas init!");
+ }
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ public void buildFinished(BuildEvent arg0) {
+
+ if (arg0!=null)
+ {
+ try {
+ // We're probably running an update with an existing production directory
+ // but none logged in the db. Deploy will be skipped because filecheck will return
+ // no file to download, and so no proddir record will be added in the db even though
+ // the session is successful.
+ if (moved && !deployed) {
+ bankLogger.forceDeploymentIfNeeded(arg0);
+ }
+
+ bankLogger.endSession(arg0);
+ } catch (BiomajException be) {
+ System.err.println(be.getLocalizedMessage());
+ //throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+
+ }
+
+
+
+
+ public void messageLogged(BuildEvent arg0) {
+
+ if (arg0==null)
+ return;
+ try {
+ // if an exception is caught!
+ String bio_error = arg0.getProject().getProperty("biomaj.error");
+ if ((bio_error!=null)&&(bio_error.compareTo(arg0.getMessage())==0)) {
+ bankLogger.treatmentWhenFail(arg0);
+ return;
+ }
+ try {
+ // Message to add a file in xml tree!
+ String prefix = BmajTask.filterAddDownloadedFile;
+ if (arg0.getMessage().startsWith(prefix)) {
+ bankLogger.addDownloadFile(arg0,arg0.getMessage());
+ return;
+ }
+ prefix = BmajTask.filterAddExtractedFile;
+ if (arg0.getMessage().startsWith(prefix)) {
+ bankLogger.addExtractedFile(arg0,arg0.getMessage());
+ return;
+ }
+ prefix = BmajTask.filterAddProductionFile;
+ if (arg0.getMessage().startsWith(prefix)) {
+ bankLogger.addFileInProduction(arg0,arg0.getMessage());
+ return;
+ }
+ prefix = BmajTask.filterAddLocalOfflineFile;
+ if (arg0.getMessage().startsWith(prefix)) {
+ bankLogger.addLocalOfflineFile(arg0,arg0.getMessage());
+ return;
+ }
+
+ prefix = BmajTask.filterAddLocalOnlineFile;
+ if (arg0.getMessage().startsWith(prefix)) {
+ bankLogger.addLocalOnlineFile(arg0,arg0.getMessage());
+ return;
+ }
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ }
+
+ if (arg0.getPriority()==Project.MSG_WARN)
+ bankLogger.warnMessage(arg0.getMessage(),arg0);
+ if (arg0.getPriority()==Project.MSG_ERR)
+ bankLogger.errorMessage(arg0.getMessage(),arg0);
+
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+
+ }
+
+ public void targetStarted(BuildEvent arg0) {
+ //Write bank log
+
+ if (arg0.getProject().getProperty(BiomajConst.dbNameProperty)==null)
+ {
+ String info = "db name property unknow! value of db.name:"+arg0.getProject().getProperty(BiomajConst.dbNameProperty);
+ info+="\n (You have to remove \"ftp.\" if you use an old version of citrina!)";
+ throw new BuildException(info);
+ }
+ try {
+ // File Mirror.xml - target : init
+ if (mirrorContext(arg0)&&BiomajConst.initMirrorTarget.equals(arg0.getTarget().getName()))
+ {
+ }
+ else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.checkTarget)==0)
+ {
+ // If Citrine comes into this target, checkfrequency is passed (first step next checkfrequency)
+ bankLogger.mirrorStartedCheckTarget(arg0);
+ }
+ // File Mirror.xml - target : download
+ else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.downloadTarget)==0)
+ {
+ bankLogger.mirrorStartedDownloadTarget(arg0);
+ }
+ // File Mirror.xml - target : extract
+ else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.extractTarget)==0)
+ {
+ bankLogger.mirrorStartedExtractTarget(arg0);
+ }
+ else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.copyTarget)==0)
+ {
+ bankLogger.mirrorStartedCopyTarget(arg0);
+ }
+ else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.moveTarget)==0)
+ {
+ bankLogger.mirrorStartedMoveTarget(arg0);
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.deployTarget)==0)
+ {
+ bankLogger.mirrorStartedDeploymentTarget(arg0);
+ } else if (mirrorContext(arg0)&&(arg0.getTarget().getName().compareTo("workflow_control")==0))
+ {
+ bankLogger.workflowControlStarted(arg0);
+ }
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+
+
+ public void targetFinished(BuildEvent arg0) {
+ try {
+ if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.checkTarget)==0) {
+ bankLogger.mirrorFinishedCheckTarget(arg0);
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.downloadTarget)==0) {
+ bankLogger.mirrorFinishedDownloadTarget(arg0);
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.extractTarget)==0) {
+ bankLogger.mirrorFinishedExtractTarget(arg0);
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.copyTarget)==0) {
+ bankLogger.mirrorFinishedCopyTarget(arg0);
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.moveTarget)==0) {
+ bankLogger.mirrorFinishedMoveTarget(arg0);
+ moved = true;
+ } else if (mirrorContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.deployTarget)==0) {
+ bankLogger.mirrorFinishedDeploymentTarget(arg0);
+ deployed = true;
+ } else if (mirrorContext(arg0)&&(arg0.getTarget().getName().compareTo("workflow_control")==0)) {
+ bankLogger.workflowControlFinished(arg0);
+ }
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+
+
+ public void subBuildFinished(BuildEvent arg0) {
+
+ if (mirrorContext(arg0))
+ {
+ try {
+ bankLogger.mirrorFinnished(arg0);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+ }
+
+
+ public void subBuildStarted(BuildEvent arg0) {
+ }
+
+
+
+ public void taskStarted(BuildEvent arg0) {
+
+ //elementary test
+ if ((arg0==null)||(arg0.getTarget()==null)||(arg0.getTarget().getName().trim().compareTo("")==0))
+ return;
+ try {
+ if (BiomajConst.fileCheckTask.compareTo(arg0.getTask().getTaskName())==0)
+ bankLogger.mirrorStartedFileCheckTask(arg0);
+ else if (BiomajConst.releaseTask.compareTo(arg0.getTask().getTaskName())==0)
+ bankLogger.mirrorStartedGetReleaseTask(arg0);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ }
+
+ public void taskFinished(BuildEvent arg0) {
+
+ if ((arg0==null)||(arg0.getTarget()==null)||(arg0.getTarget().getName().trim().compareTo("")==0))
+ return;
+ try {
+ if (BiomajConst.fileCheckTask.compareTo(arg0.getTask().getTaskName())==0)
+ bankLogger.mirrorFinishedFileCheckTask(arg0);
+ else if (BiomajConst.releaseTask.compareTo(arg0.getTask().getTaskName())==0)
+ bankLogger.mirrorFinishedGetReleaseTask(arg0);
+ else if (BiomajConst.versionsmanagementTask.compareTo(arg0.getTask().getTaskName())==0)
+ bankLogger.versionsmanagementFinishedTask(arg0);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ //else
+ //arg0.getProject().log("NO MATCH:"+arg0.getTask().getTaskName(),Project.MSG_WARN);
+ }
+
+
+ /**
+ * True if the event is in a mirror context (mirror.xml)
+ * @param arg0
+ * @return
+ */
+ protected Boolean mirrorContext(BuildEvent arg0) {
+
+ if (BiomajConst.mirrorProject.compareTo(arg0.getProject().getName())==0)
+ return true;
+
+ return false;
+
+ }
+
+ /****************************************/
+ /* Modifier le statefile offline */
+
+
+ public void startPostProcess(Project pj,String nameMetaProcess,String block) {
+ try {
+ bankLogger.handleOfflineStartPostProcess(pj,nameMetaProcess,block);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+
+
+ public void finishedPostProcess(Project pj, boolean wasLaunched) {
+ try {
+ bankLogger.handleOfflineEndPostProcess(pj);
+// bankLogger.setCleanMeta(wasLaunched);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+
+ public void startPreProcess(Project pj,String nameMetaProcess) {
+ try {
+ bankLogger.handleOfflineStartPreProcess(pj,nameMetaProcess);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+
+
+ public void finishedPreProcess(Project pj) {
+ try {
+ bankLogger.handleOfflineEndPreProcess(pj);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+
+ public void startRemoveProcess(Project pj,String nameMetaProcess,String block) {
+ try {
+ bankLogger.handleOfflineStartRemoveProcess(pj,nameMetaProcess,block);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+
+
+ public void finishedRemoveProcess(Project pj) {
+ try {
+ bankLogger.handleOfflineEndRemoveProcess(pj);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(pj,be);
+ }
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajProcessListenerHandler.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajProcessListenerHandler.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/BiomajProcessListenerHandler.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,273 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.SubBuildListener;
+import org.inria.biomaj.ant.task.BmajExecute;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+/**
+ * <p>This class implements a SubBuildListener of Ant to write the process state
+ * file with update information on each step of Ant.
+ * This listener is attached with the handle_process.xml file.</p>
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajProcessListenerHandler implements SubBuildListener {
+
+ /**
+ * @uml.property name="pl"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private DBProcessLogger pl ;
+ /**
+ * @uml.property name="historic"
+ * @uml.associationEnd
+ */
+// private SimpleLoggerHistoric historic = null;
+ /**
+ * @uml.property name="bank"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Bank bank;
+
+ public BiomajProcessListenerHandler(Bank bank) throws BiomajException {
+ pl = new DBProcessLogger(bank);
+ this.bank = bank;
+ }
+
+ public void subBuildFinished(BuildEvent arg0) {
+ try {
+ pl.endMetaProcessProcess(arg0);
+ } catch (BiomajException be) {
+ throwException(arg0,be);
+ }
+ }
+
+ public void subBuildStarted(BuildEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void buildFinished(BuildEvent arg0) {
+ // historic.stop();
+ }
+
+ public void buildStarted(BuildEvent arg0) {
+ //historic = new SimpleLoggerHistoric(arg0.getProject().getProperty("type_process")+"."+pl.getMetaProcess().getName()+".log",bank,arg0.getProject());
+ SimpleLoggerHistoric slh = BiomajLogger.getInstance().getLogger(bank.getConfig().getName()+"Block:"+pl.getMetaProcess().getBlock()+"."+pl.getMetaProcess().getName());
+ if (slh != null)
+ pl.getMetaProcess().setLogFile(slh.getNameFile());
+ }
+
+ public void messageLogged(BuildEvent arg0) {
+ if (arg0==null) {
+ return;
+ }
+ try {
+ String value = arg0.getMessage();
+// BiomajLogger.getInstance().log("### Message : " + value);
+ /*
+ if (historic != null)
+ historic.write(arg0);
+ */
+ //Tests de Warning
+
+ if (value.contains(BmajExecute.WARNING_FILTER)) {
+ value = value.replaceFirst(BmajExecute.WARNING_FILTER,"");
+ pl.warnMessage(value,arg0);
+ return;
+ }
+
+ if ((value.contains(BmajExecute.DEPENDANCE_FILTER))||(value.contains(BmajExecute.DEPENDANCE_VOLATILE__FILTER))) {
+
+ boolean volatil = value.contains(BmajExecute.DEPENDANCE_VOLATILE__FILTER);
+ String filter = BmajExecute.DEPENDANCE_FILTER;
+ if (volatil)
+ filter = BmajExecute.DEPENDANCE_VOLATILE__FILTER;
+
+ String[] l = value.split(filter);
+ if (l.length!=2) {
+ arg0.getProject().log("Dependance files is bad specified in script!:", Project.MSG_ERR);
+ if (l.length<=0)
+ {
+ arg0.getProject().log("no origine files are specified", Project.MSG_ERR);
+ return;
+ }
+ int i = 0;
+ arg0.getProject().log("origine files:"+l[i++], Project.MSG_ERR);
+
+ if (l.length<2) {
+ arg0.getProject().log("no new files are specified", Project.MSG_ERR);
+ return;
+ }
+ arg0.getProject().log("new files:"+l[i++], Project.MSG_ERR);
+ return;
+ }
+ if (!volatil) {
+ pl.addDependanceFiles(arg0.getProject().getProperty(BiomajConst.dbNameProperty),l[0], l[1],arg0);
+ }
+ else
+ pl.addVolatileDependanceFiles(arg0.getProject().getProperty(BiomajConst.dbNameProperty),l[0], l[1],arg0);
+ }
+
+ if (arg0.getPriority()==Project.MSG_WARN)
+ pl.warnMessage(arg0.getMessage(),arg0);
+ if (arg0.getPriority()==Project.MSG_ERR)
+ pl.errorMessage(arg0.getMessage(),arg0);
+ } catch (BiomajException e) {
+ throwException(arg0,e);
+ }
+ }
+
+ public void targetFinished(BuildEvent arg0) {
+ if (handleProcessContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.processTarget)==0)
+ {
+ if (arg0.getProject().getProperty("type_process")==null) {
+ BiomajLogger.getInstance().log("Internal error: property type_process not defined (process management)");
+ return;
+ }
+ }
+
+ }
+
+ public void targetStarted(BuildEvent arg0) {
+ if (handleProcessContext(arg0)&&arg0.getTarget().getName().compareTo(BiomajConst.processTarget)==0)
+ {
+ if (arg0.getProject().getProperty("type_process")==null) {
+ BiomajLogger.getInstance().log("Internal error: property type_process not defined (process management)");
+ return;
+ }
+ }
+
+ }
+
+ public void taskFinished(BuildEvent arg0) {
+ if (handleProcessContext(arg0)&&arg0.getTask().getTaskName().compareTo("bmaj-execute")==0)
+ {
+ if (arg0.getProject().getProperty("type_process")==null) {
+ BiomajLogger.getInstance().log("Internal error: property type_process not defined (process management)");
+ return;
+ }
+ try {
+ if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.postprocessTarget)==0)
+ pl.endPostProcess(arg0);
+ else if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.preprocessTarget)==0)
+ pl.endPreProcess(arg0);
+ else if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.removeprocessTarget)==0)
+ pl.endRemoveProcess(arg0);
+ else {
+ BiomajLogger.getInstance().log("Internal error: property type_process bad definition ["+arg0.getProject().getProperty("type_process")+"] (process management)");
+ return;
+ }
+ } catch (BiomajException be) {
+ throwException(arg0,be);
+ }
+ }
+
+ }
+
+ public void taskStarted(BuildEvent arg0) {
+ if (handleProcessContext(arg0)&&arg0.getTask().getTaskName().compareTo("bmaj-execute")==0)
+ {
+ if (arg0.getProject().getProperty("type_process")==null) {
+ BiomajLogger.getInstance().log("Internal error: property type_process not defined (process management)");
+ return;
+ }
+ try {
+ if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.postprocessTarget)==0)
+ pl.addPostProcess(arg0);
+ else if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.preprocessTarget)==0)
+ pl.addPreProcess(arg0);
+ else if (arg0.getProject().getProperty("type_process").compareTo(BiomajConst.removeprocessTarget)==0)
+ pl.addRemoveProcess(arg0);
+ else {
+ BiomajLogger.getInstance().log("Internal error: property type_process bad definition ["+arg0.getProject().getProperty("type_process")+"] (process management)");
+ return;
+ }
+ } catch (BiomajException be) {
+ throwException(arg0,be);
+ }
+ }
+ }
+
+ //******************************************** FIN INTERFACE ******************************************************
+
+ protected Boolean handleProcessContext(BuildEvent arg0) {
+
+ if (BiomajConst.handleProcessProject.compareTo(arg0.getProject().getName())==0)
+ return true;
+
+ return false;
+
+ }
+
+
+ public MetaProcess getMetaProcess() {
+ return pl.getMetaProcess();
+ }
+
+
+ public void setMetaProcess(MetaProcess mp) {
+ pl.setMetaProcess(mp);
+ }
+
+ public void setErrorOnCurrentProcess() throws BiomajException {
+ pl.setErrorOnCurrentProcess();
+ }
+
+ public void throwException(BuildEvent arg0,BiomajException e) throws BuildException {
+ arg0.getProject().setProperty(BmajExecute.PROPERTY_ERROR, Boolean.toString(true));
+ arg0.getProject().setProperty(BmajExecute.MESSAGE_PROPERTY_ERROR, e.getMessage());
+ throw new BuildException();
+ //throw new BiomajBuildException(arg0.getProject(),e);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBBankLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBBankLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBBankLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,639 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.ant.task.BmajVersionManagement;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.CheckTask;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.DownloadTask;
+import org.inria.biomaj.session.bank.ExtractTask;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.bank.GeneralWorkflowTask;
+import org.inria.biomaj.session.bank.PostProcessTask;
+import org.inria.biomaj.session.bank.PreProcessTask;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.session.bank.ReleaseTask;
+import org.inria.biomaj.session.bank.RemoveProcessTask;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ *
+ * @author ofilangi
+ */
+public class DBBankLogger {
+
+ protected Bank bank ;
+ /**
+ * @uml.property name="generalXml"
+ * @uml.associationEnd
+ */
+
+ protected String listPostProcess;
+
+ /**
+ * @uml.property name="listPreProcess"
+ */
+ protected String listPreProcess ;
+
+ /**
+ * @uml.property name="listRemoveProcess"
+ */
+ protected String listRemoveProcess ;
+
+ private int idCheckTask = -1;
+
+ public void beginSession(BuildEvent arg0) throws BiomajException {
+
+ //On recharge le contexte si biomaj est execute avec un point d'arret en ligne de commande
+// boolean isLoad = initContext(arg0,BiomajUtils.currentBank(arg0));
+ initContext(arg0,BiomajUtils.currentBank(arg0));
+ /*
+ generalXml.updateBankDescription(arg0.getProject(),currentBank(arg0),
+ arg0.getProject().getProperty(BiomajConst.dbFullNameProperty),
+ BiomajUtils.getCurrentDate());
+ */
+ listPostProcess = arg0.getProject().getProperty(BiomajConst.dbPostProcessProperty);
+ listPreProcess = arg0.getProject().getProperty(BiomajConst.dbPreProcessProperty);
+ listRemoveProcess = arg0.getProject().getProperty(BiomajConst.dbRemoveProcessProperty);
+
+ DBWriter.updateStateSession(bank,true);
+ }
+
+ public void endSession(BuildEvent arg0) throws BiomajException {
+ if (bank == null)
+ return;
+
+ bank.setEnd(new Date());
+ GeneralWorkflowTask g = bank.getCurrentSession().getLastTask();
+
+ if (bank.getErrorOnWorkflow()) {
+ if (g != null)
+ g.setStatus(GeneralWorkflowTask.STATUS_KO);
+ }/* else {
+ /*
+ * Ca releve du patch....
+ *
+ * Il faut encapsuler le traitement entier du deploiement pour un cas d erreur.
+ * Pour l instant, on effectue les traitement du deploiement seulemenent si cette tache c est bien deroule.
+ */
+/* if (g instanceof DeploymentTask) {
+ actionDeployement(arg0);
+ }
+ }*/
+
+// if (bank.isRebuilt() && cleanMeta)
+// bank.setUpdate(false);
+
+ DBWriter.updateStateSession(bank,false);
+ if (bank.isRebuilt())
+ DBWriter.deleteMetaprocesses();
+ }
+
+ public void workflowControlStarted(BuildEvent arg0) throws BiomajException {
+
+ }
+
+ public void workflowControlFinished(BuildEvent arg0) throws BiomajException{
+
+ }
+
+
+ public void mirrorFinnished(BuildEvent arg0) throws BiomajException {
+ }
+
+
+ /*
+ * methods called when end or start event target are caught
+ *
+ */
+
+ public void mirrorStartedDownloadTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.downloadTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void addFileInProduction(BuildEvent arg0, String message) throws BiomajException {
+ //mode location hash
+ Pattern p = Pattern.compile(BmajTask.filterAddProductionFile+BmajTask.regExpAddProductionFile);
+ Matcher m = p.matcher(message);
+
+ if (!m.find()) {
+ BiomajLogger.getInstance().log("Can't add production file (can't parse:"+message+")");
+ return;
+ }
+
+ String location = m.group(1);
+ boolean copy = Boolean.valueOf(m.group(2));
+ String refHash = ((ExtractTask) bank.getCurrentSession().getWorkflowTask(Session.EXTRACT)).getFileRefHash(location);
+ bank.addFilesInProduction(location, refHash, copy);
+ }
+
+
+
+ public void mirrorFinishedDownloadTarget(BuildEvent arg0) throws BiomajException {
+ DownloadTask dt = (DownloadTask)bank.setEndProcess(BiomajConst.downloadTarget);
+
+ String val = arg0.getProject().getProperty("download.needed");
+
+ if (Boolean.valueOf(val)) {
+
+ double timeInSec = ((double)(dt.getEnd().getTime() - dt.getStart().getTime()))/(double)(1000);
+ double sizeInMo = (double)(dt.getSizeDownloaded())/(double)(1024*1024);
+
+ //System.out.println("down size (Mo):"+Double.toString(sizeInMo));
+ //System.out.println("time(s):"+Double.toString(timeInSec));
+
+ dt.setBandWidth(sizeInMo/timeInSec);
+
+ bank.setWorkflowInfoSizeDownload(dt.getSizeDownloaded());
+ }
+
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorStartedExtractTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.extractTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorFinishedExtractTarget(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.extractTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorStartedCheckTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.checkTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorFinishedCheckTarget(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.checkTarget);
+ CheckTask ct = (CheckTask)bank.getProcessRuntime(BiomajConst.checkTarget);
+ ct.setNbFilesExtract(Integer.valueOf(arg0.getProject().getProperty(BiomajConst.countExtractProperty)));
+ ct.setNbFilesDownload(Integer.valueOf(arg0.getProject().getProperty(BiomajConst.countDownloadProperty)));
+ ct.setNbFilesLocalOnline(Integer.valueOf(arg0.getProject().getProperty(BiomajConst.countLocalOnlineFileProperty)));
+ ct.setNbFilesLocalOffline(Integer.valueOf(arg0.getProject().getProperty(BiomajConst.countLocalOfflineFileProperty)));
+
+ boolean fileCopyNeed = Boolean.valueOf(arg0.getProject().getProperty(BiomajConst.filesCopyNeedDynamicProperty));
+ bank.setUpdate(fileCopyNeed || (ct.getNbFilesDownload()>0) || (ct.getNbFilesLocalOffline()>0));
+
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorStartedCopyTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.copyTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorFinishedCopyTarget(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.copyTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorStartedMoveTarget(BuildEvent arg0) throws BiomajException {
+
+ GeneralWorkflowTask task = null;
+ if ((task = bank.getCurrentSession().getWorkflowTask(Session.COPY)) == null) {
+ Collections.sort(bank.getListOldSession());
+ int pos = bank.getListOldSession().size() - 1;
+ while (pos >= 0 && (task = bank.getListOldSession().get(pos).getWorkflowTask(Session.COPY)) == null)
+ pos--;
+ }
+ if (task == null)
+ throw new BiomajException("No copy task could be found in previous sessions.");
+
+ int taskId = task.getTaskId();
+ arg0.getProject().setProperty("taskId", String.valueOf(taskId));
+
+ bank.setStartProcess(BiomajConst.moveTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorFinishedMoveTarget(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.moveTarget);
+ if (arg0.getProject().getProperties().containsKey(BiomajConst.offlineHasFilesDynamicProperty)) {
+ if (Boolean.valueOf(arg0.getProject().getProperty(BiomajConst.offlineHasFilesDynamicProperty))) {
+ bank.setOnlineDirectory(BiomajUtils.getNameDirectoryFuturRelease(arg0.getProject()));
+ bank.setWorkflowInfoIsDeployed(false);
+ }
+ }
+ DBWriter.updateStateSession(bank,false);
+// DBWriter.createBackup(bank.getConfig().getName());
+ }
+
+ public void mirrorStartedDeploymentTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.deployTarget);
+ DBWriter.updateStateSession(bank,false);
+
+ }
+
+ public void mirrorFinishedDeploymentTarget(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.deployTarget);
+ actionDeployement(arg0);
+ }
+
+ public void forceDeploymentIfNeeded(BuildEvent buildEvent) throws BiomajException {
+ if (BiomajSQLQuerier.getAvailableProductionDirectories(bank.getConfig().getName()).size() == 0) {
+ Project project = buildEvent.getProject();
+ project.log("No production directory was found in the db. Deployment will be forced with current one.");
+// bank.setWorkflowInfoProductionDir(workflowInfoProductionDir)
+ File current = new File(project.getProperty("data.dir") + "/" + project.getProperty("dir.version") + "/current");
+ if (current.exists()) {
+ try {
+ String path = current.getCanonicalPath();
+ bank.setWorkflowInfoProductionDir(path);
+ actionDeployement(buildEvent);
+ } catch (IOException e) {
+ project.log(e.getMessage(), Project.MSG_ERR);
+ }
+ }
+ }
+ }
+
+ public void actionDeployement(BuildEvent arg0) throws BiomajException {
+ bank.setWorkflowInfoIsDeployed(true);
+ bank.addProductionDirectory(bank.getWorkflowInfoProductionDir());
+ DBWriter.updateStateSession(bank,false);
+ DBWriter.updateStateSessionWithProductionDir(bank);
+
+ Vector<ProductionDirectory> pdl = bank.getBankStateListProductionDirectories();
+ if (pdl.size()>=2) {
+ if (pdl.get(pdl.size()-1).getSize()<pdl.get(pdl.size()-2).getSize())
+ arg0.getProject().log("New production directory is smaller than the previous one [new size:"+
+ Long.toString(pdl.get(pdl.size()-1).getSize())+"] [old size:"+
+ Long.toString(pdl.get(pdl.size()-2).getSize())+"]",Project.MSG_WARN);
+ }
+ }
+
+ public void versionsmanagementFinishedTask(BuildEvent arg0) throws BiomajException {
+
+ String mode = arg0.getProject().getProperty(BmajVersionManagement.MODE);
+ String directories = arg0.getProject().getProperty(BmajVersionManagement.RESULTS);
+
+ arg0.getProject().log("MODE:"+mode+" RESULTS:"+directories,Project.MSG_DEBUG);
+ if ((BmajVersionManagement.DELETE.compareTo(mode)==0)||(BmajVersionManagement.REBUILD.compareTo(mode)==0)) {
+ String[] dirs = directories.split(",");
+ for (int i=0;i<dirs.length;i++)
+ bank.removeProductionDirectory(dirs[i]);
+ DBWriter.updateStateSessionWithProductionDir(bank);
+ } else {
+ }
+ }
+
+ /**
+ * INTERFACE TASKS METHODS
+ */
+
+ public void mirrorStartedFileCheckTask(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.checkTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorFinishedFileCheckTask(BuildEvent arg0) throws BiomajException {
+ bank.setEndProcess(BiomajConst.checkTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void mirrorFinishedGetReleaseTask(BuildEvent arg0) throws BiomajException {
+ String release = arg0.getProject().getProperty(BiomajConst.releaseResultProperty);
+ bank.setRelease(release);
+ ReleaseTask proc = (ReleaseTask) bank.setEndProcess(BiomajConst.releaseTarget);
+ proc.setValue(release);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorStartedGetReleaseTask(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.releaseTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ String getProperty(BuildEvent arg0, String property) {
+
+ //This listener handle only the mirror.xml
+ if (arg0.getProject().getName().compareTo(BiomajConst.mirrorProject)==0)
+ {
+ return arg0.getProject().getProperty(property);
+ }
+
+ return BiomajConst.noMirrorContext;
+ }
+
+ /**
+ * Load a context find in xml file. return true if context is loaded!
+ * @param dbName
+ */
+
+ private boolean initContext(BuildEvent arg0,String dbName) {
+ try {
+ //String propFile = BiomajUtils.getProperty(arg0.getProject(),BiomajConst.propertiesDirectoryProperty)+"/"+dbName+".properties";
+
+ Configuration config = new Configuration();
+ if (!BiomajUtils.fillConfig(dbName, config))
+ throw new BiomajBuildException(arg0.getProject(), new Exception("Can't create bank. Check the bank properties."));
+
+ Bank xbd = new Bank();
+ xbd.setConfig(config);
+
+ /**
+ * Test et restauration du backup si probleme à la lecture
+ */
+
+ restoreDatabase();
+
+ xbd.setBankStateListProductionDirectories(BiomajSQLQuerier.getAllProductionDirectories(dbName));
+
+ bank = xbd;
+
+ //Chargement du context si biomaj a ete lance avec une ligne de commande point d arret!
+ boolean newupdate = Boolean.valueOf(arg0.getProject().getProperty(BiomajConst.newUpdateProperty));
+
+ /****
+ * Test si il y a un current directory et pas de session avec update
+ */
+// Bank test = new Bank();
+// boolean notFirstSession = BiomajQueryXmlStateFile.getLastUpdateBankWithNewRelease(dbName,test,false);
+
+ if (BiomajSQLQuerier.getLatestUpdateWithProductionDirectory(dbName) == null) {
+ String dataD = arg0.getProject().getProperty(BiomajConst.dataDirProperty);
+ File f = new File (dataD+"/"+config.getVersionDirectory()+"/"+BiomajConst.currentLink+"/flat");
+
+ if (f.exists()) {
+
+ arg0.getProject().log("directory ["+f.getAbsolutePath()+"] exist in version directory.",Project.MSG_ERR);
+ arg0.getProject().log("Run biomaj with import option to handle a local bank with biomaj.",Project.MSG_ERR);
+ // arg0.getProject().log("Move all files from this directory to "+dataD+"/"+config.getOfflineDirectory()+" to archives them in a new version.",Project.MSG_ERR);
+ throw new BiomajBuildException(arg0.getProject(),"kill.application.withoutlog",new Exception());
+ }
+ }
+ bank.setStart(new Date());
+ bank.fill(BiomajSQLQuerier.getLatestUpdate(dbName, false), true);
+
+ boolean newConfig = DBWriter.thereIsANewConfig(xbd);
+
+// Debut d'une nouvelle session
+ bank.setEnd(null);
+
+ if (newConfig || newupdate || bank.needANewCycleUpdate()) {
+ //New update!
+ bank = new Bank();
+ bank.setStart(new Date());
+ bank.setConfig(config);
+ bank.setBankStateListProductionDirectories(BiomajSQLQuerier.getAllProductionDirectories(dbName));
+ BiomajSession.getInstance().addBank(dbName, bank);
+ return false;
+ } else {
+ BiomajSession.getInstance().addBank(dbName, bank);
+ return true;
+ }
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(arg0.getProject(),e);
+ }
+ }
+
+ private void restoreDatabase() {
+
+ }
+
+ /**
+ * get the object associated with the bank to fill a bank's description
+ * @param dbName
+ * @return
+ */
+// Bank getXmlDescriptionBank() {
+// return bank;
+// }
+
+ public void errorMessage(String message, BuildEvent arg0) throws BiomajException {
+ //can't log error before target workflow_control
+ if (bank==null)
+ return;
+ String nameTarget = "";
+ if (arg0.getTarget()!=null)
+ nameTarget = arg0.getTarget().getName();
+
+ bank.addErrProcess(nameTarget, message);
+
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void warnMessage(String message, BuildEvent arg0) throws BiomajException {
+// can't log warning before target workflow_control
+ if (bank==null)
+ return;
+
+ String nameTarget = "";
+ if (arg0.getTarget()!=null)
+ nameTarget = arg0.getTarget().getName();
+
+ bank.addWarnProcess(nameTarget, message);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void treatmentWhenFail(BuildEvent arg0) throws BiomajException {
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void addLocalOfflineFile(BuildEvent arg0, String message) throws BiomajException {
+ Pattern p = Pattern.compile(BmajTask.filterAddLocalOfflineFile+BmajTask.regExpAddLocalOfflineFile);
+ Matcher m = p.matcher(message);
+
+ if (!m.find()) {
+ BiomajLogger.getInstance().log("Can't add local offline file (can't parse:"+message+")");
+ return;
+ }
+
+ FileDesc toAdd = bank.addLocalOfflineFile(m.group(1));
+
+ if (idCheckTask < 0) {
+ DBWriter.updateStateSession(bank,false);
+ long sessionId = bank.getCurrentSession().getId();
+ List<Map<String, String>> tasks = BiomajSQLQuerier.getSessionTasks(sessionId);
+ for (Map<String, String> task : tasks)
+ if (task.get(BiomajSQLQuerier.TASK_TYPE).equals(BiomajConst.checkTag)) {
+ idCheckTask = Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID));
+ break;
+ }
+ } else {
+ DBWriter.addFileToTask(toAdd, idCheckTask, "file");
+ }
+ }
+
+ public void addLocalOnlineFile(BuildEvent arg0, String message) throws BiomajException {
+ Pattern p = Pattern.compile(BmajTask.filterAddLocalOnlineFile+BmajTask.regExpAddLocalOnlineFile);
+ Matcher m = p.matcher(message);
+
+ if (!m.find())
+ {
+ BiomajLogger.getInstance().log("Can't add local online file (can't parse:"+message+")");
+ return;
+ }
+
+ bank.addLocalOnlineFile(m.group(1));
+ DBWriter.updateStateSession(bank,false);
+ }
+
+
+ public void addDownloadFile(BuildEvent arg0,String message) throws BiomajException {
+
+ Pattern p = Pattern.compile(BmajTask.filterAddDownloadedFile+BmajTask.regExpAddDownloadedFile);
+ Matcher m = p.matcher(message);
+
+ if (!m.find())
+ {
+ BiomajLogger.getInstance().log("Can't add download file (can't parse:"+message+")");
+ return;
+ }
+
+ bank.getCurrentSession().setActiveTask(bank.getCurrentSession().getWorkflowTask(Session.DOWNLOAD));
+ bank.addDownloadFile(m.group(1), Long.valueOf(m.group(2)), Long.valueOf(m.group(3)));
+ DBWriter.updateStateSession(bank,false);
+ bank.getCurrentSession().setActiveTask(null);
+ }
+
+ public void addExtractedFile(BuildEvent arg0, String message) throws BiomajException {
+ //1er groupe nom compresse, 2eme hash fichier compresse,3eme groupe nom de l extract,4eme hash du fichier decompresse
+ Pattern p = Pattern.compile(BmajTask.filterAddExtractedFile+BmajTask.regExpAddExtractedFile);
+ Matcher m = p.matcher(message);
+
+ if (!m.find())
+ {
+ BiomajLogger.getInstance().log("Can't add extraction file (can't parse:"+message+")");
+ return;
+ }
+
+ String fileUncompressed = m.group(1);
+ String refHash = m.group(2);
+
+ bank.addFilesInExtraction(fileUncompressed,refHash);
+// DBWriter.updateStateSession(bank,false);
+ }
+
+ public void mirrorStartedPostProcessTarget(BuildEvent arg0) throws BiomajException {
+ bank.setStartProcess(BiomajConst.postprocessTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void handleOfflineEndPostProcess(Project p) throws BiomajException {
+ if (bank.getProcessRuntime(BiomajConst.postprocessTarget)!=null) {
+ bank.setEndProcess(BiomajConst.postprocessTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+ }
+
+ public void handleOfflineEndPreProcess(Project p) throws BiomajException {
+ if (bank.getProcessRuntime(BiomajConst.preprocessTarget)!=null) {
+ bank.setEndProcess(BiomajConst.preprocessTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ }
+
+ public void handleOfflineEndRemoveProcess(Project p) throws BiomajException {
+ if (bank.getProcessRuntime(BiomajConst.removeprocessTarget)!=null) {
+ bank.setEndProcess(BiomajConst.removeprocessTarget);
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ }
+
+ public void handleOfflineStartPostProcess(Project pj,String nameProcess,String block) throws BiomajException {
+ if (bank.getProcessRuntime(BiomajConst.postprocessTarget)==null)
+ bank.setStartProcess(BiomajConst.postprocessTarget);
+
+ PostProcessTask p = (PostProcessTask)bank.getProcessRuntime(BiomajConst.postprocessTarget);
+ if (nameProcess.compareTo("")!=0)
+ p.addMetaProcess(nameProcess,block);
+
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void handleOfflineStartPreProcess(Project pj,String nameMetaProcess) throws BiomajException {
+ if (bank.getProcessRuntime(BiomajConst.preprocessTarget)==null)
+ bank.setStartProcess(BiomajConst.preprocessTarget);
+ PreProcessTask p = (PreProcessTask)bank.getProcessRuntime(BiomajConst.preprocessTarget);
+ if (nameMetaProcess.compareTo("")!=0)
+ p.addMetaProcess(nameMetaProcess,"");
+ DBWriter.updateStateSession(bank,false);
+ }
+
+ public void handleOfflineStartRemoveProcess(Project pj,String nameProcess,String block) throws BiomajException {
+
+ if (bank.getProcessRuntime(BiomajConst.removeprocessTarget)==null)
+ bank.setStartProcess(BiomajConst.removeprocessTarget);
+
+ RemoveProcessTask p = (RemoveProcessTask)bank.getProcessRuntime(BiomajConst.removeprocessTarget);
+ if (nameProcess.compareTo("")!=0)
+ p.addMetaProcess(nameProcess,block);
+
+// bank.setStart(new Date());
+
+ DBWriter.updateStateSession(bank,false);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBProcessLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBProcessLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBProcessLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,313 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+import org.apache.tools.ant.BuildEvent;
+import org.inria.biomaj.ant.task.BmajExecute;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * <p>Handle the mapping of Process object and database</p>
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class DBProcessLogger {
+
+ /**
+ * @uml.property name="bank"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Bank bank = null;
+ /**
+ * @uml.property name="metaProcess"
+ * @uml.associationEnd
+ */
+ private MetaProcess metaProcess = null;
+ /**
+ * @uml.property name="current"
+ * @uml.associationEnd
+ */
+ private BiomajProcess current;
+
+ public DBProcessLogger(Bank bank) throws BiomajException {
+
+ if (bank == null) {
+ BiomajLogger.getInstance().log("Error internal: not find session in XmlProcessLogger");
+ throw new BiomajException("");
+ }
+
+ this.bank = bank;
+ }
+
+
+ public void addPostProcess(BuildEvent arg0) throws BiomajException {
+
+ String keyname = arg0.getProject().getProperty("name_process");
+ String name = arg0.getProject().getProperty(keyname+".name");
+ String exe = arg0.getProject().getProperty(keyname+".exe");
+ String args = arg0.getProject().getProperty(keyname+".args");
+ String desc = arg0.getProject().getProperty(keyname+".desc");
+ String type = arg0.getProject().getProperty(keyname+".type");
+
+ current = new BiomajProcess();
+ current.setKeyName(keyname);
+ current.setArgs(args);
+ current.setExe(exe);
+ current.setNameProcess(name);
+ current.setDescription(desc);
+ current.setType(type);
+ current.setStart(new Date());
+ current.setTimeStampExe(BmajExecute.getTimeStampExe(BmajExecute.getPathExe(null,exe)));
+ metaProcess.setStart(current.getStart());
+ metaProcess.setEnd(new Date());
+ metaProcess.getListProcess().add(current);
+
+ updateInDB();
+
+ }
+
+
+
+
+ public void endPostProcess(BuildEvent arg0) throws BiomajException{
+ if (current==null) {
+ BiomajLogger.getInstance().log("Can't initialized end date for process!(XmlProcessLogger)");
+ return;
+ }
+ current.setEnd(new Date());
+ String value = arg0.getProject().getProperty("returnValue");
+ if (value!=null)
+ current.setReturnValue(Integer.valueOf(value));
+ else {
+ BiomajLogger.getInstance().log("Error Biomaj :Can't get return value from script!");
+ }
+ updateInDB();
+ current=null;
+ }
+
+
+ public void endMetaProcessProcess(BuildEvent arg0) throws BiomajException{
+ metaProcess.setEnd(new Date());
+ updateInDB();
+ }
+
+
+ public void errorMessage(String message, BuildEvent arg0) throws BiomajException{
+
+ if (current==null)
+ metaProcess.getErr().add(message);
+ else
+ current.getErr().add(message);
+ updateInDB();
+ }
+
+
+ public void warnMessage(String message, BuildEvent arg0) throws BiomajException{
+ if (current==null)
+ metaProcess.getWarn().add(message);
+ else
+ current.getWarn().add(message);
+ updateInDB();
+
+ }
+
+
+ private void updateInDB() throws BiomajException {
+
+ if ((metaProcess.getName()==null)||(metaProcess.getName().trim().compareTo("")==0)) {
+ BiomajLogger.getInstance().log("Object MetaProcess initialized without name!");
+ return;
+ }
+ DBWriter.createMetaprocess(bank.getConfig().getName(),bank.getCurrentSession(), metaProcess);
+ }
+
+
+// private Vector<FileDesc> getFilesOnSystem(String path,boolean volatil) {
+// Vector<FileDesc> list = new Vector<FileDesc>();
+// String[] all = path.split("/");
+//
+// if (all.length<=0)
+// {
+// System.err.println("Path for file dependence has been absolute");
+// return list;
+// }
+//
+// try {
+// Pattern filePattern = Pattern.compile(all[all.length-1]);
+//
+// String directory = path.replace("/"+all[all.length-1], "");
+//
+// File workDir = new File(directory);
+//
+// if (!workDir.exists()) {
+// BiomajLogger.getInstance().log(directory+" does not exist!");
+// current.setErrorDetected(true);
+// return list;
+// }
+//
+// if (workDir.isDirectory()) {
+// File[] l = workDir.listFiles();
+// for (File f : l) {
+// if (filePattern.matcher(f.getName()).find()) {
+// FileDesc fd = new FileDesc(f,volatil);
+// list.add(fd);
+// }
+// }
+// }
+// } catch (Exception e) {
+// BiomajLogger.getInstance().log(all[all.length-1] + " bad java regular expression! (use [\\w]+ and not *)");
+// }
+//
+// return list;
+//
+// }
+
+ private void addDependance(String dbname,String origineFiles, String newFiles,BuildEvent arg0,boolean volatil) throws BiomajException {
+
+ String[] news = newFiles.split("\\s");
+ for (String i : news) {
+ //On ne gere pas les expressions reguliere....
+ //current.getDependancesOutput().addAll(getFilesOnSystem(i,volatil));
+
+ if (i.contains(BiomajConst.futureReleaseLink)) {
+ Bank b = BiomajSession.getInstance().getBank(dbname);
+ if (b != null) {
+// String[] dirs = b.getWorkflowInfoProductionDir().split("/");
+// i = i.replaceFirst(BiomajConst.futureReleaseLink, dirs[dirs.length-1]);
+ File f = new File(i);
+ if (f.exists()) {
+ try {
+ i = f.getCanonicalPath(); // true path without link
+ } catch (IOException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ }
+ } else {
+ i = i.replaceFirst(BiomajConst.futureReleaseLink, BiomajConst.currentLink);
+ }
+ }
+ try {
+ current.getDependancesOutput().add(new FileDesc(new File(i),volatil));
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be.getMessage());
+ }
+ }
+ }
+
+
+ public void addDependanceFiles(String dbname,String origineFiles, String newFiles,BuildEvent arg0) throws BiomajException {
+ addDependance(dbname,origineFiles,newFiles,arg0,false);
+ }
+
+
+
+
+
+ public void addVolatileDependanceFiles(String dbname,String origineFiles, String newFiles, BuildEvent arg0) throws BiomajException {
+ addDependance(dbname,origineFiles,newFiles,arg0,true);
+ }
+
+
+ public void addPreProcess(BuildEvent arg0) throws BiomajException {
+ addPostProcess(arg0);
+ // Same stuff as for a post process
+ }
+
+
+ public void endPreProcess(BuildEvent arg0) throws BiomajException {
+ endPostProcess(arg0);
+ // Same stuff as for a post process
+ }
+
+
+ public void addRemoveProcess(BuildEvent arg0) throws BiomajException {
+ addPostProcess(arg0);
+ // Same stuff as for a post process
+ }
+
+
+ public void endRemoveProcess(BuildEvent arg0) throws BiomajException {
+ endPostProcess(arg0);
+ // Same stuff as for a post process
+ }
+
+ /**
+ * @return the metaProcess
+ * @uml.property name="metaProcess"
+ */
+ public MetaProcess getMetaProcess() {
+ return metaProcess;
+ }
+
+
+ /**
+ * @param metaProcess the metaProcess to set
+ * @uml.property name="metaProcess"
+ */
+ public void setMetaProcess(MetaProcess mp) {
+ metaProcess = mp;
+
+ }
+
+
+ public void setErrorOnCurrentProcess() throws BiomajException {
+ if (metaProcess.getListProcess().size()>0) {
+ metaProcess.getListProcess().get(metaProcess.getListProcess().size()-1).setErrorDetected(true);
+ updateInDB();
+ }
+ }
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBWriter.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBWriter.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/DBWriter.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,1018 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Vector;
+
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.bank.GeneralWorkflowTask;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Static methods for database population.
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class DBWriter {
+
+ private static List<String> metaIdToDelete = new ArrayList<String>();
+ private static SQLConnection connection = SQLConnectionFactory.getConnection();
+
+
+ /**
+ * True if a new config is detected
+ * @param xmlBank
+ * @return
+ */
+ public static synchronized boolean thereIsANewConfig(Bank xmlBank) throws BiomajException {
+
+ if (!wellFormed(xmlBank))
+ return true;
+
+ boolean newConfig = createContentConfig(xmlBank.getConfig(), getBankId(xmlBank.getConfig().getName()));
+
+ return newConfig;
+ }
+
+ /**
+ *
+ * @param bank
+ * @param newSession
+ * @param deleteOldUpdateBank
+ * @return Id of created update record
+ * @throws BiomajException
+ */
+ public synchronized static void updateStateSession(Bank bank, boolean newSession) throws BiomajException {
+
+ if (!wellFormed(bank))
+ return;
+
+ String query = "";
+ long confId = BiomajSQLQuerier.getLatestConfigurationWithSession((int) getBankId(bank.getConfig().getName()), false);
+ Session session = bank.getCurrentSession();
+ long updateId = -1;
+ if (newSession) { // Create a new session element
+ if (bank.getListOldSession().size() == 0 || // If the session is ok and is not a removeprocess
+ (bank.getListOldSession().get(bank.getListOldSession().size() - 1).getStatus()
+ && !(bank.getListOldSession().size() == 1 && bank.getListOldSession().get(0).getWorkflowTask(Session.REMOVEPROCESS) != null))) { // If the latest session is ok, create a new update element
+ /*
+ * NEW UPDATE
+ */
+ query = "INSERT INTO updateBank(ref_idconfiguration, productionDirectoryPath, productionDirectoryDeployed," +
+ "sizeDownload, sizeRelease, startTime, endTime, isUpdated, nbSessions, updateRelease, idLastSession) " +
+ "values(" + confId + ",'" + bank.getWorkflowInfoProductionDir() + "'," + bank.getWorkflowInfoIsDeployed() +
+ ",'" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "','" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "','" +
+ BiomajUtils.dateToString(bank.getStart(), Locale.US) + "','" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) +
+ "'," + bank.isUpdate() + ",1";
+ if (bank.getWorkflowInfoRelease() != null) {
+ query += ",'" + bank.getWorkflowInfoRelease() + "'";
+ } else
+ query += ",null";
+ // Idlastsession
+ query += "," + bank.getCurrentSession().getId() + ");";
+ Statement stat = connection.getStatement();
+ updateId = connection.executeUpdateAndGetGeneratedKey(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+
+ } else {
+ updateId = Long.valueOf(BiomajSQLQuerier.getLatestUpdate(bank.getConfig().getName(), false).get(BiomajSQLQuerier.UPDATE_ID));
+ updateUpdateBank(bank, confId, updateId);
+ }
+
+ /*
+ * NEW SESSION
+ */
+ query = "INSERT INTO session(idsession, ref_idupdateBank, parse, status, startTime, endTime, elapsedTime, logfile) " +
+ "values(" + session.getId() + "," + updateId + ",'xml'," + session.getStatus() + ",'" + BiomajUtils.dateToString(session.getStart(), Locale.US) +
+ "','" + BiomajUtils.dateToString(session.getEnd(), Locale.US) + "','";
+ if (session.getEnd() == null) // elapsed time
+ query += BiomajUtils.timeToString(new Date().getTime() - session.getStart().getTime()) +
+ "','" + session.getLogfile() + "');";
+ else
+ query += (session.getEnd().getTime() - session.getStart().getTime()) +
+ "','" + session.getLogfile() + "');";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+
+ } else { // Update an existing session
+ updateId = Long.valueOf(BiomajSQLQuerier.getLatestUpdate(bank.getConfig().getName(), false).get(BiomajSQLQuerier.UPDATE_ID));
+ updateUpdateBank(bank, confId, updateId);
+
+ query = "UPDATE session SET " +
+ "status=" + session.getStatus() + "," +
+ "startTime='" + BiomajUtils.dateToString(session.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(session.getEnd(), Locale.US) + "',";
+ if (session.getEnd() == null)
+ query += "elapsedTime='" + BiomajUtils.timeToString(new Date().getTime() - session.getStart().getTime()) + "',";
+ else
+ query += "elapsedTime='" + BiomajUtils.timeToString(session.getEnd().getTime() - session.getStart().getTime()) + "',";
+
+ query += "logfile='" + session.getLogfile() + "' WHERE idsession=" + session.getId();
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+
+// BiomajSQLQuerier.deleteSessionMessages(session.getId());
+ }
+
+ GeneralWorkflowTask p1 = session.getLastTask();
+ GeneralWorkflowTask p2 = session.getActiveTask();
+ if (p1 != null) {
+ setElementTaskWorkflow(p1);
+ } else if (p2 != p1 && p2 != null) {
+ setElementTaskWorkflow(p2);
+ }
+
+
+ addMessages("warning",session.getNewWarn(),session.getId().toString(),"session");
+ addMessages("error",session.getNewErr(), session.getId().toString(), "session");
+
+ /*
+ String bankName = bank.getConfig().getName();
+ int id = BiomajSQLQuerier.getBankId(bankName);
+ long updateId = -1;
+
+ if (BiomajSQLQuerier.getConfigCount(bankName) > 0) {
+
+ String query = "SELECT idconfiguration FROM configuration WHERE ref_idbank=" + id +
+ " AND date = (SELECT MAX(date) FROM configuration WHERE ref_idbank = " +
+ id + ");";
+ connection.executeQuery(query, true);
+ long confId = 0;
+ try {
+ connection.getResult().next();
+ confId = connection.getResult().getLong(1);
+ connection.closeStatement();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ if (newSession) {
+ updateId = createUpdateBank(bank, confId, -1);
+ }
+ else {
+ query = "SELECT max(idupdateBank) FROM updateBank WHERE ref_idconfiguration=" + confId;
+ connection.executeQuery(query, true);
+ try {
+ if (connection.getResult().next()) {
+ updateId = createUpdateBank(bank, confId, connection.getResult().getInt(1));
+ connection.closeStatement();
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return updateId;
+ } else
+ return -1;*/
+ }
+
+ /**
+ * Modify an updateBank record.
+ *
+ * @param bank
+ * @param confId
+ * @param updateId
+ * @param nbSessions
+ */
+ public static synchronized void updateUpdateBank(Bank bank, long confId, long updateId) {
+ String query = "UPDATE updateBank set " +
+ "ref_idconfiguration=" + confId + "," +
+ "productionDirectoryPath='" + bank.getWorkflowInfoProductionDir() + "'," +
+ "productionDirectoryDeployed=" + bank.getWorkflowInfoIsDeployed() + "," +
+ "sizeDownload='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "'," +
+ "sizeRelease='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "'," +
+ "startTime='" + BiomajUtils.dateToString(bank.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) + "'," +
+ "isUpdated=" + bank.isUpdate() + "," +
+ "nbSessions='" + (bank.getListOldSession().size() + 1) + "',";
+
+ if (bank.getWorkflowInfoRelease() != null) {
+ query += "updateRelease='" + bank.getWorkflowInfoRelease() + "',";
+ } else
+ query += "updateRelease=null,";
+
+ // Idlastsession
+ query += "idLastSession=" + bank.getCurrentSession().getId();
+ query += " WHERE idupdateBank=" + updateId;
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ }
+
+ public static synchronized void addFileToTask(FileDesc fd, long taskId, String fileType) {
+ String query = "INSERT INTO file(location, size, time, link, is_extract, volatile, refHash, fileType) " +
+ "values('" + fd.getLocation() + "','" + fd.getSize() + "','" + fd.getTime() + "'," + fd.isLink() +
+ "," + fd.isExtract() + "," + fd.isVolatil() + ",";
+ if (fd.getRefHash() == null)
+ query += "null";
+ else
+ query += "'" + fd.getRefHash() + "'";
+ query += ",'" + fileType + "');";
+
+ Statement stat = connection.getStatement();
+ long id = connection.executeUpdateAndGetGeneratedKey(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ fd.setFileId(id);
+
+ query = "INSERT INTO sessionTask_has_file(ref_idsessionTask,ref_idfile) " +
+ "VALUES(" + taskId + "," + id + ");";
+
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ /**
+ *
+ * @param bank
+ * @param confId
+ * @param updateId
+ * @return Update Id
+ * @throws BiomajException
+ */
+ public static synchronized long createUpdateBank(Bank bank, long confId, long updateId) throws BiomajException {
+
+ if (bank==null) {
+ throw new BiomajException("unknown.error","bad definition of bank object.");
+ }
+
+ if (bank.getStart() == null) {
+ throw new BiomajException("unknown.error","Start date is not defined.");
+ }
+
+ //L'info du status est trouve par la derniere tache status=ok ou ko
+ //updateBank.setAttribute("status", Boolean.toString(bank.getStatus()));
+ int nbSessions;
+
+ if (bank.getListOldSession() != null && bank.getListOldSession().size() > 0) {
+ nbSessions = bank.getListOldSession().size();
+ if (bank.getCurrentSession()!= null)
+ nbSessions++;
+
+ // If the last sessiontask was a remove process, retrieve the id of the corresponding
+ // updatebank to modify it.
+
+ String query = "SELECT idupdateBank FROM updateBank WHERE ref_idconfiguration=" + confId + " AND idlastSession IN (" +
+ "SELECT idsession FROM session WHERE startTime=(SELECT max(startTime) FROM session WHERE idsession IN" +
+ "(SELECT ref_idsession FROM session_has_sessionTask WHERE ref_idsessionTask IN (" +
+ "SELECT idsessionTask FROM sessionTask WHERE taskType='"+ BiomajConst.removeProcessTag + "'))) AND idsession IN (" +
+ "SELECT ref_idsession FROM session_has_sessionTask WHERE ref_idsessionTask IN (" +
+ "SELECT idsessionTask FROM sessionTask WHERE taskType='"+ BiomajConst.removeProcessTag + "')));";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ updateId = rs.getInt(1);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ }
+
+
+ if (updateId < 0) {
+ query = "INSERT INTO updateBank(ref_idconfiguration, productionDirectoryPath, productionDirectoryDeployed," +
+ "sizeDownload, sizeRelease, startTime, endTime, isUpdated, nbSessions, updateRelease, idLastSession) " +
+ "values(" + confId + ",'" + bank.getWorkflowInfoProductionDir() + "'," + bank.getWorkflowInfoIsDeployed() +
+ ",'" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "','" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "','" +
+ BiomajUtils.dateToString(bank.getStart(), Locale.US) + "','" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) +
+ "'," + bank.isUpdate() + "," + nbSessions;
+ if (bank.getWorkflowInfoRelease() != null) {
+ query += ",'" + bank.getWorkflowInfoRelease() + "'";
+ } else
+ query += ",null";
+
+ // Idlastsession
+ if (bank.getListOldSession() != null) {
+ if (bank.getCurrentSession()!= null)
+ query += "," + bank.getCurrentSession().getId() + ");";
+ else if (bank.getListOldSession().size() > 0)
+ query += "," + Long.toString(bank.getListOldSession().get(bank.getListOldSession().size()-1).getId()) + ");";
+ else
+ query += ",null);";
+ } else
+ query += ",null);";
+
+ Statement stat2 = connection.getStatement();
+ updateId = connection.executeUpdateAndGetGeneratedKey(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+ } else {
+ query = "UPDATE updateBank set " +
+ "ref_idconfiguration=" + confId + "," +
+ "productionDirectoryPath='" + bank.getWorkflowInfoProductionDir() + "'," +
+ "productionDirectoryDeployed=" + bank.getWorkflowInfoIsDeployed() + "," +
+ "sizeDownload='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "'," +
+ "sizeRelease='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "'," +
+ "startTime='" + BiomajUtils.dateToString(bank.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) + "'," +
+ "isUpdated=" + bank.isUpdate() + "," +
+ "nbSessions='" + nbSessions + "',";
+
+ if (bank.getWorkflowInfoRelease() != null) {
+ query += "updateRelease='" + bank.getWorkflowInfoRelease() + "',";
+ } else
+ query += "updateRelease=null,";
+
+ // Idlastsession
+ if (bank.getListOldSession() != null) {
+ if (bank.getCurrentSession()!= null)
+ query += "idLastSession=" + bank.getCurrentSession().getId();
+ else if (bank.getListOldSession().size() > 0)
+ query += "idLastSession=" + Long.toString(bank.getListOldSession().get(bank.getListOldSession().size() - 1).getId());
+ else
+ query += "idLastSession=null";
+ } else
+ query += "idLastSession=null";
+
+ query += " WHERE idupdateBank=" + updateId;
+
+ Statement stat2 = connection.getStatement();
+ connection.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+ }
+
+ for (Session s : bank.getListOldSession()) {
+ setSessionAttributes(s, updateId);
+ }
+
+ } else {
+ nbSessions = 1;
+
+ String query = "";
+
+ if (updateId < 0) {
+ query = "INSERT INTO updateBank(ref_idconfiguration, updateRelease, productionDirectoryPath, productionDirectoryDeployed," +
+ "sizeDownload, sizeRelease, startTime, endTime, isUpdated, nbSessions, idLastSession) " +
+ "values(" + confId + ",'" + bank.getWorkflowInfoRelease() + "','" + bank.getWorkflowInfoProductionDir() + "'," + bank.getWorkflowInfoIsDeployed() +
+ ",'" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "','" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "','" +
+ BiomajUtils.dateToString(bank.getStart(), Locale.US) + "','" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) +
+ "'," + bank.isUpdate() + "," + nbSessions;
+ // Idlastsession
+ if (bank.getListOldSession() != null) {
+ if (bank.getCurrentSession()!= null)
+ query += "," + bank.getCurrentSession().getId() + ");";
+ else if (bank.getListOldSession().size()>0)
+ query += "," + Long.toString(bank.getListOldSession().get(bank.getListOldSession().size() - 1).getId()) + ");";
+ } else
+ query += ",null);";
+
+ Statement stat = connection.getStatement();
+ updateId = connection.executeUpdateAndGetGeneratedKey(query, stat);
+
+ SQLConnectionFactory.closeConnection(stat);
+ } else {
+ query = "UPDATE updateBank set " +
+ "ref_idconfiguration=" + confId + "," +
+ "productionDirectoryPath='" + bank.getWorkflowInfoProductionDir() + "'," +
+ "productionDirectoryDeployed=" + bank.getWorkflowInfoIsDeployed() + "," +
+ "sizeDownload='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()) + "'," +
+ "sizeRelease='" + BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()) + "'," +
+ "startTime='" + BiomajUtils.dateToString(bank.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(bank.getEnd(), Locale.US) + "'," +
+ "isUpdated=" + bank.isUpdate() + "," +
+ "nbSessions='" + nbSessions + "',";
+
+ if (bank.getWorkflowInfoRelease() !=null) {
+ query += "updateRelease='" + bank.getWorkflowInfoRelease() + "',";
+ } else
+ query += "updateRelease=null,";
+
+ // Idlastsession
+ if (bank.getListOldSession() != null) {
+ if (bank.getCurrentSession()!= null)
+ query += "idLastSession=" + bank.getCurrentSession().getId();
+ else if (bank.getListOldSession().size() > 0)
+ query += "idLastSession=" + Long.toString(bank.getListOldSession().get(bank.getListOldSession().size() - 1).getId());
+ else
+ query += "idLastSession=null";
+ } else
+ query += "idLastSession=null";
+
+ query += " WHERE idupdateBank=" + updateId;
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ }
+
+ if (bank.getCurrentSession() != null) {
+ setSessionAttributes(bank.getCurrentSession(), updateId);
+ }
+
+ return updateId;
+
+ }
+
+ public synchronized static void updateStateSessionWithProductionDir(Bank xmlBank) throws BiomajException {
+
+ if (xmlBank==null)
+ return ;
+
+ if (xmlBank.getConfig() == null)
+ throw new NullPointerException("Config bank can't be null");
+
+ createContentProductionDirectories(xmlBank.getBankStateListProductionDirectories(), getBankId(xmlBank.getConfig().getName()));
+ }
+
+ public static synchronized long getBankId(String bankName) {
+
+
+ long bankId = BiomajSQLQuerier.getBankId(bankName);
+ if (bankId < 0) {
+ String query = "INSERT INTO bank(name) values('" + bankName + "');";
+ Statement stat = connection.getStatement();
+ bankId = connection.executeUpdateAndGetGeneratedKey(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ return bankId;
+ }
+
+ public synchronized static void reWriteWithProductionDir(String bankName,ProductionDirectory pd) throws BiomajException {
+
+ if (bankName==null)
+ return ;
+
+ long id = getBankId(bankName);
+ String query = "UPDATE productionDirectory SET remove='" + BiomajUtils.dateToString(pd.getRemoveDate(), Locale.US) + "'," +
+ "state='" + ProductionDirectory.REMOVE_STR + "' WHERE ref_idbank=" + id + " AND path='" + pd.getPath() + "'" +
+ " AND state='" + ProductionDirectory.AVAILABLE_STR + "';";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ public static synchronized void deleteBank(String bankName) {
+ BiomajSQLQuerier.deleteBank(bankName);
+ }
+
+
+ private synchronized static void setSessionAttributes(Session session, long updateId) {
+
+ String query = "SELECT * FROM session WHERE idsession = " + session.getId();
+ Statement stat = connection.getStatement();
+
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (!rs.next()) { // We create a new session
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "INSERT INTO session(idsession, ref_idupdateBank, parse, status, startTime, endTime, elapsedTime, logfile) " +
+ "values(" + session.getId() + "," + updateId + ",'xml'," + session.getStatus() + ",'" + BiomajUtils.dateToString(session.getStart(), Locale.US) +
+ "','" + BiomajUtils.dateToString(session.getEnd(), Locale.US) + "','";
+ if (session.getEnd() == null) // elapsed time
+ query += BiomajUtils.timeToString(new Date().getTime() - session.getStart().getTime()) +
+ "','" + session.getLogfile() + "');";
+ else
+ query += (session.getEnd().getTime() - session.getStart().getTime()) +
+ "','" + session.getLogfile() + "');";
+
+ } else { // We update an existing session
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "UPDATE session SET " +
+ "status=" + session.getStatus() + "," +
+ "startTime='" + BiomajUtils.dateToString(session.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(session.getEnd(), Locale.US) + "',";
+ if (session.getEnd() == null)
+ query += "elapsedTime='" + BiomajUtils.timeToString(new Date().getTime() - session.getStart().getTime()) + "',";
+ else
+ query += "elapsedTime='" + BiomajUtils.timeToString(session.getEnd().getTime() - session.getStart().getTime()) + "',";
+
+ query += "logfile='" + session.getLogfile() + "' WHERE idsession=" + session.getId();
+
+ // Deletion of the old messages
+// BiomajSQLQuerier.deleteSessionMessages(session.getId());
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ Statement stat2 = connection.getStatement();
+ connection.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+
+ /*
+ for (int i = Session.PREPROCESS;i<=Session.REMOVEPROCESS; i++) {
+ if (session.taskAreSaveInWorkflow(i)) {
+ GeneralWorkflowTask p = session.getWorkflowTask(i);
+ if (p!=null) {
+ setElementTaskWorkflow(p);
+ }
+ }
+ }*/
+
+ GeneralWorkflowTask p = session.getLastTask();
+ if (p != null)
+ setElementTaskWorkflow(p);
+
+
+ addMessages("warning",session.getNewWarn(),session.getId().toString(),"session");
+ addMessages("error",session.getNewErr(), session.getId().toString(), "session");
+
+ }
+
+ public static synchronized void deleteMetaprocesses() {
+ for (String s : metaIdToDelete) {
+ String query = "DELETE FROM metaprocess WHERE idmetaprocess='" + s + "'";
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ }
+
+ private static synchronized void setElementTaskWorkflow(GeneralWorkflowTask p) {
+ if (p == null)
+ return;
+
+ String query = "SELECT idsessionTask from sessionTask WHERE taskType='" + p.getProcessName() + "' AND " +
+ "idsessionTask IN (SELECT ref_idsessionTask FROM session_has_sessionTask WHERE " +
+ "ref_idsession=" + p.getSession().getId() + ");";
+ Statement stat = connection.getStatement();
+
+ long taskId = -1;
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ // S'il y a deja une tache
+ if (rs.next()) {
+ taskId = rs.getLong(1);
+
+ query = "UPDATE sessionTask SET " +
+ "startTime='" + BiomajUtils.dateToString(p.getStart(), Locale.US) + "'," +
+ "endTime='" + BiomajUtils.dateToString(p.getEnd(), Locale.US) + "'," +
+ "elapsedTime='" + BiomajUtils.timeToString(p.getElapsedTime()) + "'," +
+ "status='" + p.getStatusStr() + "' " +
+ "WHERE idsessionTask=" + taskId;
+
+ Statement stat2 = connection.getStatement();
+ connection.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+// BiomajSQLQuerier.deleteTaskMessages(taskId);
+// BiomajSQLQuerier.deleteTaskFiles(taskId);
+
+ } else {
+ query = "INSERT INTO sessionTask(startTime, endTime, elapsedTime, status) " +
+ "VALUES ('" + BiomajUtils.dateToString(p.getStart(), Locale.US) + "','" + BiomajUtils.dateToString(p.getEnd(), Locale.US) +
+ "','" + BiomajUtils.timeToString(p.getElapsedTime()) + "','" + p.getStatusStr() + "');";
+
+ Statement stat2 = connection.getStatement();
+ taskId = connection.executeUpdateAndGetGeneratedKey(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+ query = "INSERT INTO session_has_sessionTask(ref_idsession, ref_idsessionTask) values(" + p.getSession().getId() + "," + taskId + ");";
+
+ Statement stat3 = connection.getStatement();
+ connection.executeUpdate(query, stat3);
+ SQLConnectionFactory.closeConnection(stat3);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ p.setTaskId((int) taskId);
+ p.fillElement(taskId);
+
+ addMessages("warning",p.getNewWarn(), String.valueOf(taskId), "task");
+ addMessages("error",p.getNewErr(), String.valueOf(taskId), "task");
+
+// return d;
+ }
+
+ private static void addMessages(String tag,Vector<String> messages, String ownerId, String ownerType){
+ for (String mess : messages) {
+
+ String queryInsert = "INSERT INTO message(message, type) values('" + mess.replaceAll("'", "''") + "', '" + tag + "');";
+ Statement stat = connection.getStatement();
+ long messageId = connection.executeUpdateAndGetGeneratedKey(queryInsert, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ String finalQuery = "";
+
+ if (ownerType.equals("task"))
+ finalQuery = "INSERT INTO sessionTask_has_message(ref_idsessionTask, ref_idmessage) " +
+ "VALUES(" + ownerId + "," + messageId + ");";
+ else if (ownerType.equals("metaprocess"))
+ finalQuery = "INSERT INTO metaprocess_has_message(ref_idmetaprocess, ref_idmessage) " +
+ "VALUES('" + ownerId + "'," + messageId + ");";
+ else if (ownerType.equals("process"))
+ finalQuery = "INSERT INTO process_has_message(ref_idprocess, ref_idmessage) " +
+ "VALUES(" + ownerId + "," + messageId + ");";
+ else if (ownerType.equals("session"))
+ finalQuery = "INSERT INTO session_has_message(ref_idsession, ref_idmessage) " +
+ "VALUES(" + ownerId + "," + messageId + ");";
+
+ stat = connection.getStatement();
+ connection.executeUpdate(finalQuery, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ }
+
+
+ /*================================== PROCESS ==================================*/
+
+
+ private static void addDepsFile(Vector<FileDesc> dependsFiles, long idProcess) {
+
+ for (FileDesc nFile : dependsFiles) {
+
+ String query = "";
+// String query = "SELECT idfile FROM file WHERE location='" + nFile.getLocation() + "' AND " +
+// "ref_idprocess=" + idProcess;
+// connection.executeQuery(query, true);
+ if (nFile.getFileId() >= 0) {
+ // A file is not likely to be modified once it has been created.
+
+ /*
+ query = "UPDATE file SET " +
+ "size='" + nFile.getSize() + "'," +
+ "time='" + nFile.getTime() + "'," +
+ "is_extract=" + nFile.isExtract() + "," +
+ "volatile=" + nFile.isVolatil() + ",";
+ if (nFile.getRefHash() == null)
+ query += "refHash=null ";
+ else
+ query += "refHash='" + nFile.getRefHash() + "' ";
+ query += "WHERE idfile=" + nFile.getFileId();
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ stat.close();
+ Connection cnt = stat.getConnection();
+ stat.close();
+ cnt.close();
+ connection.closeStatement();*/
+ } else {
+ query = "INSERT INTO file(location, size, time, link, is_extract, volatile, refHash, ref_idprocess)" +
+ "values('" + nFile.getLocation() + "','" + nFile.getSize() + "','" + nFile.getTime() +
+ "'," + nFile.isLink() + "," + nFile.isExtract() + "," + nFile.isVolatil() +
+ ",";
+ if (nFile.getRefHash() == null)
+ query += "null,";
+ else
+ query += "'" + nFile.getRefHash() + "',";
+ query += idProcess + ");";
+ Statement stat = connection.getStatement();
+ nFile.setFileId(connection.executeUpdateAndGetGeneratedKey(query, stat));
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ }
+ }
+
+ private static void createProcess(BiomajProcess process, String metaId) {
+ long processId = process.getProcessId();
+
+ String query = "";
+// String query = "SELECT idprocess FROM process WHERE " +
+// "name='" + process.getNameProcess() + "' AND " +
+// "keyname='" + process.getKeyName() + "' AND " +
+// "exe='" + process.getExe() + "' AND " +
+// "args='" + process.getArgs().replaceAll("'", "''") + "' AND " +
+// "ref_idmetaprocess='" + metaId + "';";
+// connection.executeQuery(query, true);
+
+ if (processId >= 0) {
+
+ query = "UPDATE process SET " +
+ "name='" + process.getNameProcess() + "'," +
+ "keyname='" + process.getKeyName() + "'," +
+ "exe='" + process.getExe() + "'," +
+ "args='" + process.getArgs().replaceAll("'", "''") + "'," +
+ "description='" + process.getDescription() + "'," +
+ "type='" + process.getType() + "'," +
+ "startTime='" + BiomajUtils.dateToString(process.getStart(), Locale.US) + "',";
+
+ if (process.getEnd() != null)
+ query += "endTime='" + BiomajUtils.dateToString(process.getEnd(), Locale.US) + "'," +
+ "elapsedTime='" + BiomajUtils.timeToString(process.getEnd().getTime() - process.getStart().getTime()) + "'," +
+ "value='" + process.getReturnValue() + "',";
+ else
+ query += "endTime='" + BiomajUtils.dateToString(new Date(), Locale.US) + "'," +
+ "elapsedTime='" + BiomajUtils.timeToString(new Date().getTime() - process.getStart().getTime()) + "'," +
+ "value='-1',";
+
+
+ query += "biomaj_error=" + process.isErrorDetected() + "," +
+ "timestamp='" + process.getTimeStampExe() + "'," +
+ "ref_idmetaprocess='" + metaId + "' " +
+ "WHERE idprocess=" + processId;
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ // Deletion of the old process related messages if there are new messages
+ if (process.getWarn().size() > 0 || process.getErr().size() > 0) {
+ BiomajSQLQuerier.deleteProcessMessages(processId);
+ }
+
+ } else {
+
+ query = "INSERT INTO process(name, keyname, exe, args, description, type, startTime, endTime, elapsedTime, value, biomaj_error," +
+ "timestamp, ref_idmetaprocess) values('" + process.getNameProcess() + "','" + process.getKeyName() + "','" + process.getExe() + "','" +
+ process.getArgs().replaceAll("'", "''") + "','" + process.getDescription().replaceAll("'", "''") + "','" + process.getType() + "','" +
+ BiomajUtils.dateToString(process.getStart(), Locale.US) + "','";
+
+ if (process.getEnd() != null)
+ query += BiomajUtils.dateToString(process.getEnd(), Locale.US) + "','" + BiomajUtils.timeToString(process.getEnd().getTime() - process.getStart().getTime()) +
+ "','" + process.getReturnValue();
+ else
+ query += BiomajUtils.dateToString(new Date(), Locale.US) + "','" + BiomajUtils.timeToString(new Date().getTime() - process.getStart().getTime()) +
+ "','-1";
+
+ query += "'," + process.isErrorDetected() + ",'" + process.getTimeStampExe() + "','" + metaId + "');";
+
+ Statement stat = connection.getStatement();
+ processId = connection.executeUpdateAndGetGeneratedKey(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+
+ process.setProcessId(processId);
+ }
+
+ addDepsFile(process.getDependancesOutput(), processId);
+ addMessages("warning",process.getWarn(), String.valueOf(processId), "process");
+ addMessages("error",process.getErr(), String.valueOf(processId), "process");
+
+ }
+
+ public static synchronized void createMetaprocess(String bankName, Session session, MetaProcess metaProcess) throws BiomajException {
+
+ String metaId = session.getId() + "." + metaProcess.getName();
+
+ /* */
+
+ String query = "SELECT * FROM metaprocess WHERE idmetaprocess='" + metaId + "';";
+ Statement stat = connection.getStatement();
+
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (!rs.next()) {
+ query = "INSERT INTO metaprocess(idmetaprocess,ref_idsessionTask,name,startTime,endTime,elapsedTime,status,logfile,block) " +
+ "values ('" + metaId + "'," + session.getLastTask().getTaskId() + ",'" + metaProcess.getName() + "','" + BiomajUtils.dateToString(metaProcess.getStart(), Locale.US) +
+ "','" + BiomajUtils.dateToString(metaProcess.getEnd(), Locale.US) + "','" + BiomajUtils.timeToString(metaProcess.getEnd().getTime() - metaProcess.getStart().getTime()) +
+ "','" + metaProcess.getStatusStr() + "','" + metaProcess.getLogFile() + "','" + metaProcess.getBlock() + "');";
+
+ Statement stat2 = connection.getStatement();
+
+ connection.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+ addMetaId(metaId);
+ } else {
+ query = "UPDATE metaprocess set name='" + metaProcess.getName() + "', startTime='" + BiomajUtils.dateToString(metaProcess.getStart(), Locale.US) +
+ "',endTime='" + BiomajUtils.dateToString(metaProcess.getEnd(), Locale.US) + "', elapsedTime='" +
+ BiomajUtils.timeToString(metaProcess.getEnd().getTime() - metaProcess.getStart().getTime()) + "',status='" + metaProcess.getStatusStr() + "',logfile='" +
+ metaProcess.getLogFile() + "',block='" + metaProcess.getBlock() + "' WHERE idmetaprocess='" + metaId + "';";
+
+// Statement stat = connection.getStatement();
+ if (connection.executeUpdate(query, stat) >= 0) {
+ metaIdToDelete.remove(metaId);
+ }
+ }
+ } catch (SQLException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+
+ /* */
+
+ for (BiomajProcess p : metaProcess.getListProcess())
+ createProcess(p, metaId);
+
+ addMessages("warning",metaProcess.getWarn(), metaId, "metaprocess");
+ addMessages("error",metaProcess.getErr(), metaId, "metaprocess");
+
+ }
+
+ /**
+ *
+ * @param config
+ * @param idBank
+ */
+ public static synchronized boolean createContentConfig(Configuration config, long idBank) {
+ /*
+ * A configuration consists in remoteinfo + localinfo.
+ * Before adding a new config we check that we dont already
+ * have a pair remote+local with same info.
+ * If either localinfo or remoteinfo is different, we create
+ * a new record for both. Thus, each pair should be referenced
+ * by only one config record (i.e. local or remote cant be shared
+ * by several configs). This was done to simplify modification
+ * and deletion issues.
+ *
+ */
+
+ boolean newConfig = false;
+
+ String queryRemote = "SELECT max(idremoteInfo) FROM remoteInfo WHERE " +
+ "protocol='" + config.getProtocol() + "' AND ";
+ if (config.getPort().isEmpty())
+ queryRemote += "port=NULL AND ";
+ else
+ queryRemote += "port=" + config.getPort() + " AND ";
+
+ queryRemote += "dbName='" + config.getName().replaceAll("'", "''") + "' AND " +
+ "dbFullname='" + config.getFullName().replaceAll("'", "''") + "' AND " +
+ "dbType='" + config.getTypeBank() + "' AND " +
+ "server='" + config.getUrl() + "' AND " +
+ "remoteDir='" + config.getRemoteDirectory() + "'";
+
+ String queryLocal = "SELECT max(idlocalInfo) FROM localInfo WHERE " +
+ "offlineDirectory='" + config.getOfflineDirectory() + "' AND " +
+ "versionDirectory='" + config.getVersionDirectory() + "' AND " +
+ "frequency=" + config.getFrequencyUpdate() + " AND " +
+ "dolinkcopy=" + config.getDoLinkCopy() + " AND " +
+ "logfile=" + config.getLogFiles() + " AND " +
+ "releaseFile='" + config.getReleaseFile() + "' AND " +
+ "releaseRegexp='" + config.getReleaseRegExp() + "' AND " +
+ "remoteFiles='" + config.getRemoteFilesRegexp() + "' AND " +
+ "localFiles='" + config.getLocalFilesRegexp() + "' AND " +
+ "nversions=" + config.getNbVersionManagement();
+
+ String queryConfig = "SELECT idconfiguration FROM configuration WHERE ref_idremoteInfo =(" + queryRemote + ") AND " +
+ "ref_idlocalInfo =(" + queryLocal + ");";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(queryConfig, stat);
+ if (rs.next()) {
+ newConfig = false;
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ else {
+ SQLConnectionFactory.closeConnection(stat);
+ queryRemote = "INSERT INTO remoteInfo(protocol, port, dbName, dbFullname, dbType, server, remoteDir) " +
+ "values('" + config.getProtocol() + "'," + config.getPort() + ",'" + config.getName().replaceAll("'", "''") + "','" +
+ config.getFullName().replaceAll("'", "''") + "','" + config.getTypeBank() + "','" + config.getUrl() + "','" +
+ config.getRemoteDirectory() + "');";
+ Statement stat2 = connection.getStatement();
+ long remoteId = connection.executeUpdateAndGetGeneratedKey(queryRemote, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+ queryLocal = "INSERT INTO localInfo(offlineDirectory, versionDirectory, frequency, dolinkcopy, logfile," +
+ "releaseFile, releaseRegexp, remoteFiles, remoteExcludedFiles, localFiles, nversions) " +
+ "values('" + config.getOfflineDirectory() + "','" + config.getVersionDirectory() + "','" +
+ config.getFrequencyUpdate() + "'," + config.getDoLinkCopy() + "," + config.getLogFiles() + ",'" +
+ config.getReleaseFile() + "','" + config.getReleaseRegExp() + "','" + config.getRemoteFilesRegexp() + "','" +
+ config.getRemoteExcludedFiles() + "','" + config.getLocalFilesRegexp() + "','" + config.getNbVersionManagement() + "');";
+ stat2 = connection.getStatement();
+ long localId = connection.executeUpdateAndGetGeneratedKey(queryLocal, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+
+ String query = "INSERT INTO configuration(idconfiguration, date, file, ref_idbank, ref_idremoteInfo, ref_idlocalInfo)" +
+ "values(" + config.getId() + ",'" + BiomajUtils.toUSDate(config.getDate()) + "','" + config.getPropertyFile() +
+ "'," + idBank + "," + remoteId + "," + localId + ");";
+
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ newConfig = true;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return newConfig;
+ }
+
+ private static void createContentProductionDirectories(Vector<ProductionDirectory> listDir, long idBank) {
+ for (ProductionDirectory pd : listDir) {
+
+ String query = "SELECT idproductionDirectory FROM productionDirectory WHERE path='" + pd.getPath() + "'" +
+ " AND session=" + pd.getSession() + ";";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ int id = rs.getInt(1);
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "UPDATE productionDirectory SET " +
+ "remove=" + (pd.getRemoveDate() == null ? "null," : "'" + BiomajUtils.dateToString(pd.getRemoveDate(), Locale.US) + "',") +
+ "creation='" + BiomajUtils.dateToString(pd.getCreationDate(), Locale.US) + "'," +
+ "size='" + BiomajUtils.sizeToString(pd.getSize()) + "'," +
+ "state='" + pd.getStateStr() + "'," +
+ "session='" + pd.getSession() + "'," +
+ "path='" + pd.getPath() + "'," +
+ "ref_idbank=" + idBank + " WHERE idproductionDirectory=" + id;
+
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ } else {
+ SQLConnectionFactory.closeConnection(stat);
+ query = "INSERT INTO productionDirectory(remove, creation, size, state, session, path, ref_idbank)" +
+ "values (" + (pd.getRemoveDate() == null ? "null" : "'" + BiomajUtils.dateToString(pd.getRemoveDate(), Locale.US) + "'") +
+ ",'" + BiomajUtils.dateToString(pd.getCreationDate(), Locale.US) + "','" + BiomajUtils.sizeToString(pd.getSize()) + "','" +
+ pd.getStateStr() + "','" + pd.getSession() + "','" + pd.getPath() + "'," + idBank + ");";
+
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Id of metaprocess that may need to be deleted
+ * in case of rebuild with no rerun of metaprocess.
+ *
+ * @param id
+ */
+ public static synchronized void addMetaId(String id) {
+ metaIdToDelete.add(id);
+ }
+
+ private static boolean wellFormed(Bank xmlBank) {
+ if (xmlBank==null)
+ return false;
+
+ if (xmlBank.getConfig() == null)
+ throw new NullPointerException("Config bank can't be null");
+
+ return true;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/SimpleLoggerHistoric.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/SimpleLoggerHistoric.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/SimpleLoggerHistoric.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,407 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.logger;
+
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Enumeration;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * <p>This class implements a SubBuildListener of Ant
+ * to write log bank according to the level define by the user.
+ * This listener is attached to the mirror.xml and handle_process.xml files.</p>
+ * @author ofilangi
+ *
+ */
+public class SimpleLoggerHistoric implements BuildLogger {
+
+ /** Constance state of workflow ERROR_WF */
+ public static final String START = "START";
+ /** Constance state of workflow OK_WF */
+ public static final String END = "END";
+ /** log directory */
+ /**
+ * Property format Output logfile
+ * @uml.property name="patternLayout"
+ */
+ private String patternLayout ;
+ /**
+ * Property level info
+ * @uml.property name="level"
+ */
+ private String level ;
+ /**
+ * Target mask
+ * @uml.property name="targetMask"
+ */
+ private boolean targetMask;
+ /**
+ * Task mask
+ * @uml.property name="taskMask"
+ */
+ private boolean taskMask;
+
+
+ /**
+ * @uml.property name="propertiesMask"
+ */
+ private boolean propertiesMask;
+
+ /**
+ * @uml.property name="file"
+ */
+ private String file;
+
+ /**
+ * @uml.property name="logBuffWriter"
+ */
+ private BufferedWriter logBuffWriter ;
+
+ /**
+ * @uml.property name="nameFile"
+ */
+ private String nameFile = "";
+
+ /**
+ * @uml.property name="nameDirectory"
+ */
+ private String nameDirectory = "";
+
+ /**
+ * @uml.property name="isInit"
+ */
+ private boolean isInit = false ;
+
+ /** Constructeur */
+ public SimpleLoggerHistoric(String nameFile) {
+ this.nameFile = nameFile ;
+ }
+
+
+ public void init(Project p) throws BiomajException {
+ setLevel(p.getProperty(BiomajConst.levelMaskProperty));
+ setTaskMask(p.getProperty(BiomajConst.taskMaskProperty));
+ setTargetMask(p.getProperty(BiomajConst.targetMaskProperty));
+ setPropertiesMask(p.getProperty(BiomajConst.propertiesMaskProperty));
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+ String session = sdf.format(new Date());
+
+ String dbName = p.getProperty(BiomajConst.dbNameProperty);
+
+ try {
+ if (nameDirectory.trim().compareTo("")==0)
+ nameDirectory = dbName+"/"+session;
+
+
+ String dir = BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR)+"/"+nameDirectory+"/" ;
+
+
+ file = dir + this.nameFile;
+ BiomajUtils.createSubDirectories(BiomajUtils.getRelativeDirectory(file));
+
+ logBuffWriter = new BufferedWriter (new FileWriter(file));
+ isInit = true;
+
+ if (propertiesMask) {
+ Enumeration<?> e = p.getProperties().keys();
+ while (e.hasMoreElements()) {
+ String key = (String)e.nextElement();
+ write("**** "+key+" : "+p.getProperty(key));
+ }
+ }
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ throw new BiomajBuildException(p,"io.error",ioe.getMessage(),ioe);
+ }
+ }
+
+ public void close() throws IOException {
+ if (logBuffWriter != null)
+ logBuffWriter.close();
+ }
+
+ public String getNameFile() {
+ return file;
+ }
+
+ protected static final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
+
+ public static String prefixMessage () {
+ String prec = "["+sdf.format(new Date())+"]";
+ prec+="["+Runtime.getRuntime().freeMemory()+"/"+Runtime.getRuntime().maxMemory()+"]";
+
+ return prec ;
+ }
+
+ public void write(String message) {
+
+ }
+
+ /**
+ * Write message logged
+ * @param bankName
+ * @param target
+ * @param message
+ */
+ public void write(BuildEvent arg0) {
+
+ final int head = 30;
+
+ if (arg0 == null)
+ return;
+
+ if ((level!=null)&&(level.trim().compareTo("")!=0)&&(arg0.getPriority()>getTypeLevel(level)))
+ return;
+
+
+ String prec=prefixMessage();
+
+ prec+="["+arg0.getPriority()+"]";
+
+ if ((arg0.getTarget()==null)||(arg0.getTask()==null))
+ prec+="["+arg0.getProject().getName()+"]";
+
+ if (targetMask&&(arg0.getTarget()!=null))
+ prec+="["+arg0.getTarget().getName()+"]";
+
+
+ if (taskMask&&(arg0.getTask()!=null))
+ prec+="["+arg0.getTask().getTaskName()+"]";
+
+ prec = prec.toUpperCase();
+ while (prec.length()<head)
+ prec += " ";
+
+ if (arg0.getMessage()!=null)
+ prec+=arg0.getMessage();
+
+ try {
+ logBuffWriter.write(prec);
+ logBuffWriter.newLine();
+ logBuffWriter.flush();
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(prec);
+ BiomajLogger.getInstance().log(ioe);
+ }
+ }
+
+ /**
+ * @return the level
+ * @uml.property name="level"
+ */
+ public String getLevel() {
+ return level;
+ }
+
+ /**
+ * @param level the level to set
+ * @uml.property name="level"
+ */
+ public void setLevel(String level) {
+ this.level = level;
+ }
+
+ /**
+ * @return the patternLayout
+ * @uml.property name="patternLayout"
+ */
+ public String getPatternLayout() {
+ return patternLayout;
+ }
+
+ /**
+ * @param patternLayout the patternLayout to set
+ * @uml.property name="patternLayout"
+ */
+ public void setPatternLayout(String patternLayout) {
+ this.patternLayout = patternLayout;
+ }
+
+ public void setTargetMask(String value) {
+ if (value!=null) {
+ if (value.compareTo("true")==0||value.compareTo("ok")==0)
+ targetMask = true;
+ } else
+ targetMask = false;
+ }
+
+ public void setTaskMask(String value) {
+ if (value!=null) {
+ if (value.compareTo("true")==0||value.compareTo("ok")==0)
+ taskMask = true;
+ } else
+ taskMask = false;
+ }
+
+ public void setPropertiesMask(String value) {
+ if (value!=null) {
+ if (value.compareTo("true")==0||value.compareTo("ok")==0)
+ propertiesMask = true;
+ } else
+ propertiesMask = false;
+ }
+
+ public int getTypeLevel(String level) {
+
+ if (this.level.equals("VERBOSE"))
+ return Project.MSG_VERBOSE;
+ else if (this.level.equals("INFO"))
+ return Project.MSG_INFO;
+ else if (this.level.equals("ERR"))
+ return Project.MSG_ERR;
+ else if (this.level.equals("DEBUG"))
+ return Project.MSG_DEBUG;
+ else if (this.level.equals("WARN"))
+ return Project.MSG_WARN;
+
+ return Project.MSG_DEBUG;
+ }
+
+ public static String getStringPriority(int priority) {
+ switch (priority) {
+ case Project.MSG_DEBUG : return "DEBUG";
+ case Project.MSG_ERR : return "ERR";
+ case Project.MSG_INFO : return "INFO";
+ case Project.MSG_VERBOSE : return "VERBOSE";
+ case Project.MSG_WARN : return "WARN";
+ default : return Integer.toString(priority);
+ }
+
+ }
+
+ public void setEmacsMode(boolean arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setErrorPrintStream(PrintStream arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setMessageOutputLevel(int arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOutputPrintStream(PrintStream arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void buildFinished(BuildEvent arg0) {
+ try {
+ logBuffWriter.close();
+ } catch (IOException ioe) {
+
+ }
+ }
+
+ public void buildStarted(BuildEvent arg0) {
+ }
+
+ public void messageLogged(BuildEvent arg0) {
+ if (arg0 == null)
+ return ;
+ try {
+ if (!isInit)
+ init(arg0.getProject());
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(arg0.getProject(),be);
+ }
+ write(arg0);
+
+ }
+
+ public void targetFinished(BuildEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void targetStarted(BuildEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void taskFinished(BuildEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void taskStarted(BuildEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ /**
+ * @return the nameDirectory
+ * @uml.property name="nameDirectory"
+ */
+ public String getNameDirectory() {
+ return nameDirectory;
+ }
+
+
+ /**
+ * @param nameDirectory the nameDirectory to set
+ * @uml.property name="nameDirectory"
+ */
+ public void setNameDirectory(String nameDirectory) {
+ this.nameDirectory = nameDirectory;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/org.inria.biomaj.ant.logger.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/org.inria.biomaj.ant.logger.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/org.inria.biomaj.ant.logger.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.ant.logger" metadata="uml2-1.0" initialized="true" scrolledX="91" scrolledY="54" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajMirrorListenerHandler" location="905,355" size="281,93" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler" runTimeClassModel="startPostProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;Ljava.lang.String;),BiomajMirrorListenerHandler(),subBuildFinished(Lorg.apache.tools.ant.BuildEvent;),targetFinished(Lorg.apache.tools.ant.BuildEvent;),finishedPostProcess(Lorg.apache.tools.ant.Project;),finishedPreProcess(Lorg.apache.tools.ant.Project;),taskFinished(Lorg.apache.tools.ant.BuildEvent;),buildStarted(Lorg.apache.tools.ant.BuildEvent;),mirrorContext(Lorg.apache.tools.ant.BuildEvent;),messageLogged(Lorg.apache.tools.ant.BuildEvent;),subBuildStarted(Lorg.apache.tools.ant.BuildEvent;),bankLogger,startPreProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;),buildFinished(Lorg.apache.tools.ant.BuildEvent;),taskStarted(Lorg.apache.tools.ant.BuildEvent;),targetStarted(Lorg.apache.tools.ant.BuildEvent;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="158,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="bankLogger" id="org.inria.biomaj.ant.logger/XmlBankLogger at bankLogger+org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler@|org.inria.biomaj.ant.logger/XmlBankLogger#bankLogger"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="383,285"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler->org.inria.biomaj.ant.logger/XmlBankLogger" source="//@children.0" target="//@children.3" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="132,93" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="137,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/SubBuildListener<-org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler" source="//@children.0" target="//@children.7" targetEnd="//@children.0/@sourceConnections.1/@children.1" sourceEnd="//@children.0/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="177,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="102,139"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="XmlProcessLogger" location="1220,570" size="291,142" id="org.inria.biomaj.ant.logger/XmlProcessLogger" runTimeClassModel="errorMessage(Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),metaProcess,endPreProcess(Lorg.apache.tools.ant.BuildEvent;),writeProcessFile(),addPreProcess(Lorg.apache.tools.ant.BuildEvent;),current,addVolatileDependanceFiles(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),setErrorOnCurrentProcess(),endMetaProcessProcess(Lorg.apache.tools.ant.BuildEvent;),endPostProcess(Lorg.apache.tools.ant.BuildEvent;),addDependance(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;Z),addDependanceFiles(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;),bank,addPostProcess(Lorg.apache.tools.ant.BuildEvent;),getFilesOnSystem(Ljava.lang.String;Z),XmlProcessLogger(Lorg.inria.biomaj.session.bank.Bank;),warnMessage(Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),getMetaProcess()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="149,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="bank" id="org.inria.biomaj.session.bank/Bank at bank+org.inria.biomaj.ant.logger/XmlProcessLogger@|org.inria.biomaj.session.bank/Bank#bank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="current" id="org.inria.biomaj.session.process/BiomajProcess at current+org.inria.biomaj.ant.logger/XmlProcessLogger@|org.inria.biomaj.session.process/BiomajProcess#current"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="metaProcess" id="org.inria.biomaj.session.process/MetaProcess at metaProcess+org.inria.biomaj.ant.logger/XmlProcessLogger@|org.inria.biomaj.session.process/MetaProcess#metaProcess"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="573,304"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.ant.logger/XmlProcessLogger->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.1" target="//@children.6" targetEnd="//@children.1/@sourceConnections.0/@children.2" label="//@children.1/@sourceConnections.0/@children.0" sourceEnd="//@children.1/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="55,142" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="155,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="SimpleLoggerHistoric" location="110,500" size="181,321" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric" runTimeClassModel="level,setOutputPrintStream(Ljava.io.PrintStream;),targetMask,nameFile,file,isInit,close(),setEmacsMode(Z),nameDirectory,taskFinished(Lorg.apache.tools.ant.BuildEvent;),setNameDirectory(Ljava.lang.String;),getNameFile(),messageLogged(Lorg.apache.tools.ant.BuildEvent;),patternLayout,prefixMessage(),getPatternLayout(),taskStarted(Lorg.apache.tools.ant.BuildEvent;),SimpleLoggerHistoric(Ljava.lang.String;),write(Lorg.apache.tools.ant.BuildEvent;),setErrorPrintStream(Ljava.io.PrintStream;),setTargetMask(Ljava.lang.String;),init(Lorg.apache.tools.ant.Project;),setPropertiesMask(Ljava.lang.String;),setLevel(Ljava.lang.String;),propertiesMask,write(Ljava.lang.String;),targetFinished(Lorg.apache.tools.ant.BuildEvent;),eND,getTypeLevel(Ljava.lang.String;),getLevel(),logBuffWriter,getStringPriority(I),setPatternLayout(Ljava.lang.String;),getNameDirectory(),buildStarted(Lorg.apache.tools.ant.BuildEvent;),setMessageOutputLevel(I),sdf,sTART,setTaskMask(Ljava.lang.String;),taskMask,buildFinished(Lorg.apache.tools.ant.BuildEvent;),targetStarted(Lorg.apache.tools.ant.BuildEvent;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="157,247">
+ <children xsi:type="editmodel:AttributeEditModel" name="eND" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#eND"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="file" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#file"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="isInit" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#isInit"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="level" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#level"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="logBuffWriter" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#logBuffWriter"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nameDirectory" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#nameDirectory"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nameFile" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#nameFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="patternLayout" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#patternLayout"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="propertiesMask" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#propertiesMask"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sTART" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#sTART"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sdf" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#sdf"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="targetMask" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#targetMask"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="taskMask" id="org.inria.biomaj.ant.logger/SimpleLoggerHistoric#taskMask"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="231,551"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/BuildLogger<-org.inria.biomaj.ant.logger/SimpleLoggerHistoric" source="//@children.2" target="//@children.5/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="90,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0" name="XmlBankLogger" location="900,570" size="271,131" id="org.inria.biomaj.ant.logger/XmlBankLogger" runTimeClassModel="errorMessage(Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),mirrorStartedCheckTarget(Lorg.apache.tools.ant.BuildEvent;),restoreDatabase(),actionDeployement(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedMoveTarget(Lorg.apache.tools.ant.BuildEvent;),allWorkflowTaskIsComplete(Lorg.inria.biomaj.session.bank.Bank;),mirrorFinishedFileCheckTask(Lorg.apache.tools.ant.BuildEvent;),handleOfflineStartPostProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;Ljava.lang.String;),addDownloadFile(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),mirrorFinishedCheckTarget(Lorg.apache.tools.ant.BuildEvent;),beginSession(Lorg.apache.tools.ant.BuildEvent;),mirrorFinishedExtractTarget(Lorg.apache.tools.ant.BuildEvent;),addExtractedFile(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),handleOfflineEndPostProcess(Lorg.apache.tools.ant.Project;),warnMessage(Ljava.lang.String;Lorg.apache.tools.ant.BuildEvent;),workflowControlStarted(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedDeploymentTarget(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedExtractTarget(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedFileCheckTask(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedGetReleaseTask(Lorg.apache.tools.ant.BuildEvent;),handleOfflineEndPreProcess(Lorg.apache.tools.ant.Project;),workflowControlFinished(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedCopyTarget(Lorg.apache.tools.ant.BuildEvent;),treatmentWhenFail(Lorg.apache.tools.ant.BuildEvent;),handleOfflineStartPreProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;),listPreProcess,mirrorStartedDownloadTarget(Lorg.apache.tools.ant.BuildEvent;),versionsmanagementFinishedTask(Lorg.apache.tools.ant.BuildEvent;),bank,taskIsComplete(Ljava.util.Vector;I),mirrorFinishedDownloadTarget(Lorg.apache.tools.ant.BuildEvent;),addLocalOfflineFile(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),mirrorFinishedDeploymentTarget(Lorg.apache.tools.ant.BuildEvent;),addLocalOnlineFile(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),endSession(Lorg.apache.tools.ant.BuildEvent;),initContext(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),mirrorFinishedMoveTarget(Lorg.apache.tools.ant.BuildEvent;),mirrorFinnished(Lorg.apache.tools.ant.BuildEvent;),mirrorFinishedCopyTarget(Lorg.apache.tools.ant.BuildEvent;),mirrorFinishedGetReleaseTask(Lorg.apache.tools.ant.BuildEvent;),mirrorStartedPostProcessTarget(Lorg.apache.tools.ant.BuildEvent;),getProperty(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;),generalXml">
+ <children xsi:type="editmodel:CompartmentEditModel" size="176,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="bank" id="org.inria.biomaj.ant.logger/XmlBankLogger#bank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listPreProcess" id="org.inria.biomaj.ant.logger/XmlBankLogger#listPreProcess"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="423,760"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.ant.logger/XmlBankLogger->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.3" target="//@children.6" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="245,131" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="25,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajProcessListenerHandler" location="1210,360" size="261,112" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler" runTimeClassModel="pl,subBuildFinished(Lorg.apache.tools.ant.BuildEvent;),setErrorOnCurrentProcess(),BiomajProcessListenerHandler(Lorg.inria.biomaj.session.bank.Bank;),targetFinished(Lorg.apache.tools.ant.BuildEvent;),handleProcessContext(Lorg.apache.tools.ant.BuildEvent;),taskFinished(Lorg.apache.tools.ant.BuildEvent;),setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;),buildStarted(Lorg.apache.tools.ant.BuildEvent;),bank,messageLogged(Lorg.apache.tools.ant.BuildEvent;),subBuildStarted(Lorg.apache.tools.ant.BuildEvent;),throwException(Lorg.apache.tools.ant.BuildEvent;Lorg.inria.biomaj.utils.BiomajException;),getMetaProcess(),buildFinished(Lorg.apache.tools.ant.BuildEvent;),taskStarted(Lorg.apache.tools.ant.BuildEvent;),targetStarted(Lorg.apache.tools.ant.BuildEvent;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="123,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="bank" id="org.inria.biomaj.session.bank/Bank at bank+org.inria.biomaj.ant.logger/BiomajProcessListenerHandler@|org.inria.biomaj.session.bank/Bank#bank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="pl" id="org.inria.biomaj.ant.logger/XmlProcessLogger at pl+org.inria.biomaj.ant.logger/BiomajProcessListenerHandler@|org.inria.biomaj.ant.logger/XmlProcessLogger#pl"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="299,285"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/SubBuildListener<-org.inria.biomaj.ant.logger/BiomajProcessListenerHandler" source="//@children.4" target="//@children.7" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="33,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="263,139"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajConsoleLogger" location="450,480" size="250,455" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger" runTimeClassModel="sdoc,level,setOutputPrintStream(Ljava.io.PrintStream;),nOT_KEEP_LINE_ON_CONSOLE,sYNC_DEP,addTextPane(Ljava.lang.String;Ljava.lang.Thread;I),sIZE_W,position,sYNC,windowIconified(Ljava.awt.event.WindowEvent;),jtp,setEmacsMode(Z),windowActivated(Ljava.awt.event.WindowEvent;),taskFinished(Lorg.apache.tools.ant.BuildEvent;),BiomajConsoleLogger(Ljava.lang.String;Ljava.lang.Thread;I),fenetre,messageLogged(Lorg.apache.tools.ant.BuildEvent;),pRE,windowOpened(Ljava.awt.event.WindowEvent;),lastTask,taskToNotWrite(Ljava.lang.String;),taskStarted(Lorg.apache.tools.ant.BuildEvent;),checkArg(Lorg.apache.tools.ant.BuildEvent;),windowClosed(Ljava.awt.event.WindowEvent;),mySema,setErrorPrintStream(Ljava.io.PrintStream;),pOST,we,currentTaskName,sIZE_H,targetFinished(Lorg.apache.tools.ant.BuildEvent;),buildStarted(Lorg.apache.tools.ant.BuildEvent;),instance,text,setMessageOutputLevel(I),windowDeactivated(Ljava.awt.event.WindowEvent;),windowClosing(Ljava.awt.event.WindowEvent;),dEP,buildFinished(Lorg.apache.tools.ant.BuildEvent;),windowDeiconified(Ljava.awt.event.WindowEvent;),createWindows(Ljava.lang.String;Ljava.lang.Thread;),targetStarted(Lorg.apache.tools.ant.BuildEvent;),scroll">
+ <children xsi:type="editmodel:CompartmentEditModel" size="220,380">
+ <children xsi:type="editmodel:AttributeEditModel" name="currentTaskName" id="java.lang/Object at currentTaskName+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|java.lang/Object#currentTaskName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dEP" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#dEP"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fenetre" id="javax.swing/JFrame at fenetre+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|javax.swing/JFrame#fenetre"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="instance" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#instance"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="jtp" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#jtp"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lastTask" id="java.lang/Object at lastTask+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|java.lang/Object#lastTask"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="level" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#level"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mySema" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#mySema"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nOT_KEEP_LINE_ON_CONSOLE" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#nOT_KEEP_LINE_ON_CONSOLE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="pOST" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#pOST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="pRE" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#pRE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="position" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#position"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sIZE_H" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#sIZE_H"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sIZE_W" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#sIZE_W"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sYNC" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#sYNC"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sYNC_DEP" id="org.inria.biomaj.ant.logger/BiomajConsoleLogger#sYNC_DEP"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="scroll" id="javax.swing/JScrollPane at scroll+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|javax.swing/JScrollPane#scroll"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sdoc" id="javax.swing.text/StyledDocument at sdoc+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|javax.swing.text/StyledDocument#sdoc"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="text" id="javax.swing/JTextPane at text+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|javax.swing/JTextPane#text"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="we" id="java.lang/Object at we+org.inria.biomaj.ant.logger/BiomajConsoleLogger@|java.lang/Object#we"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="361,437"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0" autoLocated="true" id="org.apache.tools.ant/BuildLogger<-org.inria.biomaj.ant.logger/BiomajConsoleLogger" source="//@children.5" target="//@children.8" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="124,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="133,177" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="java.awt.event/WindowListener<-org.inria.biomaj.ant.logger/BiomajConsoleLogger" source="//@children.5" target="//@children.9" targetEnd="//@children.5/@sourceConnections.1/@children.1" sourceEnd="//@children.5/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="174,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="74,234"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0 //@children.1/@sourceConnections.0" name="XmlWriterAndReader" location="1120,860" size="211,106" id="org.inria.biomaj.ant.logger/XmlWriterAndReader" runTimeClassModel="getNodeFromAbsolPathFile(Ljava.lang.String;),createElementProcess(Lorg.inria.biomaj.session.process.BiomajProcess;),xi,setSessionAttributes(Lorg.inria.biomaj.session.bank.Session;Lorg.jdom.Element;),addMessages(Lorg.jdom.Element;Ljava.lang.String;Ljava.util.Vector;),wellFormed(Lorg.inria.biomaj.session.bank.Bank;),writeElementWithAbsolPathFile(Lorg.jdom.Element;Ljava.lang.String;),thereAreANewConfig(Lorg.inria.biomaj.session.bank.Bank;),checkStatefile(Lorg.jdom.Element;),restoreXmlStateFile(Ljava.lang.String;),configsIsEqual(Lorg.jdom.Element;Lorg.jdom.Element;),updateStateSessionWithProductionDir(Lorg.inria.biomaj.session.bank.Bank;),getRootFromStateFile(Ljava.lang.String;),writeXmlFileBank(Lorg.inria.biomaj.session.bank.Bank;),createContentConfig(Lorg.inria.biomaj.session.bank.Configuration;Lorg.jdom.Element;),log(Ljava.lang.String;),setGeneralComments(Lorg.jdom.Element;),createUpdateBankElement(Lorg.inria.biomaj.session.bank.Bank;),writeSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;),writeBank(Lorg.jdom.Element;Ljava.lang.String;),createBackup(Ljava.lang.String;),createContentProductionDirectories(Ljava.util.Vector;Lorg.jdom.Element;),createProcessFile(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;Ljava.lang.String;Lorg.inria.biomaj.session.process.MetaProcess;),addDepsFile(Lorg.jdom.Element;Ljava.util.Vector;),setElementTaskWorkflow(Lorg.inria.biomaj.session.bank.GeneralWorkflowTask;),readRootFromStatefile(Ljava.io.File;),compareElement(Lorg.jdom.Element;Lorg.jdom.Element;),writeProcess(Ljava.lang.String;Lorg.jdom.Element;),reWriteWithProductionDir(Ljava.lang.String;Ljava.util.Vector;),updateStateSession(Lorg.inria.biomaj.session.bank.Bank;ZZ)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="89,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="xi" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#xi"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="630,551"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.0/@sourceConnections.1 //@children.4/@sourceConnections.0" name="SubBuildListener" location="980,50" size="298,139" id="org.apache.tools.ant/SubBuildListener">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="199,38">
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildFinished" id="org.apache.tools.ant/SubBuildListener#subBuildFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildStarted" id="org.apache.tools.ant/SubBuildListener#subBuildStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.5/@sourceConnections.0" name="BuildLogger" location="220,170" size="267,177" id="org.apache.tools.ant/BuildLogger">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="229,76">
+ <children xsi:type="editmodel:MethodEditModel" name="setEmacsMode" id="org.apache.tools.ant/BuildLogger#setEmacsMode(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErrorPrintStream" id="org.apache.tools.ant/BuildLogger#setErrorPrintStream(Ljava.io.PrintStream;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setMessageOutputLevel" id="org.apache.tools.ant/BuildLogger#setMessageOutputLevel(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setOutputPrintStream" id="org.apache.tools.ant/BuildLogger#setOutputPrintStream(Ljava.io.PrintStream;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.5/@sourceConnections.1" name="WindowListener" location="550,170" size="246,234" id="java.awt.event/WindowListener">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="210,133">
+ <children xsi:type="editmodel:MethodEditModel" name="windowActivated" id="java.awt.event/WindowListener#windowActivated(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowClosed" id="java.awt.event/WindowListener#windowClosed(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowClosing" id="java.awt.event/WindowListener#windowClosing(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowDeactivated" id="java.awt.event/WindowListener#windowDeactivated(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowDeiconified" id="java.awt.event/WindowListener#windowDeiconified(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowIconified" id="java.awt.event/WindowListener#windowIconified(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowOpened" id="java.awt.event/WindowListener#windowOpened(Ljava.awt.event.WindowEvent;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="635,35" size="306,112" fontInfo="Arial-8-0" note="Le package se divise en deux types de logger :
- Les loggers qui implemente l'interface BuildLogger
- Les loggers qui implemente l'interface SubBuildListener


"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="40,390" size="237,27" fontInfo="Arial-8-0" note="Generation des logs generale de l'application"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="660,430" size="180,27" fontInfo="Arial-8-0" note="Gestion de l'affichage en console"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="1220,273" size="403,61" fontInfo="Arial-8-0" note="Definition d'un listener pour l'execution des processus 
de pre et post-traitements. Ce listener est attache au script ant 
workflow/handle_process.xml"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="820,282" size="337,44" fontInfo="Arial-8-0" note="Définition d'un listener pour l'execution du workflow dans globalité.
Ce listener est attache au script ant workflow/mirror.xml"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/logger/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant BioMAJ listener.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajAddLocalFile.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajAddLocalFile.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajAddLocalFile.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,150 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+/**
+ * <p>This task is instanciate in mirror.xml with the name : bmaj-addlocalfile.<br/>
+ * check biomaj_common.xml to see the map of task.
+ * </p>
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BmajAddLocalFile extends BmajTask {
+
+ /**
+ * @uml.property name="file"
+ */
+ private String file = null ;
+
+ /**
+ * @uml.property name="fileList"
+ */
+ private String fileList = null ;
+
+ @Override
+ public void execute() throws BuildException {
+
+ boolean logFiles = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+ if (!logFiles)
+ return;
+
+ if ((file != null)&&(file.trim().compareTo("")!=0))
+ {
+ addLocalOnlineFile(file);
+ log("file ["+file+"] is add as a local online file.",Project.MSG_VERBOSE);
+ return;
+ }
+
+ if (fileList==null) {
+ log("None attribut (file or filelist) are set!",Project.MSG_ERR);
+ return;
+ }
+
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(fileList));
+ String line;
+
+ while ((line=br.readLine())!= null) {
+
+ if (line.compareTo("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE")==0)
+ continue;
+
+ String myfile = getProject().getProperty(BiomajConst.dataDirProperty)+"/"+getProject().getProperty(BiomajConst.offlineDirProperty)+"/"+line;
+
+ log("file ["+myfile+"] is add as a local online file.",Project.MSG_VERBOSE);
+
+ addLocalOnlineFile(myfile);
+
+ }
+
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+
+ }
+
+ @Override
+ public String getTaskName() {
+ return "BmajAddLocalFile";
+ }
+
+ /**
+ * @return the file
+ * @uml.property name="file"
+ */
+ public String getFile() {
+ return file;
+ }
+
+ /**
+ * @param file the file to set
+ * @uml.property name="file"
+ */
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ /**
+ * @return the fileList
+ * @uml.property name="fileList"
+ */
+ public String getFileList() {
+ return fileList;
+ }
+
+ /**
+ * @param fileList the fileList to set
+ * @uml.property name="fileList"
+ */
+ public void setFileList(String fileList) {
+ this.fileList = fileList;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFreeSpace.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFreeSpace.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFreeSpace.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,70 @@
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+
+/**
+ * <p>This task is instanciate in mirror.xml with the name : bmaj-addlocalfile.<br/>
+ * check biomaj_common.xml to see the map of task.
+ * </p>
+ * <p>
+ * Throw an exception if there are not enough space disk.
+ *
+ * 2 criteria
+ * <ul>
+ * <li>1) if a prouction directory exist, we compare the free space disk with the size of directory.</li>
+ * <li>2) we compute the total size of file to download and we check the space disk. </li>
+ * </ul>
+ * </p>
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BmajCheckFreeSpace extends BmajTask {
+
+ @Override
+ public void execute() throws BuildException {
+
+ File prod = new File(getProject().getProperty(BiomajConst.dataDirProperty));
+ long freeSpace = prod.getFreeSpace();
+
+ ProductionDirectory prodDirectory ;
+ List<ProductionDirectory> prodDirectories = BiomajSQLQuerier.getAvailableProductionDirectories(getProject().getProperty(BiomajConst.dbNameProperty));
+
+ if (prodDirectories.size()>0) {
+ prodDirectory = prodDirectories.get(prodDirectories.size()-1);
+
+ File prodBank = new File(prodDirectory.getPath());
+
+ if (prodBank.exists()) {
+ long lSizeProd = prodDirectory.getSize();
+
+ if (freeSpace<lSizeProd)
+ throw new BiomajBuildException(getProject(),"checkfreespace.error",Long.toString(freeSpace),Long.toString(lSizeProd),null);
+
+ log("space ok freespace:"+Long.toString(freeSpace)+" - release["+prodDirectory.getPath()+"]:"+lSizeProd,Project.MSG_VERBOSE);
+ return ;
+ }
+ }
+
+ //2eme crite de comparaison, la taille globale a ete calcule durant le check et mis dna sle fichier update.properties (repertoire runtime) !
+ if (!getProject().getProperties().containsKey("remote.files.size"))
+ throw new BiomajBuildException(getProject(),"unknown.error","Please relaunche BioMAJ with option -N.",null);
+
+ long sizeTotal = Long.valueOf(getProject().getProperty("remote.files.size"));
+
+ if (freeSpace<sizeTotal)
+ throw new BiomajBuildException(getProject(),"checkfreespace.error",Long.toString(freeSpace),Long.toString(sizeTotal),null);
+
+ log("space ok freespace:"+Long.toString(freeSpace)+" - size to download:"+sizeTotal,Project.MSG_VERBOSE);
+
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFrequency.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFrequency.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCheckFrequency.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,198 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.util.Date;
+import java.util.Locale;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * <p>This task is instanciate in mirror.xml with the name : bmaj-addlocalfile.<br/>
+ * check biomaj_common.xml to see the map of task.
+ * </p>
+ * <p>
+ * TaskBiomaj to decide if the workflow can be executed. Administrator tune this
+ * property in the .properties.
+ *
+ * This task take the oldest file in the production directory and compare with
+ * current date
+ * </p>
+ *
+ * @deprecated
+ * @author ofilangi
+ *
+ */
+public class BmajCheckFrequency extends Task {
+
+ /**
+ * Frequency to update the bank (0, n, daily, weekly, monthly)
+ * @uml.property name="frequency"
+ */
+ private String frequency;
+ /**
+ * Value property to set a result true/false true if the bank can be up to date otherwise false
+ * @uml.property name="value"
+ */
+ private String value = "";
+
+ /**
+ *
+ */
+ @Override
+ public void execute() throws BuildException {
+
+ try {
+ getProject().setProperty(value, Boolean.toString(frequencyIsOk()));
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(getProject(), e);
+ }
+ }
+
+ /**
+ * @return the frequency
+ * @uml.property name="frequency"
+ */
+ public String getFrequency() {
+ return frequency;
+ }
+
+ /**
+ * @param frequency
+ * the frequency to set
+ * @uml.property name="frequency"
+ */
+ public void setFrequency(String frequency) {
+ this.frequency = frequency;
+ }
+
+ public Long getNumberFrequency() {
+
+ if (frequency.equalsIgnoreCase("daily"))
+ return new Long(1);
+ else if (frequency.equalsIgnoreCase("weekly"))
+ return new Long(6);
+ else if (frequency.equalsIgnoreCase("monthly"))
+ return new Long(30);
+ else {
+ try {
+ return Long.valueOf(frequency);
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log("Problem with frequency update:"
+ + e.getMessage());
+ BiomajLogger.getInstance().log(e);
+ throw new BiomajBuildException(getProject(),
+ "bmajCheckFrequency.error.frequency", frequency, e);
+ }
+ }
+ }
+
+ /**
+ * @return the value
+ * @uml.property name="value"
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param value
+ * the value to set
+ * @uml.property name="value"
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ *
+ * @return
+ * @throws BiomajException
+ */
+
+
+ public boolean frequencyIsOk() throws BiomajException {
+
+ ProductionDirectory pd = BiomajSQLQuerier.getLatestProductionDirectory(BiomajUtils.getProperty(getProject(),BiomajConst.dbNameProperty));
+
+ if (pd == null) {
+ log("No production directory has been created.");
+ getProject().setProperty(value, Boolean.toString(true));
+ return true;
+ }
+ Date date = pd.getCreationDate();
+ if (date == null)
+ return true;
+
+ Date today = new Date();
+
+ Long freq = getNumberFrequency() * 24 * 60 * 60 * 1000;
+
+ log("frequency update check:[session update:"
+ + BiomajUtils.dateToString(date, Locale.US) + "][today:"
+ + BiomajUtils.dateToString(today, Locale.US) + "][freq prop:"
+ + Long.toString(freq) + "]", Project.MSG_INFO);
+ Long elapsedTime = today.getTime() - date.getTime();
+
+ if (elapsedTime < 0)
+ throw new BiomajBuildException(getProject(),
+ "bmajcheckfrequency.error.date", BiomajUtils
+ .dateToString(date, Locale.US), BiomajUtils
+ .dateToString(today, Locale.US), Long.toString(freq),
+ new Exception());
+
+ log("elapsed time :" + Long.toString(elapsedTime), Project.MSG_INFO);
+ log("frequency prop:" + Long.toString(freq), Project.MSG_INFO);
+
+ return (elapsedTime >= freq);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCopy.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCopy.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCopy.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,253 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * <p>This task is instanciate in mirror.xml with the name : bmaj-addlocalfile.<br/>
+ * check biomaj_common.xml to see the map of task.
+ * </p>
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BmajCopy extends BmajTask {
+
+ /**
+ * @uml.property name="remotedir"
+ */
+ private String from;
+
+ /**
+ * @uml.property name="listing"
+ */
+ private String listing;
+ /**
+ * @uml.property name="toDir"
+ */
+ private String toDir;
+
+ /**
+ * @uml.property name="continueOnError"
+ */
+ private boolean failOnError = true;
+
+ /**
+ * @uml.property name="cmd"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Commandline cmd = new Commandline();
+
+
+ public BmajCopy() {
+ cmd.setExecutable("cp");
+ cmd.createArgument().setValue("-pf");
+ }
+
+
+ @Override
+ public void execute() throws BuildException {
+ InputValidation.checkString(getProject(),from, "");
+ InputValidation.checkString(getProject(),listing, "");
+ InputValidation.checkString(getProject(),toDir, "");
+ BufferedReader br;
+ Vector<RemoteFile> files = new Vector<RemoteFile>();
+ try {
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line=br.readLine())!= null) {
+ files.add(new RemoteFile(line));
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+ boolean logFiles = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+ int count = 0;
+ log("["+from+"] => ["+toDir+"]",Project.MSG_INFO);
+ for (int i=0;i<files.size();i++) {
+ try {
+ Commandline c = (Commandline) cmd.clone();
+ c.createArgument().setValue(from+"/"+files.get(i).getAbsolutePath());
+ String filePath = toDir+"/"+getTargetDirectory(files.get(i).getAbsolutePath());
+ BiomajUtils.createSubDirectories(filePath);
+ c.createArgument().setValue(filePath);
+ Execute exe = new Execute(new LogStreamHandler(this,
+ Project.MSG_INFO,
+ Project.MSG_ERR),
+ null);
+ exe.setCommandline(c.getCommandline());
+ exe.execute();
+
+ int code_retour = exe.getExitValue();
+
+ if (code_retour!=0) {
+ if (failOnError)
+ throw new BiomajBuildException(getProject(),"copy.error",files.get(i).getAbsolutePath(),new Exception());
+ continue;
+ }
+
+ float a = ((float)++count/ (float)files.size())*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+
+ if (logFiles)
+ addDownloadFile(files.get(i).getAbsolutePath(), Long.toString(files.get(i).getDate().getTime()), Long.toString(files.get(i).getSize()));
+
+ } catch (Exception e) {
+ log("I/O Exception :"+e.getMessage(),Project.MSG_WARN);
+ if (!failOnError)
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+ log("ok",Project.MSG_INFO);
+ }
+
+
+ protected String getTargetDirectory(String pathFile) {
+ int index = pathFile.lastIndexOf('/');
+ if (index == -1)
+ return "";
+
+ return pathFile.substring(0, index);
+ }
+
+ protected String getNameFile(String pathFile) {
+ int index = pathFile.lastIndexOf('/');
+ if (index == -1)
+ return pathFile;
+
+ return pathFile.substring(index+1);
+ }
+
+ /**
+ * @return the failOnError
+ * @uml.property name="failOnError"
+ */
+ public boolean isFailOnError() {
+ return failOnError;
+ }
+
+
+ /**
+ * @param failOnError the failOnError to set
+ * @uml.property name="failOnError"
+ */
+ public void setFailOnError(boolean continueOnError) {
+ this.failOnError = continueOnError;
+ }
+
+
+ /**
+ * @return the from
+ * @uml.property name="from"
+ */
+ public String getFrom() {
+ return from;
+ }
+
+
+ /**
+ * @param from the from to set
+ * @uml.property name="from"
+ */
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+
+ /**
+ * @return the listing
+ * @uml.property name="listing"
+ */
+ public String getListing() {
+ return listing;
+ }
+
+
+ /**
+ * @param listing the listing to set
+ * @uml.property name="listing"
+ */
+ public void setListing(String listing) {
+ this.listing = listing;
+ }
+
+
+ /**
+ * @return the toDir
+ * @uml.property name="toDir"
+ */
+ public String getToDir() {
+ return toDir;
+ }
+
+
+ /**
+ * @param toDir the toDir to set
+ * @uml.property name="toDir"
+ */
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCreateListLinkFileName.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCreateListLinkFileName.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajCreateListLinkFileName.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,127 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class BmajCreateListLinkFileName extends Task {
+
+ /**
+ * @uml.property name="propertyfilelist"
+ */
+ private String propertyfilelist;
+ /**
+ * @uml.property name="filelist"
+ */
+ private String filelist ="";
+
+ @Override
+ public void execute() throws BuildException {
+
+ try {
+ File dirOffline = new File(BiomajUtils.getOfflineDirectory(getProject()));
+ findAnsWriteFileLinkName(dirOffline);
+ filelist = filelist.replaceAll(",$", "");
+ getProject().setProperty(propertyfilelist, filelist);
+
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(getProject(),be);
+ }
+
+ }
+
+ private void findAnsWriteFileLinkName(File dir) {
+ FileFilterString ff = new FileFilterString(getProject().getProperty("link.file.name"));
+ File[] lFile = dir.listFiles(ff);
+
+ if (lFile.length>1)
+ throw new BiomajBuildException(getProject(),"",new Exception("Internal error (BmajCreateListLinkFileName::findAnsWriteFileLinkName) )"));
+
+ if (lFile.length==1) {
+ filelist+=lFile[0].getAbsolutePath()+",";
+ }
+ File[] lDir = dir.listFiles() ;
+ for (int i=0;i<lDir.length;i++)
+ if (lDir[i].isDirectory())
+ findAnsWriteFileLinkName(lDir[i]);
+
+ }
+
+ private class FileFilterString implements FilenameFilter {
+
+ private String filter ;
+
+ public FileFilterString(String f) {
+ filter = f;
+ }
+
+ public boolean accept(File dir, String name) {
+ if (name.compareTo(filter)==0)
+ return true;
+
+ return false;
+ }
+
+ }
+
+ /**
+ * @return the propertyfilelist
+ * @uml.property name="propertyfilelist"
+ */
+ public String getPropertyfilelist() {
+ return propertyfilelist;
+ }
+
+ /**
+ * @param propertyfilelist the propertyfilelist to set
+ * @uml.property name="propertyfilelist"
+ */
+ public void setPropertyfilelist(String propertyfilelist) {
+ this.propertyfilelist = propertyfilelist;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajDelete.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajDelete.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajDelete.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,138 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class BmajDelete extends BmajTask {
+
+ /**
+ * @uml.property name="listingExclude"
+ */
+ private String listingExclude;
+ /**
+ * @uml.property name="dir"
+ */
+ private String dir;
+
+ @Override
+ public void execute() throws BuildException {
+ InputValidation.checkString(getProject(),listingExclude, "listing exclud has to be set");
+ InputValidation.checkString(getProject(),dir, "directory has to be set");
+ BufferedReader br;
+ Vector<File> files = new Vector<File>();
+ try {
+ br = new BufferedReader(new FileReader(listingExclude));
+ String line;
+ while ((line=br.readLine())!= null) {
+ if (line.compareTo("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE")==0)
+ break;
+ File f = new File(line);
+ if (!f.exists()) {
+ log("file does not exist :"+line,Project.MSG_WARN);
+ continue;
+ }
+ files.add(f);
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ File dirD = new File(dir);
+
+ if (! dirD.exists()) {
+ log("${dir} does not exist :"+dirD.getAbsolutePath(),Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),null);
+ }
+
+
+ if (! dirD.isDirectory()) {
+ log("${dir} is not a directory :"+dirD.getAbsolutePath(),Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),null);
+ }
+
+ for (File f : dirD.listFiles())
+ BiomajUtils.deleteAll(f,files);
+ }
+
+ /**
+ * @return the dir
+ * @uml.property name="dir"
+ */
+ public String getDir() {
+ return dir;
+ }
+
+ /**
+ * @param dir the dir to set
+ * @uml.property name="dir"
+ */
+ public void setDir(String dir) {
+ this.dir = dir;
+ }
+
+ /**
+ * @return the listingExclude
+ * @uml.property name="listingExclude"
+ */
+ public String getListingExclude() {
+ return listingExclude;
+ }
+
+ /**
+ * @param listingExclude the listingExclude to set
+ * @uml.property name="listingExclude"
+ */
+ public void setListingExclude(String listingExclude) {
+ this.listingExclude = listingExclude;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExecute.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExecute.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExecute.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,531 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.ExecuteWatchdog;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Execute a process in phase : pre and post process
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BmajExecute extends BmajTask {
+
+ public static final String WARNING_FILTER = "__biomaj_warning___";
+ public static final String END_FILTER = "__end___";
+ public static final String DEPENDANCE_FILTER = "__depends___";
+ public static final String DEPENDANCE_VOLATILE__FILTER = "__depends___volatile___";
+
+ /** Property file to get information about current process */
+ private static final String FILE_PROCESS_INFORMATION=BiomajUtils.getBiomajRootDirectory()+"/log/processOn";
+
+ public static final String PROPERTY_ERROR = "biomaj.error.during.script";
+ public static final String MESSAGE_PROPERTY_ERROR = "biomaj.error.message.during.script";
+
+
+ public static final String RELEASE_ALL_COMPRESSED_FILES_LIST = "RELEASE_ALL_COMPRESSED_FILES_LIST";
+ public static final String RELEASE_ALL_UNCOMPRESSED_FILES_LIST = "RELEASE_ALL_UNCOMPRESSED_FILES_LIST";
+ public static final String RELEASE_OLD_FILES_LIST ="RELEASE_OLD_FILES_LIST";
+ public static final String RELEASE_NEW_FILES_LIST = "RELEASE_NEW_FILES_LIST";
+
+ /* Attributs Task*/
+ /* --------------*/
+ /**
+ * Name of key process (Required)
+ * @uml.property name="keyName"
+ */
+ private String keyName;
+ /**
+ * Process name (Required)
+ * @uml.property name="name"
+ */
+ private String name;
+ /**
+ * Executable Name (Required)
+ * @uml.property name="exe"
+ */
+ private String exe;
+ /**
+ * Arguments executable (Not Required)
+ * @uml.property name="args"
+ */
+ private String args;
+ /**
+ * Process description (Required)
+ * @uml.property name="description"
+ */
+ private String description;
+ /**
+ * Process Type (Required)
+ * @uml.property name="type"
+ */
+ private String type;
+ /**
+ * Kill all processes (Not Required)
+ * @uml.property name="killAllOnError"
+ */
+ private String killAllOnError;
+
+ private String timeOut;
+
+ long valueTimeOut = -1 ;
+
+ /* Internal data */
+ /* ------------- */
+
+ /**
+ * Kill all process
+ * @uml.property name="killAll"
+ */
+ Boolean killAll = false;
+
+ @Override
+ public void execute() throws BuildException {
+ verifAttributs();
+
+ Commandline cmd = new Commandline();
+
+// Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO,Project.MSG_ERR),null);
+
+ ExecuteWatchdog watchTimeout = null;
+ if (valueTimeOut > 0)
+ watchTimeout = new ExecuteWatchdog(valueTimeOut * 1000); //ms to s
+
+ Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO,Project.MSG_ERR), watchTimeout);
+
+ String executable = this.getProject().getProperty(exe).trim();
+ try {
+ executable = getPathExe(getProject(),executable);
+
+ cmd.setExecutable(executable);
+ String newArgs = replacePropertiesValues(this.getProject().getProperty(args));
+ cmd.createArgument().setLine(newArgs);
+ execute.setCommandline(cmd.getCommandline());
+
+ Vector<String> listEnvironmentVariables = new Vector<String>();
+ listEnvironmentVariables.add("dbname="+getProject().getProperty(BiomajConst.dbNameProperty));
+ listEnvironmentVariables.add("datadir="+getProject().getProperty(BiomajConst.dataDirProperty));
+ listEnvironmentVariables.add("offlinedir="+getProject().getProperty(BiomajConst.offlineDirProperty));
+ listEnvironmentVariables.add("dirversion="+getProject().getProperty(BiomajConst.versionDirProperty));
+ listEnvironmentVariables.add("remotedir="+getProject().getProperty(BiomajConst.remoteDirProperty));
+ listEnvironmentVariables.add("noextract="+getProject().getProperty(BiomajConst.noExtractProperty));
+ listEnvironmentVariables.add("localfiles="+getProject().getProperty(BiomajConst.localFilesProperty));
+ listEnvironmentVariables.add("remotefiles="+getProject().getProperty(BiomajConst.remoteFilesProperty));
+ listEnvironmentVariables.add("mailadmin="+getProject().getProperty(BiomajConst.mailAdminProperty));
+ listEnvironmentVariables.add("mailsmtp="+getProject().getProperty(BiomajConst.mailSmtpHostProperty));
+ listEnvironmentVariables.add("mailfrom="+getProject().getProperty(BiomajConst.mailFromProperty));
+ //Nouvelles Variables d'environnements
+
+ listEnvironmentVariables.add("PATH_PROCESS_BIOMAJ="+BiomajInformation.getInstance().getProperty(BiomajInformation.PROCESSDIR));
+ listEnvironmentVariables.add("PATH_LOG_BIOMAJ="+BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR));
+ listEnvironmentVariables.add("PATH_WORKFLOW_BIOMAJ="+BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR));
+
+ String listFilesValue = null;
+ if ((listFilesValue = getProject().getProperty(BiomajConst.listFilesAvailable)) != null && Boolean.valueOf(listFilesValue)) {
+
+ listEnvironmentVariables.add("RELEASE_ALL_COMPRESSED_FILES_LIST="+getProject().getProperty(RELEASE_ALL_COMPRESSED_FILES_LIST));
+ listEnvironmentVariables.add("RELEASE_ALL_UNCOMPRESSED_FILES_LIST="+getProject().getProperty(RELEASE_ALL_UNCOMPRESSED_FILES_LIST));
+ listEnvironmentVariables.add("RELEASE_OLD_FILES_LIST="+getProject().getProperty(RELEASE_OLD_FILES_LIST));
+ listEnvironmentVariables.add("RELEASE_NEW_FILES_LIST="+getProject().getProperty(RELEASE_NEW_FILES_LIST));
+ }
+
+ //Ajout de la liste des fichiers telecharges pour la release correspondant au delta entre 2 release
+
+
+ log("------------------------- ENVIRONMENT VARIABLE FOR POST-PROCESS ------------------------",Project.MSG_DEBUG);
+
+ log("dbname="+getProject().getProperty(BiomajConst.dbNameProperty),Project.MSG_DEBUG);
+ log("datadir="+getProject().getProperty(BiomajConst.dataDirProperty),Project.MSG_DEBUG);
+ log("offlinedir="+getProject().getProperty(BiomajConst.offlineDirProperty),Project.MSG_DEBUG);
+ log("dirversion="+getProject().getProperty(BiomajConst.versionDirProperty),Project.MSG_DEBUG);
+ log("remotedir="+getProject().getProperty(BiomajConst.remoteDirProperty),Project.MSG_DEBUG);
+ log("noextract="+getProject().getProperty(BiomajConst.noExtractProperty),Project.MSG_DEBUG);
+ log("localfiles="+getProject().getProperty(BiomajConst.localFilesProperty),Project.MSG_DEBUG);
+ log("remotefiles="+getProject().getProperty(BiomajConst.remoteFilesProperty),Project.MSG_DEBUG);
+ log("mailadmin="+getProject().getProperty(BiomajConst.mailAdminProperty),Project.MSG_DEBUG);
+ log("mailsmtp="+getProject().getProperty(BiomajConst.mailSmtpHostProperty),Project.MSG_DEBUG);
+ log("mailfrom="+getProject().getProperty(BiomajConst.mailFromProperty),Project.MSG_DEBUG);
+
+ //Dynamics property....
+ listEnvironmentVariables.add("remoterelease="+getProject().getProperty(BiomajConst.remoteReleaseDynamicProperty));
+ listEnvironmentVariables.add("removedrelease="+getProject().getProperty(BiomajConst.removedReleaseProperty));
+ log("remoterelease="+getProject().getProperty(BiomajConst.remoteReleaseDynamicProperty),Project.MSG_DEBUG);
+ log("removedrelease="+getProject().getProperty(BiomajConst.removedReleaseProperty),Project.MSG_DEBUG);
+ log("-------------------------------------------------",Project.MSG_DEBUG);
+ listEnvironmentVariables.add(BiomajConst.PP_WARNING+"="+WARNING_FILTER);
+ listEnvironmentVariables.add(BiomajConst.PP_DEPENDENCE_VOLATILE+"="+DEPENDANCE_VOLATILE__FILTER);
+ listEnvironmentVariables.add(BiomajConst.PP_DEPENDENCE+"="+DEPENDANCE_FILTER);
+
+ //String onlineDirDynamicProperty = getProject().getProperty(CitrinaConst.onlineDirDynamicProperty);
+
+ /*
+ if ((onlineDirDynamicProperty == null)||(onlineDirDynamicProperty.compareTo("")==0))
+ throw new BiomajBuildException(getProject(),"citrinautils.error.property",CitrinaConst.onlineDirDynamicProperty);
+ */
+
+ String type = getProject().getProperty("type_process");
+
+ if (type == null)
+ throw new BiomajBuildException(getProject(),"biomaj.property.define.error","type_process",new Exception());
+ File workDirectory ;
+ if (type.compareTo("removeprocess")==0)
+ workDirectory = new File(getProject().getProperty(BiomajConst.dataDirProperty)+"/");
+ else if (type.compareTo("preprocess")==0)
+ workDirectory = new File(getProject().getProperty(BiomajConst.dataDirProperty)+"/"+getProject().getProperty(BiomajConst.versionDirProperty));
+ else
+ workDirectory = new File(getProject().getProperty(BiomajConst.dataDirProperty)+"/"+getProject().getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.futureReleaseLink);
+
+ if (!workDirectory.isDirectory()) {
+ throw new BiomajBuildException(getProject(),"directory.not.exist",workDirectory.getAbsolutePath(),new Exception());
+ }
+
+ if (type.compareTo("preprocess")!=0)
+ listEnvironmentVariables.add("newrelease="+workDirectory.getCanonicalPath());
+
+ log(" #===================================#",Project.MSG_INFO);
+ log(" [Process]",Project.MSG_INFO);
+ log(" KEYNAME :"+getKeyName(),Project.MSG_INFO);
+ log(" NAME :"+getProject().getProperty(getName()),Project.MSG_INFO);
+ log(" EXE :"+getProject().getProperty(getExe()),Project.MSG_INFO);
+ log(" ARGS :"+newArgs,Project.MSG_INFO);
+ log(" TIMEOUT :"+getProject().getProperty(getTimeOut()),Project.MSG_INFO);
+ log(" DESCRIPTION :"+getProject().getProperty(getDescription()),Project.MSG_INFO);
+ log(" #===================================#",Project.MSG_INFO);
+
+ execute.setWorkingDirectory(workDirectory);
+ execute.setEnvironment(listEnvironmentVariables.toArray(new String[listEnvironmentVariables.size()]));
+
+ getProject().setProperty(PROPERTY_ERROR, Boolean.toString(false));
+ execute.execute();
+
+ if (Boolean.valueOf(getProject().getProperty(PROPERTY_ERROR))) {
+ //Il y a eu une erreur qui a ete initialiser par BiomajProcessListener
+ throw new BiomajBuildException(getProject(),"unknown.error",getProject().getProperty(MESSAGE_PROPERTY_ERROR),null);
+ }
+
+ } catch (IOException ioe) {
+ // ioe.printStackTrace();
+ throw new BiomajBuildException(getProject(),"io.error",ioe.getMessage(),ioe);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(getProject(),be);
+ }
+
+ int code_retour = execute.getExitValue();
+ getProject().setProperty("returnValue", Integer.toString(code_retour));
+ if (code_retour!=0) {
+ if (watchTimeout != null && watchTimeout.killedProcess())
+ log("Process timeout", Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),"process.error",keyName,exe,new Exception());
+ }
+ }
+
+ private String getProperty(String name) {
+ return this.getProject().getProperty(name);
+ }
+
+ private void verifAttributs() {
+
+ if (!this.getProject().getProperties().containsKey(name)) {
+ throw new BiomajBuildException(getProject(),"process.param.undefined",keyName,"name",new Exception());
+ }
+
+ String test = getProperty(name);
+ if (test.contains(" "))
+ throw new BiomajBuildException(getProject(),"process.not.blank",name,getProperty(name),new Exception());
+
+ if (!this.getProject().getProperties().containsKey(exe)) {
+ throw new BiomajBuildException(getProject(),"process.param.undefined",keyName,"exe",new Exception());
+ }
+
+ test = getProperty(exe);
+ if (test.contains(" "))
+ throw new BiomajBuildException(getProject(),"process.not.blank",exe,getProperty(exe),new Exception());
+
+ if (!this.getProject().getProperties().containsKey(description)) {
+ throw new BiomajBuildException(getProject(),"process.param.undefined",keyName,"desc",new Exception());
+ }
+
+ if (!this.getProject().getProperties().containsKey(type)) {
+ throw new BiomajBuildException(getProject(),"process.param.undefined",keyName,"type",new Exception());
+ }
+
+ if (!this.getProject().getProperties().containsKey(timeOut)) {
+ valueTimeOut = -1;
+ } else {
+ try {
+ valueTimeOut = Long.valueOf(getProperty(timeOut));
+ } catch (NumberFormatException e) {
+ log("Value ["+getProperty(timeOut)+"] for timeout is not valid ",Project.MSG_WARN);
+ valueTimeOut = -1 ;
+ }
+ }
+
+ if (this.getProject().getProperties().containsKey(killAllOnError)) {
+ killAll = Boolean.valueOf(this.getProject().getProperty(killAllOnError));
+ } else
+ this.getProject().setProperty(killAllOnError, "false");
+
+
+ }
+
+ public static Properties getInfoLastProcesses(String metaProcess) {
+ Properties informationFile = new Properties();
+ try {
+ informationFile.load(new FileInputStream(new File(getNameFileInformationProcess(metaProcess))));
+ } catch (FileNotFoundException fnot) {
+ BiomajLogger.getInstance().log(fnot);
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ }
+ return informationFile;
+ }
+
+ private static String getNameFileInformationProcess(String metaProcess) {
+ return FILE_PROCESS_INFORMATION+metaProcess+".properties";
+ }
+
+
+ static public String getPathExe(Project p,String executable) throws BiomajException {
+ if (executable.charAt(0)!='/') {
+ String scriptsDirectory = BiomajInformation.getInstance().getProperty(BiomajInformation.PROCESSDIR)+"/";
+ // Si le chemin n'est pas absolue, on cherche le script dans le repertoire par defaut
+ File theExe = new File(scriptsDirectory+executable);
+ if (theExe.exists()) {
+ executable = theExe.getAbsolutePath();
+ } else {
+ if (p!=null)
+ p.log("["+theExe.getAbsolutePath()+"] does not exist.", Project.MSG_WARN);
+ }
+ }
+
+ return executable;
+ }
+
+
+ static public long getTimeStampExe(String pathexe) {
+ File f = new File(pathexe);
+
+ if (f.exists())
+ return f.lastModified();
+
+ return 0;
+ }
+
+ /**
+ * @return the description
+ * @uml.property name="description"
+ */
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+
+ /**
+ * @param description the description to set
+ * @uml.property name="description"
+ */
+ @Override
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+ /**
+ * @return the exe
+ * @uml.property name="exe"
+ */
+ public String getExe() {
+ return exe;
+ }
+
+
+ /**
+ * @param exe the exe to set
+ * @uml.property name="exe"
+ */
+ public void setExe(String exe) {
+ this.exe = exe;
+ }
+
+
+ /**
+ * @return the killAllOnError
+ * @uml.property name="killAllOnError"
+ */
+ public String getKillAllOnError() {
+ return killAllOnError;
+ }
+
+
+ /**
+ * @param killAllOnError the killAllOnError to set
+ * @uml.property name="killAllOnError"
+ */
+ public void setKillAllOnError(String killAllOnError) {
+ this.killAllOnError = killAllOnError;
+ }
+
+
+ /**
+ * @return the name
+ * @uml.property name="name"
+ */
+ public String getName() {
+ return name;
+ }
+
+
+ /**
+ * @param name the name to set
+ * @uml.property name="name"
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ * @return the type
+ * @uml.property name="type"
+ */
+ public String getType() {
+ return type;
+ }
+
+
+ /**
+ * @param type the type to set
+ * @uml.property name="type"
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+
+ /**
+ * @return the keyName
+ * @uml.property name="keyName"
+ */
+ public String getKeyName() {
+ return keyName;
+ }
+
+
+ /**
+ * @param keyName the keyName to set
+ * @uml.property name="keyName"
+ */
+ public void setKeyName(String keyName) {
+ this.keyName = keyName;
+ }
+
+
+ /**
+ * @return the args
+ * @uml.property name="args"
+ */
+ public String getArgs() {
+ return args;
+ }
+
+
+ /**
+ * @param args the args to set
+ * @uml.property name="args"
+ */
+ public void setArgs(String args) {
+ this.args = args;
+ }
+
+ public String getTimeOut() {
+ return timeOut;
+ }
+
+ public void setTimeOut(String timeOut) {
+ this.timeOut = timeOut;
+ }
+
+ public String replacePropertiesValues(String args) throws BiomajBuildException{
+
+ //System.out.println("ok");
+ if ((args==null)||args.compareTo("")==0)
+ return "";
+ Pattern patternProperty = Pattern.compile("\\$\\{([\\w\\.]+)\\}");
+ Matcher match = patternProperty.matcher(args);
+ try {
+ while (match.find()) {
+ String key = match.group(1);
+ String res = BankFactory.getRecursiveProperty(getProject().getProperties(), key);
+ args = args.replaceAll("\\$\\{"+key+"\\}", res);
+ match = patternProperty.matcher(args);
+ }
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ return args ;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExtract.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExtract.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajExtract.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,408 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class BmajExtract extends BmajTask {
+ /**
+ * Task interface
+ * @uml.property name="includesfile"
+ */
+ private String includesfile ;
+ /**
+ * @uml.property name="dir"
+ */
+ private String dir;
+
+ /**
+ * @uml.property name="continueOnError"
+ */
+ private boolean continueOnError = true;
+
+ @Override
+ public void execute() throws BuildException {
+ //checkExecutable();
+ //String currentUncompressedFile = "";
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(new File(includesfile)));
+ String nf;
+ int count = 0;
+ LogStreamHandler os = new LogStreamHandler(this, Project.MSG_INFO,Project.MSG_ERR);
+
+ Vector<String> namesFile = new Vector<String>();
+ while ((nf = br.readLine())!= null)
+ namesFile.add(nf);
+ br.close();
+
+ for (String nameFile : namesFile) {
+ float a = ((float)++count/ (float)namesFile.size())*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+
+ Commandline cmd = new Commandline();
+
+ if (nameFile.trim().compareTo("")==0)
+ continue;
+
+ if (nameFile.contains("PLACE_HOLDER_TO_PREVENT_EMPTY_FILE"))
+ continue;
+
+ try {
+
+ cmd.setExecutable(BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_BIN));
+ String option_decomp = BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_DECOMP);
+ if (option_decomp!=null) {
+ cmd.createArgument().setValue(option_decomp);
+
+ }
+ cmd.createArgument().setValue(dir+"/"+nameFile);
+
+ String option_output = BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_OUTPUT);
+
+ if (option_output!=null) {
+ cmd.createArgument().setValue(option_output);
+ cmd.createArgument().setValue(getTargetDirectory(dir,nameFile));
+ }
+
+
+ } catch (BiomajException e) {
+ log("["+nameFile +"] format unknown !",Project.MSG_ERR);
+ log(e.getLocalizedMessage(),Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),"bmajExtract.error.file",dir+"/"+nameFile,new Exception());
+ }
+
+ Execute execute = new Execute(os,null);
+
+ log("extracting:"+dir+"/"+nameFile,Project.MSG_VERBOSE);
+
+ execute.setCommandline(cmd.getCommandline());
+
+ /*
+ for (int k=0;k<execute.getCommandline().length;k++)
+ log (execute.getCommandline()[k]+" ",Project.MSG_INFO);
+ */
+
+ File fileArchive = new File(dir+"/"+nameFile);
+
+ /**
+ * PAs de log dans extract pour l instant.......
+ * ----------------------------------------------------
+ */
+
+ boolean logExtract = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+
+ File dirT = null;
+ Vector<FileDesc> lsBefore = null;
+ FileDesc fd = null;
+ String hash = null;
+
+ //Pour savoir ce qui est generer, on fait un ls
+ if (logExtract) {
+ dirT = new File(dir);
+ lsBefore = new Vector<FileDesc>();
+ BiomajUtils.getListFilesFromDir(dirT.getAbsolutePath(),lsBefore);
+ fd = new FileDesc(fileArchive,false);
+ hash = fd.getHash();
+ }
+ /**
+ * -------------------------------------------------------
+ */
+ execute.execute();
+
+ int code_retour = execute.getExitValue();
+
+ //not in gzip format code=1!
+ if (code_retour!=0) {
+
+ for (String line : execute.getCommandline())
+ log(line,Project.MSG_ERR);
+ log(Integer.valueOf(count)+":"+nameFile +" error",Project.MSG_ERR);
+ for (int k=0;k<execute.getCommandline().length;k++)
+ log (execute.getCommandline()[k]+" ",Project.MSG_DEBUG);
+ log("file:"+dir+"/"+nameFile,Project.MSG_DEBUG);
+ log("code retour:"+code_retour,Project.MSG_DEBUG);
+ if (!continueOnError)
+ throw new BiomajBuildException(getProject(),"bmajExtract.error.file",dir+"/"+nameFile,new Exception());
+ } else {
+ // Ca s est bien passe, On efface l'archive
+ if (fileArchive.exists())
+ {
+ log("delete :"+dir+"/"+nameFile,Project.MSG_VERBOSE);
+ fileArchive.delete();
+ }
+
+ if (logExtract) {
+ //Un autre ls, et on fait un diff pour recuperer les fichiers generes!
+
+ Vector<FileDesc> lsAfter = new Vector<FileDesc>();
+ BiomajUtils.getListFilesFromDir(dirT.getAbsolutePath(),lsAfter);
+ log(Integer.valueOf(count)+":"+nameFile +" ok",Project.MSG_VERBOSE);
+ Vector<String> listNewFile = getDiffListing(lsBefore,lsAfter);
+ listNewFile.remove(new File(dirT.getAbsolutePath()+"/"+nameFile).getAbsolutePath());
+
+ for (int i=0 ; i<listNewFile.size() ; i++) {
+ addExtractFile(listNewFile.get(i),hash);
+ }
+ }
+ }
+ }
+ log("ok",Project.MSG_INFO);
+
+ } catch (FileNotFoundException e) {
+ System.out.println(e.getMessage());
+ throw new BiomajBuildException(getProject(),e);
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+ /**
+ * @param dir the dir to set
+ * @uml.property name="dir"
+ */
+ public void setDir(String dir) {
+ this.dir = dir;
+ }
+
+
+
+ public void setFailonerror(String failonerror) {
+ if ((failonerror.trim().compareTo("true")==0)||
+ (failonerror.trim().compareTo("on")==0)||
+ (failonerror.trim().compareTo("yes")==0))
+ continueOnError=false;
+ }
+
+
+
+
+ /**
+ * @param includesfile the includesfile to set
+ * @uml.property name="includesfile"
+ */
+ public void setIncludesfile(String includesfile) {
+ this.includesfile = includesfile;
+ }
+
+ /**
+// * get a name file without extension if this has been uncompressed
+ * @param dir
+ * @param nameFile
+ * @param t
+ * @return
+ */
+
+ public static String uncompressedFile(String dir, String nameFile,Task t) throws BiomajException {
+ String exe;
+ try {
+ exe = BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_BIN);
+ if (exe==null || exe.compareTo("")==0)
+ {
+ t.log("Unable to find binary file extraction for ["+nameFile+"]",Project.MSG_WARN);
+ t.log("Check the general.conf or define a new case of extraction.",Project.MSG_WARN);
+ return nameFile ;
+ }
+ } catch (BiomajException e) {
+ //Pas reconnu en tant que fichier compresse
+ return nameFile;
+ }
+
+ String option_decomp = BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_DECOMP);
+ String option_output = BiomajInformation.getInstance().getUncompressedOptionWithFile(nameFile,BiomajInformation.OPTION_OUTPUT);
+
+
+ Commandline cmd = new Commandline();
+ cmd.setExecutable(exe);
+ if (option_decomp != null)
+ cmd.createArgument().setValue(option_decomp);
+ cmd.createArgument().setValue(dir+"/"+nameFile);
+
+ if (option_output!=null) {
+ cmd.createArgument().setValue(option_output);
+ cmd.createArgument().setValue(getTargetDirectory(dir,nameFile));
+ }
+
+ Execute execute = new Execute(new LogStreamHandler(t, Project.MSG_VERBOSE,Project.MSG_ERR),null);
+
+ t.log("extracting:"+dir+"/"+nameFile,Project.MSG_VERBOSE);
+ execute.setCommandline(cmd.getCommandline());
+ try {
+ execute.execute();
+ } catch (IOException ioe) {
+ t.log("i/o error:"+ioe.getMessage(),Project.MSG_ERR);
+ return nameFile;
+ }
+ int code_retour = execute.getExitValue();
+
+ if (code_retour!=0) {
+ for (String s : execute.getCommandline())
+ t.log(s,Project.MSG_ERR);
+
+ t.log("file:"+dir+"/"+nameFile,Project.MSG_ERR);
+ t.log("code retour:"+code_retour,Project.MSG_ERR);
+ throw new BiomajException("bmajExtract.error.file",nameFile);
+ }
+
+ String newName = removeExtension(nameFile);
+
+ if (nameFile.compareTo(newName)==0) {
+ throw new BiomajBuildException(t.getProject(),"bmajExtract.error.format",nameFile,new Exception());
+ }
+
+ t.log("uncompressed file ok :"+nameFile,Project.MSG_DEBUG);
+
+ return newName;
+ }
+
+ public static boolean containsCompressedFormat(String nameFile) throws BiomajException {
+ if (nameFile == null)
+ return false;
+
+ return nameFile.compareTo(BiomajInformation.getInstance().getUncompressedName(nameFile)) != 0;
+ }
+
+ public static boolean check(File f,Task t) throws BiomajException {
+ try {
+ Commandline cmd = new Commandline();
+ cmd.setExecutable(BiomajInformation.getInstance().getUncompressedOptionWithFile(f.getName(),BiomajInformation.OPTION_BIN));
+ String option_test = BiomajInformation.getInstance().getUncompressedOptionWithFile(f.getName(),BiomajInformation.OPTION_TEST) ;
+
+ if (option_test == null) {
+ t.log("Test archive:"+f.getAbsolutePath(),Project.MSG_VERBOSE);
+ t.log("Option test is not define for binary :"+cmd.getExecutable(),Project.MSG_VERBOSE);
+ t.log("No test have been executed! --->true",Project.MSG_VERBOSE);
+ return true;
+ }
+
+ cmd.createArgument().setValue(option_test);
+ cmd.createArgument().setValue(f.getAbsolutePath());
+
+ Execute execute = new Execute(new LogStreamHandler(t, Project.MSG_VERBOSE,Project.MSG_ERR),null);
+
+ t.log("Test archive:"+f.getAbsolutePath(),Project.MSG_VERBOSE);
+ execute.setCommandline(cmd.getCommandline());
+ execute.execute();
+ int code_retour = execute.getExitValue();
+ //not in gzip format code=1!
+ if (code_retour!=0) {
+ t.log("exec:"+cmd.getExecutable(),Project.MSG_WARN);
+ t.log("opt:",Project.MSG_WARN);
+ for (String opt : cmd.getArguments())
+ t.log(" "+opt,Project.MSG_WARN);
+ t.log("file:"+f.getAbsolutePath(),Project.MSG_WARN);
+ t.log("code:"+code_retour,Project.MSG_WARN);
+ return false;
+ }
+
+ } catch (FileNotFoundException fnfe) {
+ BiomajLogger.getInstance().log(fnfe);
+ throw new BiomajBuildException(t.getProject(),fnfe);
+ } catch (IOException ioe) {
+ throw new BiomajBuildException(t.getProject(),ioe);
+ }
+
+ return true;
+ }
+
+ public static String removeExtension(String nameFile) throws BiomajException {
+ return BiomajInformation.getInstance().getUncompressedName(nameFile);
+
+ }
+
+
+ protected Vector<String> getDiffListing(Vector<FileDesc> lsBefore,Vector<FileDesc> lsNext) {
+ Vector<String> result = new Vector<String>();
+
+ for (int i=0 ; i<lsBefore.size() ; i++) {
+ boolean estPresent = false;
+ for (int j=0 ; j<lsNext.size() ; j++) {
+ estPresent = estPresent || (lsBefore.get(i).getLocation().compareTo(lsNext.get(j).getLocation())==0);
+ }
+ if (!estPresent)
+ result.add(lsBefore.get(i).getLocation());
+ }
+
+ for (int i=0 ; i<lsNext.size(); i++) {
+ boolean estPresent = false;
+ for (int j=0 ; j<lsBefore.size() ; j++) {
+ estPresent = estPresent || (lsNext.get(i).getLocation().compareTo(lsBefore.get(j).getLocation())==0);
+ }
+
+ if ((!result.contains(lsNext.get(i).getLocation()))&&(!estPresent))
+ result.add(lsNext.get(i).getLocation());
+ }
+ return result;
+ }
+
+
+ protected static String getTargetDirectory(String base,String absName) {
+
+ if (!absName.contains("/")) {
+ return base;
+ } else {
+ int index = absName.lastIndexOf("/");
+ return base+"/"+absName.substring(0, index);
+ }
+
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajGetRelativePath.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajGetRelativePath.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajGetRelativePath.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,159 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+public class BmajGetRelativePath extends Task {
+
+ /**
+ * @uml.property name="absolutePath"
+ */
+ private String absolutePath;
+ /**
+ * @uml.property name="fromPath"
+ */
+ private String fromPath;
+ /**
+ * @uml.property name="relativPath"
+ */
+ private String relativPath;
+ /**
+ * Find a relativ path from a reference directory,
+ * otherwise get the absoltue path from origine
+ */
+ @Override
+ public void execute() throws BuildException {
+
+ File from = new File(fromPath);
+ File abs = new File(absolutePath);
+
+ if (!from.exists())
+ throw new BiomajBuildException(getProject(),"bmajGetRelativePath.error.file",from.getAbsolutePath(),new Exception());
+ if (!abs.exists())
+ throw new BiomajBuildException(getProject(),"bmajGetRelativePath.error.file",abs.getAbsolutePath(),new Exception());
+
+ log("reference directory to calculate relative path:"+from.getAbsolutePath(),Project.MSG_VERBOSE);
+ log("absolute directory to transforme:"+abs.getAbsolutePath(),Project.MSG_VERBOSE);
+
+ String[] base = from.getAbsolutePath().split("/");
+ String[] baseAbs = abs.getAbsolutePath().split("/");
+
+ int i=0;
+ while ((i<base.length)&&(i<baseAbs.length)&&(base[i].compareTo(baseAbs[i])==0))
+ i++;
+
+ String res="";
+ //ex : from:/toto/tata abs:/toto/tata/titi
+ if (i>=base.length) {
+ res = "./";
+ for(int j=i;j<baseAbs.length;j++)
+ res+=baseAbs[j]+"/";
+ } else {
+ res="";
+ //sinon ex from:/toto/tata/titi abs:/toto/tata/tutu/tete
+ for (int j=i;j<base.length;j++){
+ res+="../";
+ }
+
+ for (int j=i;j<baseAbs.length;j++){
+ res+=baseAbs[j]+"/";
+ }
+ }
+ log("relative path:"+res,Project.MSG_VERBOSE);
+ getProject().setProperty(relativPath,res);
+ return;
+ }
+
+ /**
+ * @return the absolutePath
+ * @uml.property name="absolutePath"
+ */
+ public String getAbsolutePath() {
+ return absolutePath;
+ }
+
+ /**
+ * @param absolutePath the absolutePath to set
+ * @uml.property name="absolutePath"
+ */
+ public void setAbsolutePath(String absolutePath) {
+ this.absolutePath = absolutePath;
+ }
+
+ /**
+ * @return the fromPath
+ * @uml.property name="fromPath"
+ */
+ public String getFromPath() {
+ return fromPath;
+ }
+
+ /**
+ * @param fromPath the fromPath to set
+ * @uml.property name="fromPath"
+ */
+ public void setFromPath(String fromPath) {
+ this.fromPath = fromPath;
+ }
+
+ /**
+ * @return the relativPath
+ * @uml.property name="relativPath"
+ */
+ public String getRelativPath() {
+ return relativPath;
+ }
+
+ /**
+ * @param relativPath the relativPath to set
+ * @uml.property name="relativPath"
+ */
+ public void setRelativPath(String relativPath) {
+ this.relativPath = relativPath;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajLink.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajLink.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajLink.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,152 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+
+import java.io.File;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+public class BmajLink extends Task {
+
+ /**
+ * Target directory where link have to generate.
+ * @uml.property name="todir"
+ */
+ private String todir ;
+
+ /** FileSet to filter files*/
+
+ private Vector<FileSet> fileSets;
+
+ /**
+ * Constructor
+ *
+ */
+ public BmajLink() {
+ fileSets = new Vector<FileSet>();
+ }
+ /**
+ * <p>Main task methode. This methode generate links and subdirectories from a directory specified by todir</p>
+ * @throws org.apache.tools.ant.BuildException If an Ant build exception is encountered.
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ @Override
+ public void execute () throws BuildException
+ {
+ try
+ {
+ // each line is read
+ for (FileSet fs : fileSets)
+ {
+ DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+ //file to link
+ String[] f = ds.getIncludedFiles();
+ log("remotedirectory:"+ds.getBasedir().toString(),Project.MSG_VERBOSE);
+ String remoteDirectory = ds.getBasedir().toString();
+ for (int i=0;i<f.length;i++) {
+ log("file "+Integer.toString(i)+":"+f[i],Project.MSG_VERBOSE);
+ createDirectoryNeeded(f[i]);
+ Runtime.getRuntime().exec("ln -s "+remoteDirectory+"/"+f[i]+" "+todir+"/"+"/"+f[i]);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+ /**
+ * Generate directory inside pathAndFileName in target directory
+ * @param pathAndFileName relative path and filename
+ */
+ protected void createDirectoryNeeded (String pathAndFileName) {
+ //If there are no directory to create
+ if (!pathAndFileName.contains("/"))
+ return;
+ log("Create directories to link :"+pathAndFileName,Project.MSG_VERBOSE);
+ String[] directorySet = pathAndFileName.split("/");
+ String currentDirectoryToCreate=todir+"/";
+ //The last element is a file name
+ for (int i=0;i<directorySet.length-1;i++) {
+ currentDirectoryToCreate = currentDirectoryToCreate+directorySet[i]+"/";
+ log("mkdir directory:"+currentDirectoryToCreate,Project.MSG_VERBOSE);
+ File directoryToCreate = new File(currentDirectoryToCreate);
+ directoryToCreate.mkdir();
+
+ }
+
+ }
+
+ /**
+ * Add a set of files (nested fileset attribute)
+ */
+ public void addFileSet(FileSet set) {
+ // Add the fileSet Object to the instance variable
+ // fileSets, a vector of FileSets Object
+ fileSets.add(set);
+ }
+
+
+ /**
+ * @return the todir
+ * @uml.property name="todir"
+ */
+ public String getTodir() {
+ return todir;
+ }
+
+
+ /**
+ * @param todir the todir to set
+ * @uml.property name="todir"
+ */
+ public void setTodir(String todir) {
+ this.todir = todir;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajMove.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajMove.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajMove.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,201 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.FileSet;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.logger.DBWriter;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+public class BmajMove extends BmajTask {
+
+ public static final String MODE_COPY = "copy";
+ public static final String MODE_MOVE = "move";
+
+ private Vector<FileSet> vFilesSet = new Vector<FileSet>();
+ /**
+ * @uml.property name="mode"
+ */
+ private String mode ;
+ /**
+ * @uml.property name="toDir"
+ */
+ private String toDir;
+
+ private String taskId;
+
+ @Override
+ public void execute() throws BuildException {
+
+ File targetDirectory = new File (toDir);
+
+ if (!targetDirectory.exists())
+ throw new BiomajBuildException(getProject(),"bmajmove.todir.not.exist",toDir,new Exception());
+
+ for (FileSet fileset : vFilesSet) {
+ if (MODE_COPY.compareTo(mode)==0)
+ execute_copy(fileset);
+ else if (MODE_MOVE.compareTo(mode)==0)
+ execute_move(fileset);
+ else
+ throw new BiomajBuildException(getProject(),"bmajmove.unknow.mode",mode,new Exception());
+ }
+
+ }
+
+ /**
+ *
+ * @param fileset
+ * @throws BuildException
+ */
+ public void execute_copy(FileSet fileset) throws BuildException {
+ String[] files = fileset.getDirectoryScanner(getProject()).getIncludedFiles();
+ boolean logFiles = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+ int count = 0;
+ for (int i=0;i<files.length;i++) {
+ try {
+ float a = ((float)++count/ (float)files.length)*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ log("COPY:"+BiomajUtils.getOfflineDirectory(getProject())+"/"+files[i]+" to "+toDir,Project.MSG_VERBOSE);
+ File tempFile = new File(BiomajUtils.getOfflineDirectory(getProject())+"/"+files[i]);
+ File targetFile = new File(toDir+"/"+files[i]);
+ BiomajUtils.copy(tempFile, targetFile);
+ tempFile.delete();
+ if (logFiles)
+ addProductionFile(targetFile.getCanonicalPath(),true);
+ } catch (IOException ioe) {
+ System.out.println("######"+ioe);
+ throw new BiomajBuildException(getProject(),"io.error",ioe.getMessage(),ioe);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(getProject(),be);
+ }
+ }
+
+ }
+ /**
+ *
+ * @param fileset
+ * @throws BuildException
+ */
+ public void execute_move(FileSet fileset) throws BuildException {
+ String[] files = fileset.getDirectoryScanner(getProject()).getIncludedFiles();
+ boolean logFiles = Boolean.valueOf(getProject().getProperty(BiomajConst.logFilesProperty));
+ int count = 0;
+ for (int i=0;i<files.length;i++) {
+ try {
+ float a = ((float)++count/ (float)files.length)*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ //log("["+count+"]",Project.MSG_INFO);
+
+ log("MOVE:"+BiomajUtils.getOfflineDirectory(getProject())+"/"+files[i]+" to "+toDir,Project.MSG_VERBOSE);
+ File tempFile = new File(BiomajUtils.getOfflineDirectory(getProject())+"/"+files[i]);
+ File targetFile = new File(toDir+"/"+files[i]);
+ BiomajUtils.createSubDirectories(BiomajUtils.getRelativeDirectory(targetFile.getAbsolutePath()));
+ tempFile.renameTo(targetFile);
+ if (logFiles)
+ addProductionFile(targetFile.getCanonicalPath(), false);
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(getProject(),be);
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+ }
+
+ private void addFileInDB(int taskId, File file) {
+ try {
+ FileDesc fd = new FileDesc(file.getCanonicalFile(), false);
+ DBWriter.addFileToTask(fd, taskId, "file");
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * @param mode the mode to set
+ * @uml.property name="mode"
+ */
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+
+ public void addConfiguredFileSet(FileSet fileset) {
+ vFilesSet.add(fileset);
+ }
+
+ /**
+ * @return the toDir
+ * @uml.property name="toDir"
+ */
+ public String getToDir() {
+ return toDir;
+ }
+
+ /**
+ * @param toDir the toDir to set
+ * @uml.property name="toDir"
+ */
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajSymlink.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajSymlink.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajSymlink.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,648 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+/*
+ * Since the initial version of this file was developed on the clock on
+ * an NSF grant I should say the following boilerplate:
+ *
+ * This material is based upon work supported by the National Science
+ * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and
+ * conclusions or recommendations expressed in this material are those
+ * of the author and do not necessarily reflect the views of the
+ * National Science Foundation.
+ */
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileNotFoundException;
+
+import java.util.Vector;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.dispatch.DispatchTask;
+import org.apache.tools.ant.dispatch.DispatchUtils;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.util.FileUtils;
+
+/**
+ * Creates, Deletes, Records and Restores Symlinks.
+ *
+ * <p>
+ * This task performs several related operations. In the most trivial and
+ * default usage, it creates a link specified in the link attribute to a
+ * resource specified in the resource attribute. The second usage of this task
+ * is to traverse a directory structure specified by a fileset, and write a
+ * properties file in each included directory describing the links found in that
+ * directory. The third usage is to traverse a directory structure specified by
+ * a fileset, looking for properties files (also specified as included in the
+ * fileset) and recreate the links that have been previously recorded for each
+ * directory. Finally, it can be used to remove a symlink without deleting the
+ * associated resource.
+ *
+ * <p>
+ * Usage examples:
+ *
+ * <p>
+ * Make a link named "foo" to a resource named "bar.foo" in
+ * subdir:
+ *
+ * <pre>
+ * <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/>
+ * </pre>
+ *
+ * <p>
+ * Record all links in subdir and its descendants in files named
+ * "dir.links":
+ *
+ * <pre>
+ * <symlink action="record" linkfilename="dir.links">
+ * <fileset dir="${dir.top}" includes="subdir/**" />
+ * </symlink>
+ * </pre>
+ *
+ * <p>
+ * Recreate the links recorded in the previous example:
+ *
+ * <pre>
+ * <symlink action="recreate">
+ * <fileset dir="${dir.top}" includes="subdir/**/dir.links" />
+ * </symlink>
+ * </pre>
+ *
+ * <p>
+ * Delete a link named "foo" to a resource named "bar.foo"
+ * in subdir:
+ *
+ * <pre>
+ * <symlink action="delete" link="${dir.top}/foo"/>
+ * </pre>
+ *
+ * <p>
+ * <strong>LIMITATIONS:</strong> Because Java has no direct support for handling
+ * symlinks this task divines them by comparing canonical and absolute paths. On
+ * non-unix systems this may cause false positives. Furthermore, any operating
+ * system on which the command <code>ln -s link resource</code> is not a valid
+ * command on the command line will not be able to use
+ * action="delete", action="single" or
+ * action="recreate", but action="record" should still work.
+ * Finally, the lack of support for symlinks in Java means that all links are
+ * recorded as links to the <strong>canonical</strong> resource name. Therefore
+ * the link: <code>link --> subdir/dir/../foo.bar</code> will be recorded as
+ * <code>link=subdir/foo.bar</code> and restored as
+ * <code>link --> subdir/foo.bar</code>.
+ *
+ */
+public class BmajSymlink extends DispatchTask {
+ private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+
+ private String resource;
+ private String link;
+ private Vector fileSets = new Vector();
+ private String linkFileName;
+ private boolean overwrite;
+ private boolean failonerror;
+ private boolean executing = false;
+
+ /**
+ * Initialize the task.
+ *
+ * @throws BuildException
+ * on error.
+ */
+ public void init() throws BuildException {
+ super.init();
+ setDefaults();
+ }
+
+ /**
+ * The standard method for executing any task.
+ *
+ * @throws BuildException
+ * on error.
+ */
+ public synchronized void execute() throws BuildException {
+ if (executing) {
+ throw new BuildException(
+ "Infinite recursion detected in Symlink.execute()");
+ }
+ try {
+ executing = true;
+ DispatchUtils.execute(this);
+ } finally {
+ executing = false;
+ }
+ }
+
+ /**
+ * Create a symlink.
+ *
+ * @throws BuildException
+ * on error.
+ * @since Ant 1.7
+ */
+ public void single() throws BuildException {
+ try {
+ if (resource == null) {
+ handleError("Must define the resource to symlink to!");
+ return;
+ }
+ if (link == null) {
+ handleError("Must define the link name for symlink!");
+ return;
+ }
+ doLink(resource, link);
+ } finally {
+ setDefaults();
+ }
+ }
+
+ /**
+ * Delete a symlink.
+ *
+ * @throws BuildException
+ * on error.
+ * @since Ant 1.7
+ */
+ public void delete() throws BuildException {
+ try {
+ if (link == null) {
+ handleError("Must define the link name for symlink!");
+ return;
+ }
+ log("Removing symlink: " + link);
+ deleteSymlink(link);
+ } catch (FileNotFoundException fnfe) {
+ handleError(fnfe.toString());
+ } catch (IOException ioe) {
+ handleError(ioe.toString());
+ } finally {
+ setDefaults();
+ }
+ }
+
+ /**
+ * Restore symlinks.
+ *
+ * @throws BuildException
+ * on error.
+ * @since Ant 1.7
+ */
+ public void recreate() throws BuildException {
+ try {
+ if (fileSets.isEmpty()) {
+ handleError("File set identifying link file(s) "
+ + "required for action recreate");
+ return;
+ }
+ Properties links = loadLinks(fileSets);
+
+ for (Iterator kitr = links.keySet().iterator(); kitr.hasNext();) {
+ String lnk = (String) kitr.next();
+ String res = links.getProperty(lnk);
+ // handle the case where lnk points to a directory (bug 25181)
+ try {
+ File test = new File(lnk);
+ if (!FILE_UTILS.isSymbolicLink(null, lnk)) {
+ doLink(res, lnk);
+ } else if (!test.getCanonicalPath().equals(
+ new File(res).getCanonicalPath())) {
+ deleteSymlink(lnk);
+ doLink(res, lnk);
+ } // else lnk exists, do nothing
+ } catch (IOException ioe) {
+ handleError("IO exception while creating link");
+ }
+ }
+ } finally {
+ setDefaults();
+ }
+ }
+
+ /**
+ * Record symlinks.
+ *
+ * @throws BuildException
+ * on error.
+ * @since Ant 1.7
+ */
+ public void record() throws BuildException {
+ try {
+ if (fileSets.isEmpty()) {
+ handleError("Fileset identifying links to record required");
+ return;
+ }
+ if (linkFileName == null) {
+ handleError("Name of file to record links in required");
+ return;
+ }
+ // create a hashtable to group them by parent directory:
+ Hashtable byDir = new Hashtable();
+
+ // get an Iterator of file objects representing links (canonical):
+ for (Iterator litr = findLinks(fileSets).iterator(); litr.hasNext();) {
+ File thisLink = (File) litr.next();
+ File parent = thisLink.getParentFile();
+ Vector v = (Vector) byDir.get(parent);
+ if (v == null) {
+ v = new Vector();
+ byDir.put(parent, v);
+ }
+ v.addElement(thisLink);
+ }
+ // write a Properties file in each directory:
+ for (Iterator dirs = byDir.keySet().iterator(); dirs.hasNext();) {
+ File dir = (File) dirs.next();
+ Vector linksInDir = (Vector) byDir.get(dir);
+ Properties linksToStore = new Properties();
+
+ // fill up a Properties object with link and resource names:
+ for (Iterator dlnk = linksInDir.iterator(); dlnk.hasNext();) {
+ File lnk = (File) dlnk.next();
+ try {
+ linksToStore.put(lnk.getName(), lnk.getCanonicalPath());
+ } catch (IOException ioe) {
+ handleError("Couldn't get canonical name of parent link");
+ }
+ }
+ writePropertyFile(linksToStore, dir);
+ }
+ } finally {
+ setDefaults();
+ }
+ }
+
+ /**
+ * Return all variables to their default state for the next invocation.
+ *
+ * @since Ant 1.7
+ */
+ private void setDefaults() {
+ resource = null;
+ link = null;
+ linkFileName = null;
+ failonerror = true; // default behavior is to fail on an error
+ overwrite = false; // default behavior is to not overwrite
+ setAction("single"); // default behavior is make a single link
+ fileSets.clear();
+ }
+
+ /**
+ * Set overwrite mode. If set to false (default) the task will not overwrite
+ * existing links, and may stop the build if a link already exists depending
+ * on the setting of failonerror.
+ *
+ * @param owrite
+ * If true overwrite existing links.
+ */
+ public void setOverwrite(boolean owrite) {
+ this.overwrite = owrite;
+ }
+
+ /**
+ * Set failonerror mode. If set to true (default) the entire build fails
+ * upon error; otherwise the error is logged and the build will continue.
+ *
+ * @param foe
+ * If true throw BuildException on error, else log it.
+ */
+ public void setFailOnError(boolean foe) {
+ this.failonerror = foe;
+ }
+
+ /**
+ * Set the action to be performed. May be "single",
+ * "delete", "recreate" or "record".
+ *
+ * @param action
+ * The action to perform.
+ */
+ public void setAction(String action) {
+ super.setAction(action);
+ }
+
+ /**
+ * Set the name of the link. Used when action = "single".
+ *
+ * @param lnk
+ * The name for the link.
+ */
+ public void setLink(String lnk) {
+ this.link = lnk;
+ }
+
+ /**
+ * Set the name of the resource to which a link should be created. Used when
+ * action = "single".
+ *
+ * @param src
+ * The resource to be linked.
+ */
+ public void setResource(String src) {
+ this.resource = src;
+ }
+
+ /**
+ * Set the name of the file to which links will be written. Used when action
+ * = "record".
+ *
+ * @param lf
+ * The name of the file to write links to.
+ */
+ public void setLinkfilename(String lf) {
+ this.linkFileName = lf;
+ }
+
+ /**
+ * Add a fileset to this task.
+ *
+ * @param set
+ * The fileset to add.
+ */
+ public void addFileset(FileSet set) {
+ fileSets.addElement(set);
+ }
+
+ /**
+ * Delete a symlink (without deleting the associated resource).
+ *
+ * <p>
+ * This is a convenience method that simply invokes
+ * <code>deleteSymlink(java.io.File)</code>.
+ *
+ * @param path
+ * A string containing the path of the symlink to delete.
+ *
+ * @throws FileNotFoundException
+ * When the path results in a <code>File</code> that doesn't
+ * exist.
+ * @throws IOException
+ * If calls to <code>File.rename</code> or
+ * <code>File.delete</code> fail.
+ */
+ public static void deleteSymlink(String path) throws IOException,
+ FileNotFoundException {
+ deleteSymlink(new File(path));
+ }
+
+ /**
+ * Delete a symlink (without deleting the associated resource).
+ *
+ * <p>
+ * This is a utility method that removes a unix symlink without removing the
+ * resource that the symlink points to. If it is accidentally invoked on a
+ * real file, the real file will not be harmed, but an exception will be
+ * thrown when the deletion is attempted. This method works by getting the
+ * canonical path of the link, using the canonical path to rename the
+ * resource (breaking the link) and then deleting the link. The resource is
+ * then returned to its original name inside a finally block to ensure that
+ * the resource is unharmed even in the event of an exception.
+ *
+ * @param linkfil
+ * A <code>File</code> object of the symlink to delete.
+ *
+ * @throws FileNotFoundException
+ * When the path results in a <code>File</code> that doesn't
+ * exist.
+ * @throws IOException
+ * If calls to <code>File.rename</code>,
+ * <code>File.delete</code> or
+ * <code>File.getCanonicalPath</code> fail.
+ */
+ public static void deleteSymlink(File linkfil) throws IOException,
+ FileNotFoundException {
+ if (!linkfil.exists()) {
+ throw new FileNotFoundException("No such symlink: " + linkfil);
+ }
+ // find the resource of the existing link:
+ File canfil = linkfil.getCanonicalFile();
+
+ // rename the resource, thus breaking the link:
+ File temp = FILE_UTILS.createTempFile("symlink", ".tmp", canfil
+ .getParentFile());
+ try {
+ try {
+ FILE_UTILS.rename(canfil, temp);
+ } catch (IOException e) {
+ throw new IOException(
+ "Couldn't rename resource when attempting to delete "
+ + linkfil);
+ }
+ // delete the (now) broken link:
+ if (!linkfil.delete()) {
+ throw new IOException("Couldn't delete symlink: " + linkfil
+ + " (was it a real file? is this not a UNIX system?)");
+ }
+ } finally {
+ // return the resource to its original name:
+ try {
+ FILE_UTILS.rename(temp, canfil);
+ } catch (IOException e) {
+ throw new IOException("Couldn't return resource " + temp
+ + " to its original name: " + canfil.getAbsolutePath()
+ + "\n THE RESOURCE'S NAME ON DISK HAS "
+ + "BEEN CHANGED BY THIS ERROR!\n");
+ }
+ }
+ }
+
+ /**
+ * Write a properties file. This method uses <code>Properties.store</code>
+ * and thus may throw exceptions that occur while writing the file.
+ *
+ * @param properties
+ * The properties object to be written.
+ * @param dir
+ * The directory for which we are writing the links.
+ */
+ private void writePropertyFile(Properties properties, File dir)
+ throws BuildException {
+ BufferedOutputStream bos = null;
+ try {
+ bos = new BufferedOutputStream(new FileOutputStream(new File(dir,
+ linkFileName)));
+ properties.store(bos, "Symlinks from " + dir);
+ } catch (IOException ioe) {
+ throw new BuildException(ioe, getLocation());
+ } finally {
+ FileUtils.close(bos);
+ }
+ }
+
+ /**
+ * Handle errors based on the setting of failonerror.
+ *
+ * @param msg
+ * The message to log, or include in the
+ * <code>BuildException</code>.
+ */
+ private void handleError(String msg) {
+ if (failonerror) {
+ throw new BuildException(msg);
+ }
+ log(msg);
+ }
+
+ /**
+ * Conduct the actual construction of a link.
+ *
+ * <p>
+ * The link is constructed by calling <code>Execute.runCommand</code>.
+ *
+ * @param res
+ * The path of the resource we are linking to.
+ * @param lnk
+ * The name of the link we wish to make.
+ */
+ private void doLink(String res, String lnk) throws BuildException {
+ File linkfil = new File(lnk);
+ if (overwrite && linkfil.exists()) {
+ try {
+ deleteSymlink(linkfil);
+ } catch (FileNotFoundException fnfe) {
+ handleError("Symlink disappeared before it was deleted: " + lnk);
+ } catch (IOException ioe) {
+ handleError("Unable to overwrite preexisting link: " + lnk);
+ }
+ }
+ String[] cmd = new String[] { "ln", "-s", res, lnk };
+ log(Commandline.toString(cmd));
+ Execute.runCommand(this, cmd);
+ }
+
+ /**
+ * Find all the links in all supplied filesets.
+ *
+ * <p>
+ * This method is invoked when the action attribute is "record".
+ * This means that filesets are interpreted as the directories in which
+ * links may be found.
+ *
+ * @param v
+ * The filesets specified by the user.
+ * @return A HashSet of <code>File</code> objects containing the links (with
+ * canonical parent directories).
+ */
+ private HashSet findLinks(Vector v) {
+ HashSet result = new HashSet();
+ for (int i = 0; i < v.size(); i++) {
+ FileSet fs = (FileSet) v.get(i);
+ DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+ String[][] fnd = new String[][] { ds.getIncludedFiles(),
+ ds.getIncludedDirectories() };
+ File dir = fs.getDir(getProject());
+ for (int j = 0; j < fnd.length; j++) {
+ for (int k = 0; k < fnd[j].length; k++) {
+ try {
+ File f = new File(dir, fnd[j][k]);
+ File pf = f.getParentFile();
+ String name = f.getName();
+ if (FILE_UTILS.isSymbolicLink(pf, name)) {
+ result.add(new File(pf.getCanonicalFile(), name));
+ }
+ } catch (IOException e) {
+ handleError("IOException: " + fnd[j][k] + " omitted");
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Load links from properties files included in one or more FileSets.
+ *
+ * <p>
+ * This method is only invoked when the action attribute is set to
+ * "recreate". The filesets passed in are assumed to specify the
+ * names of the property files with the link information and the
+ * subdirectories in which to look for them.
+ *
+ * @param v
+ * The <code>FileSet</code>s for this task.
+ * @return The links to be made.
+ */
+ private Properties loadLinks(Vector v) {
+ Properties finalList = new Properties();
+ // loop through the supplied file sets:
+ for (int i = 0; i < v.size(); i++) {
+ FileSet fs = (FileSet) v.elementAt(i);
+ DirectoryScanner ds = new DirectoryScanner();
+ fs.setupDirectoryScanner(ds, getProject());
+ ds.setFollowSymlinks(false);
+ ds.scan();
+ String[] incs = ds.getIncludedFiles();
+ File dir = fs.getDir(getProject());
+
+ // load included files as properties files:
+ for (int j = 0; j < incs.length; j++) {
+ File inc = new File(dir, incs[j]);
+ File pf = inc.getParentFile();
+ Properties lnks = new Properties();
+ BufferedInputStream br = null;
+ try {
+ br = new BufferedInputStream(new FileInputStream(inc));
+ lnks.load(br);
+ pf = pf.getCanonicalFile();
+ } catch (FileNotFoundException fnfe) {
+ handleError("Unable to find " + incs[j] + "; skipping it.");
+ continue;
+ } catch (IOException ioe) {
+ handleError("Unable to open " + incs[j]
+ + " or its parent dir; skipping it.");
+ continue;
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ lnks.list(new PrintStream(new LogOutputStream(this,
+ Project.MSG_INFO)));
+ // Write the contents to our master list of links
+ // This method assumes that all links are defined in
+ // terms of absolute paths, or paths relative to the
+ // working directory:
+ for (Iterator kitr = lnks.keySet().iterator(); kitr.hasNext();) {
+ String key = (String) kitr.next();
+ finalList.put(new File(pf, key).getAbsolutePath(), lnks
+ .getProperty(key));
+ }
+ }
+ }
+ return finalList;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,143 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajConst;
+
+public class BmajTask extends Task {
+
+ /** STATIC VARIABLES DEFINED */
+ public static final String filterAddDownloadedFile = "__biomaj:download:";
+ public static final String regExpAddDownloadedFile = "(\\S+),(\\d+),(\\d+)";
+
+ public static final String filterAddLocalOfflineFile = "__biomaj:localOffline:";
+ public static final String regExpAddLocalOfflineFile ="(\\S+)";
+
+ public static final String filterAddLocalOnlineFile = "__biomaj:localOnline:";
+ public static final String regExpAddLocalOnlineFile ="(\\S+)";
+
+ public static final String filterAddExtractedFile = "__biomaj:extract:";
+ public static final String regExpAddExtractedFile = "(\\S+),(\\S+)";
+
+ public static final String filterAddProductionFile = "__biomaj:production:";
+ public static final String regExpAddProductionFile = "(\\S+),(\\S+)";
+
+ public static final String filterAddProcess = "__biomaj:addProcess:";
+ public static final String filterProcessTerminatedIsOk = "__biomaj:processTerminatedIsOk:";
+
+ /**
+ * Add production file in the log4j flow
+ * @param mode
+ * @param prodDir
+ * @param location
+ */
+ protected void addProductionFile(String location,boolean copy) {
+ log(filterAddProductionFile+location+","+Boolean.toString(copy),Project.MSG_DEBUG);
+ }
+
+ /**
+ * Add an extract file in log4j flow
+ * @param nameCompress
+ * @param hashCompressedFile
+ * @param nameUncompressed
+ */
+ protected void addExtractFile(String nameUncompressed,String refHash) {
+
+ String patternsExcluded = getProject().getProperty(BiomajConst.localFilesExcludedProperty) ;
+ String[] listPatternExcluded = patternsExcluded.split("\\s");
+ for (int i = 0; i<listPatternExcluded.length;i++)
+ {
+ Pattern p = Pattern.compile(listPatternExcluded[i]);
+ if (p.matcher(nameUncompressed).find()) {
+ getProject().log("file ["+nameUncompressed+"] matches with ["+listPatternExcluded[i]+"] (from property :"+BiomajConst.localFilesExcludedProperty+")",Project.MSG_WARN);
+ getProject().log("file ["+nameUncompressed+"] is excluding from the extract list.",Project.MSG_WARN);
+ return;
+ }
+ }
+
+ String valUncompressed = nameUncompressed;
+ log(filterAddExtractedFile+valUncompressed+","+refHash,Project.MSG_DEBUG);
+ }
+
+ /**
+ * Add a downloaded file in the log4j flow
+ * @param location
+ * @param timeOnServer
+ * @param sizeOnServer
+ */
+ public synchronized void addDownloadFile(String location,String timeOnServer,String sizeOnServer) {
+ String locationAbs = getProject().getProperty("offline.dir")+"/"+location;
+ log(filterAddDownloadedFile+locationAbs+","+timeOnServer+","+sizeOnServer,Project.MSG_DEBUG);
+ }
+
+ /**
+ * Add File find in offline directory
+ * @param location
+ * @param timeOnServer
+ * @param sizeOnServer
+ */
+ protected void addLocalOfflineFile(String location) {
+ log(filterAddLocalOfflineFile+location,Project.MSG_DEBUG);
+ }
+
+ /**
+ * Add File find in online directory
+ * @param location
+ * @param timeOnServer
+ * @param sizeOnServer
+ */
+ protected void addLocalOnlineFile(String location) {
+ log(filterAddLocalOnlineFile+location,Project.MSG_DEBUG);
+ }
+
+ @Override
+ public synchronized void log(String msg, int mode){
+ super.log(msg,mode);
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajVersionManagement.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajVersionManagement.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/BmajVersionManagement.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,678 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.List;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class BmajVersionManagement extends Task {
+
+ /** separator to create several directory with the same release*/
+ public final static String SEP_NUMBER_OF_RELEASE_VERSION = "__";
+ /** separator between bank name et release number */
+ public final static String SEP_RELEASE = "_";
+ /** Directory name where flat file are stored */
+ public final static String FLAT_DIRECTORY = "flat";
+
+ /** Internal Biomaj properties */
+ public final static String MODE = "mode_version_management";
+ public final static String RESULTS = "result_version_management";
+
+ /**
+ * Number of version to keep on database
+ * @uml.property name="nbVersion"
+ */
+ private String nbVersion;
+ /**
+ * Use in interne
+ * @uml.property name="numberVersion"
+ */
+ private int numberVersion;
+ /**
+ * Root of the specified database (where version are stored)
+ * @uml.property name="root"
+ */
+ private String root;
+ /**
+ * Remote release
+ * @uml.property name="release"
+ */
+ private String release;
+ /**
+ * Bank Name
+ * @uml.property name="bank"
+ */
+ private String bank;
+
+ /**
+ * directory where raw data are
+ * @uml.property name="flatDirectory"
+ */
+ private String flatDirectory;
+ /**
+ * directory where compute for post process
+ * @uml.property name="prodDirectory"
+ */
+ private String prodDirectory;
+
+ private String override = "true";
+
+ public final static String DELETE = "delete";
+ public final static String GET = "get";
+ public final static String CREATE = "create";
+ public final static String REBUILD = "rebuild";
+
+ /**
+ * CREATE or GET a directory version
+ * @uml.property name="mode"
+ */
+ private String mode;
+
+ @Override
+ public void execute() throws BuildException {
+
+ InputValidation.checkString(getProject(),bank, "name of bank.");
+ InputValidation.checkString(getProject(),mode, "create or get a directory version.");
+ InputValidation.checkString(getProject(),root, "root where version are stored.");
+
+ //Init properties
+ getProject().setProperty(MODE,mode);
+ getProject().setProperty(RESULTS,"NOT INITIALIZED");
+ if (mode.compareTo(GET)==0) {
+ InputValidation.checkString(getProject(),flatDirectory, "raw data directory");
+
+ String path = getLastDirectoryCreated() ;
+
+ log("online directory:"+path,Project.MSG_INFO);
+ getProject().setProperty(flatDirectory,path+"/"+FLAT_DIRECTORY);
+ getProject().setProperty(prodDirectory,path);
+
+ } else if (mode.compareTo(CREATE)==0) {
+ InputValidation.checkString(getProject(),flatDirectory, "raw date directory");
+ InputValidation.checkString(getProject(),release, "need release to create a directory!");
+
+ File newDirectory = createNextDirectoryVersion();
+ File flatDir = new File(newDirectory.getAbsolutePath()+"/"+FLAT_DIRECTORY);
+
+ if (!flatDir.exists())
+ flatDir.mkdir();
+ else if (override.equals("true"))
+ flatDir.mkdir();
+
+ getProject().setProperty(flatDirectory,newDirectory.getAbsolutePath()+"/"+FLAT_DIRECTORY);
+ getProject().setProperty(prodDirectory,newDirectory.getAbsolutePath());
+ getProject().setProperty(RESULTS,newDirectory.getAbsolutePath());
+ log("new online directory:"+newDirectory.getAbsolutePath()+"/"+FLAT_DIRECTORY,Project.MSG_INFO);
+
+ } else if (mode.compareTo(DELETE)==0) {
+ InputValidation.checkString(getProject(),nbVersion, "number of version to keep on database.");
+ try {
+ numberVersion = Integer.valueOf(nbVersion) ;
+// Correction Bug OFI, nbVersion ne peut etre negatif !
+ if (numberVersion<0)
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.number",nbVersion,new Exception());
+
+ } catch (NumberFormatException ex) {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.number",nbVersion,ex);
+ }
+ deleteOldVersion();
+ } else if (mode.compareTo(REBUILD)==0) {
+
+ /*
+ * On doit supprimer le lien current et le mettre sur une ancienne version (si celle ci existe)
+ * le nouveau lien de la version en prod la plus recente devient future_release
+ */
+ rebuild();
+ } else {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.devl",new Exception());
+ }
+
+ }
+
+ /**
+ * Get a list of Version bank directory (WARNING if they are a current version (in construction from this session),this version is not include).
+ * This list is order with the date of directories
+ * @return
+ */
+ protected Vector<File> getDirectoriesVersions() {
+// try {
+// Vector<ProductionDirectory> lDir = BiomajQueryXmlStateFile.getAvailableDirectoriesProduction(bank);
+ List<ProductionDirectory> lDir = BiomajSQLQuerier.getAvailableProductionDirectories(bank);
+
+ if (lDir == null)
+ throw new BuildException("Can't get the last online directory from "+bank+".xml");
+
+
+ Vector<File> result = new Vector<File>();
+
+ while (lDir.size()>0) {
+ int youngest = 0;
+ for(int i=1;i<lDir.size();i++) {
+ if (lDir.get(i).getCreationDate().getTime()<lDir.get(youngest).getCreationDate().getTime())
+ youngest = i;
+ }
+ File dir = new File(lDir.get(youngest).getPath());
+ lDir.remove(youngest);
+ if (dir.exists()) {
+ result.add(dir);
+ }
+ }
+
+ return result;
+// } catch (BiomajException be) {
+// throw new BiomajBuildException(getProject(),be);
+// }
+ }
+
+ /**
+ *
+ * @return
+ */
+ protected String getNameNewDirectory() {
+ return (root+"/"+bank+SEP_RELEASE+release).replaceAll("/{2,}", "/");
+ }
+
+ /**
+ * True if a directory with the name of remote release exist!
+ * @param listVersionDirectories
+ * @return
+ */
+ protected boolean remoteReleaseExistOnLocalDatabase(Vector<File> listVersionDirectories) {
+
+ if (listVersionDirectories == null)
+ throw new BiomajBuildException(getProject(),new NullPointerException("listVersionDirectories"));
+
+ for (int i=0;i<listVersionDirectories.size();i++) {
+ String path = listVersionDirectories.get(i).getAbsolutePath();
+ Matcher m = Pattern.compile("(.*)(__\\d+)$").matcher(path);
+ if (m.find()) { // Ends with __<digit>
+ if (m.group(1).replaceAll("/{2,}", "/").equals(getNameNewDirectory()))
+ return true;
+ } else {
+ if (path.replaceAll("/{2,}", "/").equals(getNameNewDirectory()))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param directory local name of directory
+ */
+ protected void createDirectory(String directory) {
+ File dir = new File(root+"/"+directory);
+ if (dir.exists())
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.create.directory",dir.getAbsolutePath(),new Exception());
+
+ dir.mkdir();
+ }
+
+ /**
+ * Copy files and subdirectories from online citrina directory to a directory destination
+ *
+ */
+ protected void copy(String from, String to) {
+ log("copy from:"+from+" to:"+to,Project.MSG_INFO);
+ File fromDir = new File(from);
+
+ if (!fromDir.exists())
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.copy",from,new Exception());
+
+ File toDir = new File(to);
+
+ if (!toDir.exists())
+ toDir.mkdir();
+
+ File[] lFiles = fromDir.listFiles();
+ for (int i=0;i<lFiles.length;i++) {
+ if (lFiles[i].isFile()) {
+ File f = new File(to+"/"+lFiles[i].getName());
+ try {
+ f.createNewFile();
+ log("copy file:"+lFiles[i].getName(),Project.MSG_INFO);
+ BiomajUtils.copy(lFiles[i],f);
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ } else {
+ copy(lFiles[i].getAbsolutePath(),to+"/"+lFiles[i].getName());
+ }
+ }
+
+ }
+
+ /**
+ * Get the last number of release subdirectory creation
+ * if result is 0, there are only one directory created
+ * @param directories
+ * @return
+ */
+ protected Integer getLastNumberFromVersion(Vector<File> directories) {
+ Integer result = -1;
+ for (int i = 0; i < directories.size(); i++) {
+ String path = directories.get(i).getAbsolutePath().replaceAll("/{2,}", "/");
+ Matcher m = Pattern.compile("(.*)(__\\d+)$").matcher(path);
+ if (m.find()) {
+ int value = Integer.valueOf(m.group(2).substring(2));
+ if (result < value)
+ result = value;
+ } else if (result < 0) {
+ // Not found and was not found in another directory
+ result = 0;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Create the new subdirectory for a version :
+ * if the remote release exists, we create a subdirectory : BANK_NUMBER-RELEASE_N
+ * otherwise BANK_NUMBER-RELEASE is created!
+ */
+ protected File createNextDirectoryVersion() {
+ Vector<File> directoriesVersions = getDirectoriesVersions();
+ File f;
+ if (remoteReleaseExistOnLocalDatabase(directoriesVersions)){
+ Integer num = getLastNumberFromVersion(directoriesVersions);
+ if (num == -1)
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.directory.find",new Exception());
+
+ num++;
+ f = new File(getNameNewDirectory()+SEP_NUMBER_OF_RELEASE_VERSION+num.toString());
+ } else {
+ f = new File(getNameNewDirectory());
+ }
+
+ if (f.exists() && override.equals("true")) {
+ BiomajUtils.deleteAll(f);
+ }
+ f.mkdir();
+ createNextReleaseLink(f);
+ return f;
+ }
+
+ /**
+ * nbVersion = 0 ==> keep only one directory
+ * 1 ==> 2 directories etc...
+ *
+ */
+ protected void deleteOldVersion() {
+ String results = "";
+ Vector<File> lDir = getDirectoriesVersions();
+
+ getProject().log("versions found in prod dir ["+lDir.size()+"]",Project.MSG_VERBOSE);
+
+ for (File d : lDir) {
+ getProject().log("version ["+d.getAbsolutePath()+"]",Project.MSG_VERBOSE);
+ }
+
+ try {
+ BankFactory bf = new BankFactory();
+ BiomajBank bankToDelete = bf.createBank(bank, true);
+
+ while (lDir.size()>numberVersion+1)
+ {
+
+ BiomajUtils.deleteAll(lDir.get(0));
+ log(lDir.get(0).getAbsolutePath()+" is deleted",Project.MSG_INFO);
+ results+=lDir.get(0).getAbsolutePath()+",";
+ lDir.remove(0);
+ if ( bankToDelete != null ) {
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine currentWe ;
+ currentWe = wef.createWorkflow(bankToDelete);
+ currentWe.runRemoveProcess(BmajVersionManagement.getRelease(lDir.get(0).getAbsolutePath()));
+ }
+ }
+ } catch (BiomajException e) {
+ // Une biomajException est affichée sur la sortie erreur par defaut!
+ System.err.println("Biomaj has detected an error while trying to launch remove process for bank ["+ bank+"]");
+ System.err.println(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ getProject().setProperty(RESULTS, results);
+ }
+
+ protected String getLastDirectoryCreated() {
+ String res;
+// try {
+// ProductionDirectory pd = BiomajQueryXmlStateFile.getLastOnlineDirectory(bank);
+ ProductionDirectory pd = BiomajSQLQuerier.getLatestProductionDirectory(bank);
+
+ if (pd != null)
+ res = pd.getPath();
+ else {
+ log("First execution for bank:"+bank,Project.MSG_WARN);
+ return "";
+ }
+// } catch (BiomajException be) {
+// throw new BiomajBuildException(getProject(),be);
+// }
+ File dirOnline = new File(res);
+
+ if (!dirOnline.exists()){
+ log("Last online directory has been delete:"+dirOnline.getAbsolutePath(),Project.MSG_WARN);
+ return "";
+ }
+
+ return res;
+
+ }
+
+ protected void createNextReleaseLink(File f){
+
+ try {
+ File futurrelease = new File(getRoot()+"/"+BiomajConst.futureReleaseLink);
+ if (futurrelease.exists())
+ futurrelease.delete();
+ String cmdline_chmod = "chmod 744 "+f.getAbsolutePath();
+ Runtime.getRuntime().exec(cmdline_chmod);
+
+ if (BiomajUtils.createLinkOnFileSystem(f, BiomajConst.futureReleaseLink)!=0) {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.link",futurrelease.getAbsolutePath(),new Exception());
+ }
+
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+
+ /**
+ * @return the bank
+ * @uml.property name="bank"
+ */
+ public String getBank() {
+ return bank;
+ }
+
+ /**
+ * @param bank the bank to set
+ * @uml.property name="bank"
+ */
+ public void setBank(String bank) {
+ this.bank = bank;
+ }
+
+ /**
+ * @return the nbVersion
+ * @uml.property name="nbVersion"
+ */
+ public String getNbVersion() {
+ return nbVersion;
+ }
+
+ /**
+ * @param nbVersion the nbVersion to set
+ * @uml.property name="nbVersion"
+ */
+ public void setNbVersion(String nbVersion) {
+ this.nbVersion = nbVersion;
+ }
+
+ /**
+ * @return the numberVersion
+ * @uml.property name="numberVersion"
+ */
+ public int getNumberVersion() {
+ return numberVersion;
+ }
+
+ /**
+ * @param numberVersion the numberVersion to set
+ * @uml.property name="numberVersion"
+ */
+ public void setNumberVersion(int numberVersion) {
+ this.numberVersion = numberVersion;
+ }
+
+ /**
+ * @return the release
+ * @uml.property name="release"
+ */
+ public String getRelease() {
+ return release;
+ }
+
+ /**
+ * @param release the release to set
+ * @uml.property name="release"
+ */
+ public void setRelease(String release) {
+ this.release = release;
+ }
+
+ /**
+ * @return the root
+ * @uml.property name="root"
+ */
+ public String getRoot() {
+ return root;
+ }
+
+ /**
+ * @param root the root to set
+ * @uml.property name="root"
+ */
+ public void setRoot(String root) {
+ this.root = root;
+ }
+
+ /**
+ * @return the flatDirectory
+ * @uml.property name="flatDirectory"
+ */
+ public String getFlatDirectory() {
+ return flatDirectory;
+ }
+
+ /**
+ * @param flatDirectory the flatDirectory to set
+ * @uml.property name="flatDirectory"
+ */
+ public void setFlatDirectory(String propertyDirectoryResult) {
+ this.flatDirectory = propertyDirectoryResult;
+ }
+
+ /**
+ * @param mode the mode to set
+ * @uml.property name="mode"
+ */
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+
+ /**
+ * @return the prodDirectory
+ * @uml.property name="prodDirectory"
+ */
+ public String getProdDirectory() {
+ return prodDirectory;
+ }
+
+ /**
+ * @param prodDirectory the prodDirectory to set
+ * @uml.property name="prodDirectory"
+ */
+ public void setProdDirectory(String prodDirectory) {
+ this.prodDirectory = prodDirectory;
+ }
+
+ /**
+ * @return the mode
+ * @uml.property name="mode"
+ */
+ public String getMode() {
+ return mode;
+ }
+
+ public static String getRelease(String dirName) throws BiomajException {
+
+ String[] splitDirName = dirName.split(SEP_NUMBER_OF_RELEASE_VERSION);
+ String value = "";
+ if (splitDirName.length==0)
+ value = splitDirName[0];
+ else {
+ for (int i=0;i<=splitDirName.length-2;i++)
+ value = value + splitDirName[i];
+
+ //Pour finir on verifie que c est un chiffre, si ce n est pas le cas
+ //on ne tronque pas...
+ try {
+ Integer.parseInt(splitDirName[splitDirName.length-1]);
+
+ } catch (NumberFormatException e) {
+ //pas ok donc revient a la valeur initiale
+ value = dirName;
+ }
+ }
+
+ String [] l = value.split(SEP_RELEASE);
+
+ if (l.length<2) {
+ throw new BiomajException("bmajVersionManagement.error.releasename",dirName);
+ }
+
+ String rel = l[l.length-1];
+ return rel;
+ }
+
+
+ public void rebuild() {
+
+ try {
+ File current = new File (root+"/"+BiomajConst.currentLink);
+
+ if (!current.exists()) {
+ log("current n existe pas....",Project.MSG_ERR);
+ return;
+ }
+
+ List<ProductionDirectory> lDir = BiomajSQLQuerier.getAvailableProductionDirectories(bank);
+
+ if (lDir.size()>0) {
+
+ if ((lDir.get(lDir.size()-1).getPath().compareTo(current.getCanonicalPath())==0)) {
+ String result = current.getCanonicalPath();
+ getProject().log("current release:"+result+" -->delete link...",Project.MSG_INFO);
+ if (!current.delete())//efface le lien...
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.delete.link.current",new Exception());
+
+ getProject().setProperty(RESULTS, result);
+ if (lDir.size()>1) {
+ if (BiomajUtils.createLinkOnFileSystem(new File(lDir.get(lDir.size()-2).getPath()), BiomajConst.currentLink)!=0) {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.create.link",BiomajConst.currentLink,lDir.get(lDir.size()-2).getPath(),new Exception());
+ } else
+ getProject().log("new current release:"+lDir.get(lDir.size()-2).getPath(),Project.MSG_INFO);
+ }
+ if (BiomajUtils.createLinkOnFileSystem(new File(lDir.get(lDir.size()-1).getPath()), BiomajConst.futureReleaseLink)!=0) {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.create.link",BiomajConst.futureReleaseLink,lDir.get(lDir.size()-1).getPath(),new Exception());
+ } else
+ getProject().log("new futur release:"+lDir.get(lDir.size()-1).getPath(),Project.MSG_INFO);
+ } else
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.rebuild.statefile",lDir.get(lDir.size()-1).getPath(),current.getCanonicalPath(),new Exception());
+
+ } else {
+ throw new BiomajBuildException(getProject(),"bmajVersionManagement.error.current.not.exist",current.getCanonicalPath(),new Exception());
+ }
+ } catch (IOException ioe) {
+ throw new BiomajBuildException(getProject(),"io.error",ioe.getMessage(),ioe);
+ } catch (InterruptedException ie) {
+ throw new BiomajBuildException(getProject(),"unknown.error",ie.getMessage(),ie);
+ }// catch (BiomajException e) {
+// throw new BiomajBuildException(getProject(),e);
+// }
+
+ }
+
+ public String getOverride() {
+ return override;
+ }
+
+ public void setOverride(String override) {
+ this.override = override;
+ }
+
+}
+
+/**
+ *
+ * @author ofilangi
+ *
+ */
+class DirectoryVersionManagementFilter implements FilenameFilter {
+ /**
+ * @uml.property name="bankName"
+ */
+ String bankName;
+
+ DirectoryVersionManagementFilter(String bankName) {
+ this.bankName = bankName;
+ }
+
+ public boolean accept(File dir, String name) {
+ return name.matches(name);
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/XIncludeTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/XIncludeTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/XIncludeTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,199 @@
+package org.inria.biomaj.ant.task;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.Namespace;
+import org.jdom.input.SAXBuilder;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
+
+/**
+ *
+ * 13/03/09 - O. Sallou - Fix 7463 sometimes exception is raised if file cannot be deleted
+ *
+ */
+public class XIncludeTask extends Task {
+
+ public static Namespace xi = Namespace.getNamespace("xi","http://www.w3.org/2001/XInclude");
+
+ /** File path to fill to fill xinclude node */
+ private String in = "";
+
+ /** File result from the process */
+ private String out = "";
+
+ @Override
+ public void execute() throws BuildException {
+
+ log("in:"+in,Project.MSG_VERBOSE);
+ log("out:"+out,Project.MSG_VERBOSE);
+ File inFile = new File(in);
+
+ /** load the main node */
+ Element root = loadRootNode(inFile);
+ if (root == null)
+ return;
+
+ String currentPath = BiomajUtils.getRelativeDirectory(in);
+ /** change all noe include by the contains of the pointed file !*/
+ fillXInclude(root,currentPath);
+
+ write(root,out);
+ }
+
+
+ private Element loadRootNode(File inFile) {
+
+ Element root = null ;
+
+ if(!inFile.exists())
+ {
+ log(inFile.getAbsolutePath() +" does not exist !",Project.MSG_ERR);
+ return null;
+ }
+
+ try {
+ SAXBuilder sxb = new SAXBuilder();
+ Document document = sxb.build(inFile);
+ root = document.getRootElement();
+
+ } catch (Exception e) {
+ log(e.getLocalizedMessage(),Project.MSG_ERR);
+ return null;
+ }
+ return root;
+ }
+
+
+ private void fillXInclude (Element root,String currentPath) {
+
+ if (root == null)
+ {
+ log("bad root node->(null)",Project.MSG_ERR);
+ return ;
+ }
+
+ try {
+ List<Element> lChild = root.getChildren("include", xi) ;
+ //Vector<Element> l = new Vector<Element>();
+
+ /** Creation des noeuds remplacant les xinclude */
+ Vector<Integer> lIndex = new Vector<Integer>();
+ Vector<Element> lC = new Vector<Element>();
+ for (Element e : lChild) {
+ //Element e = it.next();
+ String path = e.getAttributeValue("href");
+ String file = currentPath+"/"+path;
+ File xmlFile = new File(file);
+ if (!xmlFile.exists()) {
+ lIndex.add(root.indexOf(e));
+ lC.add(null);
+ continue;
+ }
+ Element child = loadRootNode(xmlFile);
+ //Element c = (Element) child.clone();
+ fillXInclude(child,BiomajUtils.getRelativeDirectory(file));
+ //l.add(child);
+ log("change content :"+file,Project.MSG_VERBOSE);
+ log("index :"+root.indexOf(e),Project.MSG_VERBOSE);
+ //root.addContent(root.indexOf(e),(Element)child.clone());
+ lIndex.add(root.indexOf(e));
+ lC.add((Element)child.clone());
+ log("node add....",Project.MSG_VERBOSE);
+ //printNode(c);
+ //e.removeContent();
+ //e.setContent(child);
+ }
+
+ for (int i=0;i!=lC.size();i++) {
+ if (lC.get(i) != null)
+ root.addContent(lIndex.get(i), lC.get(i));
+ root.removeContent(lIndex.get(i)+1);
+ }
+
+ root.removeChildren("include", xi);
+
+ lChild = root.getChildren() ;
+
+ for (Element e : lChild) {
+ //Element e = it.next();
+ fillXInclude(e,currentPath);;
+ }
+
+ } catch (Exception e) {
+ log(e.getLocalizedMessage(),Project.MSG_ERR);
+ }
+ }
+
+
+
+ // Fix 7463 sometimes exception is raised if file cannot be deleted
+ private void write(Element root,String outFile) {
+
+ Document document = root.getDocument();
+ if (document==null)
+ document=new Document(root);
+
+ XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
+
+ try {
+ new File(outFile).delete();
+ } catch (Exception ex) {
+ log(ex.getLocalizedMessage(),Project.MSG_ERR);
+ }
+ try {
+ out.output(document, new FileOutputStream(outFile,false));
+ } catch (Exception ex) {
+ log(ex.getLocalizedMessage(),Project.MSG_ERR);
+ }
+ }
+
+
+ //debug
+
+ private void printNode(Element e) {
+ if (e == null)
+ {
+ log("node:null",Project.MSG_INFO);
+ return;
+ }
+
+ Iterator<Element> it = e.getChildren().iterator() ;
+ while (it.hasNext()) {
+ Element elt = it.next();
+ log("node:"+elt.getName(),Project.MSG_INFO);
+ printNode(elt);
+ }
+ }
+
+ public String getIn() {
+ return in;
+ }
+
+ public void setIn(String in) {
+ this.in = in;
+ }
+
+ public String getOut() {
+ return out;
+ }
+
+ public void setOut(String out) {
+ this.out = out;
+ }
+
+
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/ajout_info_file_in_statefile.usd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/ajout_info_file_in_statefile.usd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/ajout_info_file_in_statefile.usd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:SequenceDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="ajout_info_file_in_statefile" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332042696F6D616A5F4E564D">
+ <children xsi:type="editmodel:InstanceEditModel" name="Copy" location="10,20" size="101,681" id="org.gmod.biomaj.ant.task/Copy" itemName="Copy">
+ <children xsi:type="editmodel:ActivationEditModel" location="42,148" size="16,104" sequenceItemContainer="//@children.0" recursiveChildren="//@children.0/@children.1" length="104">
+ <sourceConnections xsi:type="editmodel:SelfSequenceMessageEditModel" name="addProductionFile" id="org.gmod.biomaj.ant.task/BmajTask#addProductionFile(Ljava.lang.String;Ljava.lang.String;Z)" source="//@children.0/@children.0" target="//@children.0/@children.1" targetEnd="//@children.0/@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="addProductionFile(String,String,String)" associatedSequenceNumber="1">
+ <children xsi:type="editmodel:SequenceEndEditModel" location="0,54" attachSource="true" userLabel="//@children.0/@children.0/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.0/@children.0/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.0/@children.0/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.0/@children.0/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="93,17" fontInfo="Arial-8-0" labelValue="file(name,size,date)"/>
+ <children xsi:type="editmodel:LabelEditModel" name="addProductionFile(String,String,String)" size="184,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" size="6,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" location="16,0" userLabel="//@children.0/@children.0/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.0/@children.0/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.0/@children.0/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.0/@children.0/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <bendpoints secondRelativeDimension="51,-9" firstRelativeDimension="58,0"/>
+ <bendpoints secondRelativeDimension="50,0" firstRelativeDimension="58,9"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:RecursiveActivationEditModel" targetConnections="//@children.0/@children.0/@sourceConnections.0" location="50,212" size="16,40" sequenceItemContainer="//@children.0" associatedActivation="//@children.0/@children.0" relativeLocation="8,10"/>
+ <children xsi:type="editmodel:ActivationEditModel" location="42,294" size="16,55" sequenceItemContainer="//@children.0" length="55">
+ <sourceConnections xsi:type="editmodel:SequenceMessageEditModel" source="//@children.0/@children.2" target="//@children.1/@children.0" targetEnd="//@children.0/@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@children.2/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="log" associatedSequenceNumber="2">
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" attachSource="true" userLabel="//@children.0/@children.2/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.0/@children.2/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.0/@children.2/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.0/@children.2/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="156,17" fontInfo="Arial-8-0" labelValue="log message file(name,size,date)"/>
+ <children xsi:type="editmodel:LabelEditModel" name="log" size="14,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="2" size="6,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" userLabel="//@children.0/@children.2/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.0/@children.2/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.0/@children.2/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.0/@children.2/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivationEditModel" targetConnections="//@children.1/@children.1/@sourceConnections.0" location="42,473" size="16,40" sequenceItemContainer="//@children.0"/>
+ </children>
+ <children xsi:type="editmodel:InstanceEditModel" name="BiomajListenerHandler" location="320,20" size="271,671" id="org.gmod.biomaj.ant.logger/BiomajMirrorListenerHandler" itemName="BiomajListenerHandler">
+ <children xsi:type="editmodel:ActivationEditModel" targetConnections="//@children.0/@children.2/@sourceConnections.0" location="127,294" size="16,55" sequenceItemContainer="//@children.1" length="55">
+ <sourceConnections xsi:type="editmodel:SequenceMessageEditModel" name="addFileInProduction" id="org.gmod.biomaj.ant.logger/MirrorListener#addPostProcess(Lorg.apache.tools.ant.BuildEvent;Ljava.lang.String;)" source="//@children.1/@children.0" target="//@children.2/@children.0" targetEnd="//@children.1/@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="addFileInProduction(BuildEvent,String)" associatedSequenceNumber="2.1">
+ <children xsi:type="editmodel:SequenceEndEditModel" location="-311,15" anchorKind="FixedAtEdge" attachSource="true" userLabel="//@children.1/@children.0/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.1/@children.0/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.1/@children.0/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.1/@children.0/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="59,17" fontInfo="Arial-8-0" labelValue="add copy file"/>
+ <children xsi:type="editmodel:LabelEditModel" name="addFileInProduction(BuildEvent,String)" size="184,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="2.1" size="15,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" userLabel="//@children.1/@children.0/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.1/@children.0/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.1/@children.0/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.1/@children.0/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivationEditModel" targetConnections="//@children.2/@children.3/@sourceConnections.0" location="127,465" size="16,90" sequenceItemContainer="//@children.1" length="90">
+ <sourceConnections xsi:type="editmodel:SequenceMessageEditModel" source="//@children.1/@children.1" target="//@children.0/@children.3" targetEnd="//@children.1/@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="" associatedSequenceNumber="4.1">
+ <children xsi:type="editmodel:SequenceEndEditModel" location="-314,8" anchorKind="FixedAtEdge" attachSource="true" userLabel="//@children.1/@children.1/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.1/@children.1/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.1/@children.1/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.1/@children.1/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="11,17" fontInfo="Arial-8-0" labelValue="ok"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="4.1" size="15,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" userLabel="//@children.1/@children.1/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.1/@children.1/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.1/@children.1/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.1/@children.1/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ </sourceConnections>
+ </children>
+ </children>
+ <children xsi:type="editmodel:InstanceEditModel" name="BuildListenerCitrina" location="670,20" size="141,661" id="org.gmod.biomaj.ant.logger/MirrorListener">
+ <children xsi:type="editmodel:ActivationEditModel" targetConnections="//@children.1/@children.0/@sourceConnections.0" location="62,309" size="16,40" sequenceItemContainer="//@children.2"/>
+ <children xsi:type="editmodel:ActivationEditModel" location="62,394" size="16,50" sequenceItemContainer="//@children.2" recursiveChildren="//@children.2/@children.2" length="50">
+ <sourceConnections xsi:type="editmodel:SelfSequenceMessageEditModel" source="//@children.2/@children.1" target="//@children.2/@children.2" targetEnd="//@children.2/@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="" associatedSequenceNumber="3">
+ <children xsi:type="editmodel:SequenceEndEditModel" attachSource="true" userLabel="//@children.2/@children.1/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.2/@children.1/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.2/@children.1/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.2/@children.1/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="160,17" fontInfo="Arial-8-0" labelValue="traitement ajout de fichier en prod"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="3" size="6,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" location="16,0" userLabel="//@children.2/@children.1/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.2/@children.1/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.2/@children.1/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.2/@children.1/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <bendpoints secondRelativeDimension="51,-9" firstRelativeDimension="58,0"/>
+ <bendpoints secondRelativeDimension="50,0" firstRelativeDimension="58,9"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:RecursiveActivationEditModel" targetConnections="//@children.2/@children.1/@sourceConnections.0" location="70,404" size="16,40" sequenceItemContainer="//@children.2" associatedActivation="//@children.2/@children.1" relativeLocation="8,10"/>
+ <children xsi:type="editmodel:ActivationEditModel" location="62,465" size="16,90" sequenceItemContainer="//@children.2" length="90">
+ <sourceConnections xsi:type="editmodel:SequenceMessageEditModel" source="//@children.2/@children.3" target="//@children.1/@children.1" targetEnd="//@children.2/@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual" associatedMethod="" associatedSequenceNumber="4">
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" attachSource="true" userLabel="//@children.2/@children.3/@sourceConnections.0/@children.0/@children.0" methodLabel="//@children.2/@children.3/@sourceConnections.0/@children.0/@children.1" sequenceNumberLabel="//@children.2/@children.3/@sourceConnections.0/@children.0/@children.2" statementExpression="//@children.2/@children.3/@sourceConnections.0/@children.0/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="11,17" fontInfo="Arial-8-0" labelValue="ok"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" name="4" size="6,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ <children xsi:type="editmodel:SequenceEndEditModel" anchorKind="FixedAtEdge" userLabel="//@children.2/@children.3/@sourceConnections.0/@children.1/@children.0" methodLabel="//@children.2/@children.3/@sourceConnections.0/@children.1/@children.1" sequenceNumberLabel="//@children.2/@children.3/@sourceConnections.0/@children.1/@children.2" statementExpression="//@children.2/@children.3/@sourceConnections.0/@children.1/@children.3">
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:LabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ <children xsi:type="editmodel:MessageLabelEditModel" size="0,17" fontInfo="Arial-8-0"/>
+ </children>
+ </sourceConnections>
+ </children>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="880,30" size="301,91" fontInfo="Arial-8-0" note="Traitement similaire pour Download/Copy/Extract

==> Fichier traite par la tache == Memorisation instané ! "/>
+ <children xsi:type="editmodel:NotepadEditModel" location="850,440" size="220,27" fontInfo="Arial-8-0" note="Ajout dans le statefile ou base de donnee"/>
+ <diagramOptions xsi:type="options:SequenceDiagramOptions" level="0" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+</editmodel:SequenceDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajDownload.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajDownload.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajDownload.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,200 @@
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Ant task for downloading files with ftp/http/sftp protocols.
+ * It runs n (files.num.thread) downloadthreads that concurrently
+ * handle the downloading.
+ *
+ * @author rsabas
+ *
+ */
+public class BmajDownload extends BmajTask {
+
+ private String protocol;
+ private String server;
+ private Integer port;
+ private String userId;
+ private String password;
+ private String remoteDir;
+ private String listing;
+ private String toDir;
+ private Vector<RemoteFile> files;
+ private int totalFiles;
+
+ private Map<Integer,Integer> downloadCount = new HashMap<Integer,Integer>();
+
+ @Override
+ public void execute() throws BuildException {
+ if (!protocol.equals(RemoteCommand.HTTP_PROTOCOL) && !protocol.equals(RemoteCommand.FTP_PROTOCOL) && !protocol.equals(RemoteCommand.SFTP_PROTOCOL))
+ throw new BiomajBuildException(getProject(),"error.implementation.find",protocol,new Exception());
+
+ log("Download client method for protocol : " + protocol,Project.MSG_INFO);
+ BufferedReader br;
+ files = new Vector<RemoteFile>();
+ try {
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line = br.readLine()) != null) {
+ files.add(new RemoteFile(line));
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ totalFiles = files.size();
+
+ /*
+ * Retrieving number of threads to run
+ */
+ int numThread = 1;
+ try {
+ String filesNumThread = BiomajUtils.getProperty(this.getProject(),BiomajConst.filesNumThreadProperty);
+ numThread = new Integer(filesNumThread);
+ }
+ catch (BiomajException e) {
+ log("files.num.thread is not defined ! New value is : 1",Project.MSG_WARN);
+ }
+
+ if (numThread <= 0){
+ log("Bad value for files.num.thread ("+numThread+"). New value is : 1",Project.MSG_WARN);
+ numThread = 1;
+ }
+
+
+ Vector<DownloadThread> runningThreads = new Vector<DownloadThread>();
+
+ //Don't start more threads that needed
+ numThread = files.size() < numThread ? files.size() : numThread;
+
+ log("Starting " + numThread + " thread(s) to download " + files.size() + " file(s).",Project.MSG_INFO);
+ // Starting the threads
+ for (int i = 0; i < numThread; i++) {
+ DownloadThread thread = new DownloadThread(this, i);
+ runningThreads.add(thread);
+ thread.start();
+ }
+ // Waiting for the threads to end
+ for (DownloadThread th : runningThreads) {
+ try {
+ th.join();
+ /*
+ * If an exception occured for any of the threads, throw that buildexception
+ * which will result in workflow being stopped.
+ */
+ if (th.getError() != null)
+ throw new BiomajBuildException(getProject(), th.getError());
+ } catch (InterruptedException e) {
+ log("Thread synchronization error : " + e.getMessage());
+ }
+ }
+ }
+
+ public synchronized void logDownload(int thread) {
+
+ Integer dlFilesCount = 1;
+ if ((dlFilesCount = downloadCount.get(thread)) != null) {
+ downloadCount.put(thread, dlFilesCount + 1);
+ } else
+ downloadCount.put(thread, 1);
+
+ String message = "";
+ int totalD = 0;
+
+ for (Integer k : downloadCount.keySet()) {
+ message += "Thread " + k + "=>[" + downloadCount.get(k) + "] ";
+ totalD += downloadCount.get(k);
+ }
+ message += " [" + totalD+ "/" + totalFiles +"]";
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+message,Project.MSG_INFO);
+ }
+
+ /**
+ * Synchronized method thats returns to the threads asking it
+ * the file to download.
+ *
+ * @return File to download or null there isn't any
+ */
+ public synchronized RemoteFile getFile() {
+ if (files.size() > 0) {
+ RemoteFile rf = files.get(0);
+ files.remove(0);
+ return rf;
+ }
+
+ return null;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+ public String getServer() {
+ return server;
+ }
+ public void setServer(String server) {
+ this.server = server;
+ }
+ public Integer getPort() {
+ return port;
+ }
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ public String getRemoteDir() {
+ return remoteDir;
+ }
+ public void setRemoteDir(String remoteDir) {
+ this.remoteDir = remoteDir;
+ }
+ public String getListing() {
+ return listing;
+ }
+ public void setListing(String listing) {
+ this.listing = listing;
+ }
+ public String getToDir() {
+ return toDir;
+ }
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajGetRelease.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajGetRelease.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajGetRelease.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,459 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+/**
+ * <p>GetRelease is a Biomaj Task Ant to get the bank release.
+ * Two method are implemented:
+ * <li>
+ * <ul>Search the release in a name file</ul>
+ * <ul>Search a release in a file</ul>
+ * </li>
+ * <p/>
+ * @author ofilangi
+ *
+ */
+public class BmajGetRelease extends RemoteCommand {
+
+ /**
+ * Directory to search release info
+ * @uml.property name="remoteDir"
+ */
+ private String remoteDir;
+ /**
+ * Name file that contents the release (2nd method)
+ * @uml.property name="nameFile"
+ */
+ private String nameFile;
+ /**
+ * Regexp to find the release
+ * @uml.property name="regexp"
+ */
+ private String regexp;
+ /**
+ * release date format (regexp is not specified!)
+ * @uml.property name="dateFormat"
+ */
+ private String dateFormat;
+ /**
+ * result
+ * @uml.property name="release"
+ */
+ private String release;
+ /**
+ * Property name to set the release
+ * @uml.property name="releaseProperty"
+ */
+ private String releaseProperty;
+
+ @Override
+ public void execute() throws BuildException {
+ checkInputInit();
+
+ InputValidation.checkString(getProject(),dateFormat, "release.dateFormat");
+
+ //File name must be initialized!
+ /*if (remoteDir.trim().compareTo("")==0)
+ throw new BiomajBuildException(getProject(),"getRelease.error.directory.mis",new Exception());
+ else*/
+ if ((remoteDir!=null)&&(remoteDir.length()>1)&&remoteDir.trim().charAt(0)!='/')
+ throw new BiomajBuildException(getProject(),"error.remote.directory.malformed",remoteDir,new Exception());
+
+ boolean find = false;
+
+
+ try {
+ //if a regexp is defined!
+ if (regexp.trim().compareTo("")!=0) {
+ if ((nameFile.trim().compareTo("")==0)) {//Find a release with name only if nameFile is set!
+ log("NAMEFILE:"+nameFile,Project.MSG_DEBUG);
+ log("Find Release in the name file:"+release,Project.MSG_VERBOSE);
+ find = findReleaseWithFileName();
+
+ } else {
+ log("Find Release in the file:"+release,Project.MSG_VERBOSE);
+ find = findReleaseInsideFile();
+ }
+
+ if (!find) {
+ log("A regexp was defined for a remote release but it did not give any results!",Project.MSG_WARN);
+ }
+ }
+
+ if (!find)
+ {
+ log("Biomaj will try to create a remote release.",Project.MSG_INFO);
+ log("Creation date of the most recent file on the remote server : "+nameFile,Project.MSG_INFO);
+ find = findReleaseWithDateOfRemoteFile();
+ }
+
+ if (!find)
+ throw new BiomajBuildException(getProject(),"getRelease.error.remote.attributes.malformed",new Exception());
+
+ //Correction bug : on ne laisse pas d'espace/tab etc... dans l'expression de la release
+ release = release.replaceAll("\\s", "-");
+
+ getProject().setProperty(releaseProperty,release);
+ } finally {
+ closeRemoteCommand();
+ }
+ }
+
+ /**
+ * First method to find release. The release may be contents in the name file
+ * @param file
+ * @return
+ */
+ public boolean findReleaseWithFileName() {
+ log("1srt METHODE find Release with File Name",Project.MSG_VERBOSE);
+ try {
+ initRemoteCommand();
+ Collection<RemoteFile> files = impl.getListingFiles(remoteDir,regexp,"");
+ closeRemoteCommand();
+ if (files==null)
+ throw new BiomajBuildException(getProject(),new NullPointerException("files"));
+
+ if (files.size()<=0)
+ return false;
+
+ Pattern pattern = Pattern.compile(regexp);
+ Matcher releaseMatcher;
+
+ for (RemoteFile file : files) {
+ log("name file:"+file.getName(),Project.MSG_DEBUG);
+ releaseMatcher = pattern.matcher(file.getName());
+ //if the release is found
+ if(releaseMatcher.find())
+ {
+ if (releaseMatcher.groupCount()>=1) {
+ if (releaseMatcher.groupCount()>1) {
+ log("More than one group is defined, BioMAJ takes the first group:["+releaseMatcher.group(1)+"]",Project.MSG_WARN);
+ }
+ release = releaseMatcher.group(1);
+
+ } else {
+ log("Aucun group definit pour la release",Project.MSG_VERBOSE);
+ release = releaseMatcher.group() ;
+ }
+ log("RELEASE:"+release,Project.MSG_VERBOSE);
+ return true;
+ }
+ }
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ //no release found!
+ return false;
+ }
+
+ /**
+ * Second method to find release. The release may be contents in the file
+ * and can be find with a regexp!
+ * @param file
+ * @return
+ */
+ public boolean findReleaseInsideFile() {
+ log("2nd METHODE find Release inside File",Project.MSG_VERBOSE);
+ String targetDirectory = "/var/tmp/";
+ String targetFile = System.currentTimeMillis()+nameFile;
+
+
+ String[] list = targetFile.split("/");
+ targetFile = list[list.length-1];
+
+ log("targetFile:"+targetFile+" (ne doit pas contenir de repertoire!)",Project.MSG_DEBUG);
+ log("directory :"+targetDirectory,Project.MSG_DEBUG);
+ log("compressed file :"+targetDirectory,Project.MSG_DEBUG);
+
+ try {
+ String isCompressed = getProject().getProperty("release.file.compressed");
+ log("compressed file :"+isCompressed,Project.MSG_DEBUG);
+
+ if ((isCompressed==null)||(isCompressed.trim().compareTo("true")!=0)) {
+ //Modif O.F pour recuperer un fichier avec une url entiere
+ if ((nameFile != null)&&(nameFile.contains("://")))
+ {
+ if (!RemoteCommandImpl.getFile(this, getUsername(),getPassword(),nameFile, targetDirectory, targetFile))
+ {
+ log("Release no find with url:"+nameFile,Project.MSG_VERBOSE);
+ return false;
+ }
+ }
+ else
+ {
+ initRemoteCommand();
+ if (!impl.getFile(remoteDir,nameFile,targetDirectory,targetFile)) {
+ log("Release no find by findReleaseInsideFile",Project.MSG_VERBOSE);
+ return false;
+ }
+ closeRemoteCommand();
+ }
+ } else {
+ String newName = "";
+
+ if ((nameFile != null)&&(nameFile.contains("://")))
+ newName = RemoteCommandImpl.getFileUncompressed(this,getUsername(),getPassword(),nameFile,targetDirectory);
+ else {
+ initRemoteCommand();
+ newName = impl.getFileUncompressed(remoteDir,nameFile,targetDirectory);
+ closeRemoteCommand();
+ }
+ if ((newName.compareTo("")==0)||(newName.compareTo(nameFile)==0))
+ {
+ log("Can't uncompressed file:"+nameFile,Project.MSG_VERBOSE);
+ return false;
+ } else {
+ targetFile = newName;
+ }
+ }
+ log("File find!",Project.MSG_DEBUG);
+
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ File file = new File(targetDirectory+targetFile);
+ BufferedReader reader;
+ try {
+ reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
+ } catch (FileNotFoundException ex) {
+ log("File not found:"+ex.getMessage(),Project.MSG_WARN);
+ return false;
+ }
+
+ try {
+ Pattern pattern = Pattern.compile(regexp);
+ Matcher releaseMatcher;
+ String line = "";
+ log("REGEXP:"+regexp,Project.MSG_DEBUG);
+
+ while ((line = reader.readLine()) != null)
+ {
+ log("Line to parse:"+line,Project.MSG_DEBUG);
+ releaseMatcher = pattern.matcher(line);
+ if(releaseMatcher.find())
+ {
+ if (releaseMatcher.groupCount()>=1) {
+ if (releaseMatcher.groupCount()>1) {
+ log("More than one group is defined, BioMAJ takes the first group:["+releaseMatcher.group(1)+"]",Project.MSG_WARN);
+ }
+ release = releaseMatcher.group(1);
+
+ } else {
+ log("Aucun group definit pour la release",Project.MSG_VERBOSE);
+ release = releaseMatcher.group() ;
+ }
+ log("RELEASE:"+release,Project.MSG_VERBOSE);
+ reader.close();
+ return true;
+ }
+ }
+
+ reader.close();
+
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } finally {
+ file.delete();
+ }
+
+ return false;
+ }
+
+ /**
+ * 3rd method to find release. The release is the date of the earlest file
+ * and can be found with a regexp!
+ * @param file
+ * @return
+ */
+ public boolean findReleaseWithDateOfRemoteFile() {
+ log("3rd METHODE find Release with date of Remote Files",Project.MSG_VERBOSE);
+ try {
+
+ String regExpressionOnRemoteFiles = getProject().getProperty(BiomajConst.remoteFilesProperty);
+
+ String regExcludedRemoteFiles = "";
+ if (getProject().getProperties().containsKey(BiomajConst.remoteExcludedFilesProperty))
+ regExcludedRemoteFiles = getProject().getProperty(BiomajConst.remoteExcludedFilesProperty);
+
+ InputValidation.checkString(getProject(), regExpressionOnRemoteFiles,"check remote.files");
+
+ initRemoteCommand();
+ Collection<RemoteFile> files = impl.getListingFiles(remoteDir,regExpressionOnRemoteFiles,regExcludedRemoteFiles);
+ closeRemoteCommand();
+
+ log("nb file on remote server:"+remoteDir+" nb:"+files.size(),Project.MSG_DEBUG);
+ if (files.size()<=0)
+ return false;
+
+ Date releaseDate= new Date();
+ releaseDate.setTime(0);
+
+ for (RemoteFile file : files) {
+ log("name file:"+file.getName(),Project.MSG_DEBUG);
+ log("date file:"+file.getDate().toString(),Project.MSG_DEBUG);
+
+ if (releaseDate.getTime()<file.getDate().getTime())
+ releaseDate.setTime(file.getDate().getTime());
+ }
+
+ log("dateFormat:"+dateFormat,Project.MSG_INFO);
+ try {
+ release = new SimpleDateFormat(dateFormat).format(releaseDate);
+ } catch (IllegalArgumentException ex) {
+ throw new BiomajBuildException(getProject(),"getRelease.error.date.format.malformed",dateFormat,ex);
+ }
+
+ // log("Release date:"+release);
+
+ } catch (BiomajBuildException e) {
+ throw e;
+ } catch (Throwable e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ return true;
+
+
+ }
+
+ /**
+ * @return the regexp
+ * @uml.property name="regexp"
+ */
+ public String getRegexp() {
+ return regexp;
+ }
+
+ /**
+ * @param regexp the regexp to set
+ * @uml.property name="regexp"
+ */
+ public void setRegexp(String regexp) {
+ this.regexp = regexp;
+ }
+
+ /**
+ * @return the nameFile
+ * @uml.property name="nameFile"
+ */
+ public String getNameFile() {
+ return nameFile;
+ }
+
+ /**
+ * @param nameFile the nameFile to set
+ * @uml.property name="nameFile"
+ */
+ public void setNameFile(String nameFile) {
+ this.nameFile = nameFile;
+ }
+
+ /**
+ * @return the remoteDir
+ * @uml.property name="remoteDir"
+ */
+ public String getRemoteDir() {
+ return remoteDir;
+ }
+
+ /**
+ * @param remoteDir the remoteDir to set
+ * @uml.property name="remoteDir"
+ */
+ public void setRemoteDir(String remoteDir) {
+ this.remoteDir = remoteDir;
+ }
+
+ /**
+ * @return the releaseProperty
+ * @uml.property name="releaseProperty"
+ */
+ public String getReleaseProperty() {
+ return releaseProperty;
+ }
+
+ /**
+ * @param releaseProperty the releaseProperty to set
+ * @uml.property name="releaseProperty"
+ */
+ public void setReleaseProperty(String releaseProperty) {
+ this.releaseProperty = releaseProperty;
+ }
+
+ /**
+ * @return the dateFormat
+ * @uml.property name="dateFormat"
+ */
+ public String getDateFormat() {
+ return dateFormat;
+ }
+
+ /**
+ * @param dateFormat the dateFormat to set
+ * @uml.property name="dateFormat"
+ */
+ public void setDateFormat(String dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRemoteListing.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRemoteListing.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRemoteListing.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,173 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+
+
+
+public class BmajRemoteListing extends RemoteCommand {
+
+ /**
+ * @uml.property name="remoteDir"
+ */
+ private String remoteDir;
+
+ /**
+ * @uml.property name="remoteFiles"
+ */
+ private String remoteFiles;
+
+ /**
+ * @uml.property name="excludedFiles"
+ */
+ private String excludedFiles="";
+
+ /**
+ * @uml.property name="listingFile"
+ */
+ private String listingFile;
+
+
+
+ @Override
+ public void execute() throws BuildException {
+ checkInputInit();
+ initRemoteCommand();
+
+ if ((remoteDir.length()>0)&&(remoteDir.trim().charAt(0)!='/'))
+ throw new BiomajBuildException(getProject(),"error.remote.directory.malformed",remoteDir,new Exception());
+
+ try {
+ log(getProject().getProperty(BiomajConst.dbNameProperty)+": Checking files at "+this.getProtocol()+"://"+this.getServer()+":"+this.getRemoteDir()+".",Project.MSG_INFO);
+
+ impl.getListingFilesWithBufferFile(remoteDir,listingFile,remoteFiles,excludedFiles);
+ BufferedReader br = new BufferedReader(new FileReader(listingFile));
+ int count = 0;
+ while (br.readLine()!= null)
+ count++;
+
+ log(Integer.toString(count)+" file(s) found on the server with remote-files["+remoteFiles+"] and excluded-files["+excludedFiles+"]",Project.MSG_INFO);
+
+ } catch (BiomajBuildException e) {
+ throw e;
+ } catch (Throwable e) {
+ BiomajLogger.getInstance().log(e.getMessage());
+ throw new BiomajBuildException(getProject(),e);
+ } finally {
+ closeRemoteCommand();
+ }
+ }
+
+ /**
+ * Sets the file name to store the listing information in.
+ * @param listingFile The listingFile to set.
+ * @uml.property name="listingFile"
+ */
+ public void setListingFile(String listingFile) {
+ this.listingFile = listingFile;
+
+ }
+
+ /**
+ * @return the remoteDir
+ * @uml.property name="remoteDir"
+ */
+ public String getRemoteDir() {
+ return remoteDir;
+ }
+
+ /**
+ * @param remoteDir the remoteDir to set
+ * @uml.property name="remoteDir"
+ */
+ public void setRemoteDir(String remoteDir) {
+ this.remoteDir = remoteDir;
+ }
+
+ /**
+ * @return the remoteFiles
+ * @uml.property name="remoteFiles"
+ */
+ public String getRemoteFiles() {
+ return remoteFiles;
+ }
+
+ /**
+ * @param remoteFiles the remoteFiles to set
+ * @uml.property name="remoteFiles"
+ */
+ public void setRemoteFiles(String remoteFiles) {
+ this.remoteFiles = remoteFiles;
+ }
+
+ /**
+ * @return the listingFile
+ * @uml.property name="listingFile"
+ */
+ public String getListingFile() {
+ return listingFile;
+ }
+
+ /**
+ * @return the excludedFiles
+ * @uml.property name="excludedFiles"
+ */
+ public String getExcludedFiles() {
+ return excludedFiles;
+ }
+
+ /**
+ * @param excludedFiles the excludedFiles to set
+ * @uml.property name="excludedFiles"
+ */
+ public void setExcludedFiles(String excludedFiles) {
+ this.excludedFiles = excludedFiles;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRsync.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRsync.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajRsync.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,319 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class BmajRsync extends BmajTask {
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server ;
+ /**
+ * @uml.property name="userid"
+ */
+ private String userid ;
+ /**
+ * @uml.property name="password"
+ */
+ private String password;
+ /**
+ * @uml.property name="remotedir"
+ */
+ private String remotedir;
+
+ /**
+ * @uml.property name="failonerror"
+ */
+ private String failonerror;
+ /**
+ * @uml.property name="listing"
+ */
+ private String listing;
+ /**
+ * @uml.property name="toDir"
+ */
+ private String toDir;
+
+ /**
+ * @uml.property name="continueOnError"
+ */
+ private boolean continueOnError = true;
+
+ /**
+ * @uml.property name="cmd"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Commandline cmd = new Commandline();
+
+
+ public BmajRsync() {
+ //cmd.createArgument().setValue("--delete");
+ }
+
+ @Override
+ public void execute() throws BuildException {
+ InputValidation.checkString(getProject(),server, "");
+ InputValidation.checkString(getProject(),userid, "");
+ InputValidation.checkString(getProject(),password, "");
+ InputValidation.checkString(getProject(),remotedir, "");
+ InputValidation.checkString(getProject(),listing, "");
+ InputValidation.checkString(getProject(),toDir, "");
+ BufferedReader br;
+ Vector<RemoteFile> files = new Vector<RemoteFile>();
+ try {
+
+ String rsync = BiomajInformation.getInstance().getProperty(BiomajInformation.RSYNC);
+ cmd.setExecutable(rsync);
+ cmd.createArgument().setValue("-t");
+
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line=br.readLine())!= null) {
+ files.add(new RemoteFile(line));
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+
+ for (int i=0;i<files.size();i++) {
+ try {
+ RemoteFile rf = files.get(i);
+ Commandline c = (Commandline) cmd.clone();
+ c.createArgument().setValue("rsync://"+server+remotedir+"/"+rf.getAbsolutePath());
+
+ String subDirectory = BiomajUtils.getRelativeDirectory(rf.getAbsolutePath());
+ String newToDir = toDir+"/"+subDirectory;
+ BiomajUtils.createSubDirectories(newToDir);
+ c.createArgument().setValue(newToDir);
+ Execute exe = new Execute(new LogStreamHandler(this,
+ Project.MSG_INFO,
+ Project.MSG_ERR),
+ null);
+ exe.setCommandline(c.getCommandline());
+ exe.execute();
+
+ int code_retour = exe.getExitValue();
+
+ if (code_retour!=0) {
+ if (!continueOnError)
+ throw new BiomajBuildException(getProject(),"rsync.error.download",rf.getAbsolutePath(),new Exception());
+ continue;
+ }
+
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+Integer.toString(i+1)+"/"+Integer.toString(files.size())+" file(s) downloaded!");
+ addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()), Long.toString(rf.getSize()));
+
+ } catch (Exception e) {
+ log("I/O Exception :"+e.getMessage(),Project.MSG_WARN);
+ if (!continueOnError)
+ throw new BiomajBuildException(getProject(),e);
+ }
+ }
+ log(Integer.toString(files.size())+"/"+Integer.toString(files.size())+" file(s) downloaded!");
+ }
+
+ /**
+ * @return the toDir
+ * @uml.property name="toDir"
+ */
+ public String getToDir() {
+ return toDir;
+ }
+
+
+
+ /**
+ * @param toDir the toDir to set
+ * @uml.property name="toDir"
+ */
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+
+
+ /**
+ * @return the listing
+ * @uml.property name="listing"
+ */
+ public String getListing() {
+ return listing;
+ }
+
+
+
+ /**
+ * @param listing the listing to set
+ * @uml.property name="listing"
+ */
+ public void setListing(String listing) {
+ this.listing = listing;
+ }
+
+
+
+ /**
+ * @return the password
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+
+
+ /**
+ * @param password the password to set
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+
+ /**
+ * @return the remotedir
+ * @uml.property name="remotedir"
+ */
+ public String getRemotedir() {
+ return remotedir;
+ }
+
+
+
+ /**
+ * @param remotedir the remotedir to set
+ * @uml.property name="remotedir"
+ */
+ public void setRemotedir(String remotedir) {
+ this.remotedir = remotedir;
+ }
+
+
+
+ /**
+ * @return the server
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return server;
+ }
+
+
+
+ /**
+ * @param server the server to set
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+
+
+ /**
+ * @return the userid
+ * @uml.property name="userid"
+ */
+ public String getUserid() {
+ return userid;
+ }
+
+
+
+ /**
+ * @param userid the userid to set
+ * @uml.property name="userid"
+ */
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+
+
+ /**
+ * @return the failonerror
+ * @uml.property name="failonerror"
+ */
+ public String getFailonerror() {
+ return failonerror;
+ }
+
+
+
+ /**
+ * @param failonerror the failonerror to set
+ * @uml.property name="failonerror"
+ */
+ public void setFailonerror(String failonerror) {
+ this.failonerror = failonerror;
+ if (failonerror!=null)
+ if ((failonerror.trim().compareTo("true")==0)||
+ (failonerror.trim().compareTo("on")==0)||
+ (failonerror.trim().compareTo("yes")==0))
+ continueOnError=false;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajSftp.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajSftp.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajSftp.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,192 @@
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Ant task that does sftp stuff.
+ * It runs n (files.num.thread) SftpThread instances that concurrently
+ * handle the downloading stuff.
+ *
+ * @author rsabas
+ *
+ */
+public class BmajSftp extends BmajTask {
+
+ private String protocol;
+ private String server;
+ private Integer port;
+ private String userId;
+ private String password;
+ private String remoteDir;
+ private String listing;
+ private String toDir;
+ private Vector<RemoteFile> files;
+
+ @Override
+ public void execute() throws BuildException {
+ log("SFTPClient method",Project.MSG_INFO);
+ BufferedReader br;
+ files = new Vector<RemoteFile>();
+ try {
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line=br.readLine())!= null) {
+ files.add(new RemoteFile(line));
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+
+ /*
+ * Retrieving number of threads to run
+ */
+ int numThread = 1;
+ try {
+ String filesNumThread = BiomajUtils.getProperty(this.getProject(),BiomajConst.filesNumThreadProperty);
+ numThread = new Integer(filesNumThread);
+ }
+ catch (BiomajException e) {
+ log("files.num.thread is not defined ! New value is : 1",Project.MSG_WARN);
+ }
+
+ if (numThread <= 0){
+ log("Bad value for files.num.thread ("+numThread+"). New value is : 1",Project.MSG_WARN);
+ numThread = 1;
+ }
+
+
+ Vector<SftpThread> runningThreads = new Vector<SftpThread>();
+
+ // Starting the threads
+ for (int i = 0; i < numThread; i++) {
+ SftpThread thread = new SftpThread(this, i);
+ runningThreads.add(thread);
+ thread.start();
+ }
+ // Waiting for the threads to end
+ for (SftpThread th : runningThreads)
+ try {
+ th.join();
+ } catch (InterruptedException e) {
+ log("Thread synchronization error : " + e.getMessage());
+ e.printStackTrace();
+ }
+
+ /*
+ RemoteCommandImpl pro = new SftpImpl(this);
+ try {
+ long totaltime = 0;
+ pro.init(server,port,userId,password);
+ Date m_chrono = new Date();
+ for (int i=0;i<files.size();i++) {
+ RemoteFile rf = files.get(i);
+ int j=0;
+ log("downloading:"+rf.getAbsolutePath(),Project.MSG_VERBOSE);
+ while ((!pro.getFile(remoteDir,rf.getAbsolutePath(),toDir,rf.getName()))&&(j<WgetThread.NB_TRY)) {
+ j++;
+ log(j+" try downloading:"+rf.getAbsolutePath(),Project.MSG_INFO);
+ }
+ Date end = new Date();
+ Long l = new Long(end.getTime() - m_chrono.getTime());
+ totaltime+=l;
+ addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()), Long.toString(rf.getSize()));
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+Integer.toString(i+1)+"/"+Integer.toString(files.size())+" file(s) downloaded!",Project.MSG_INFO);
+ }
+ log(Integer.toString(files.size())+"/"+Integer.toString(files.size())+" file(s) downloaded! time:"+BiomajUtils.timeToString(totaltime),Project.MSG_INFO);
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ } finally {
+ if (pro != null)
+ pro.disconnect();
+ }*/
+
+ }
+
+ /**
+ * Synchronized method thats returns to the threads asking it
+ * the file to download.
+ *
+ * @return File to download or null there isn't any
+ */
+ public synchronized RemoteFile getFile() {
+ if (files.size() > 0) {
+ RemoteFile rf = files.get(0);
+ files.remove(0);
+ return rf;
+ }
+
+ return null;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+ public String getServer() {
+ return server;
+ }
+ public void setServer(String server) {
+ this.server = server;
+ }
+ public Integer getPort() {
+ return port;
+ }
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ public String getRemoteDir() {
+ return remoteDir;
+ }
+ public void setRemoteDir(String remoteDir) {
+ this.remoteDir = remoteDir;
+ }
+ public String getListing() {
+ return listing;
+ }
+ public void setListing(String listing) {
+ this.listing = listing;
+ }
+ public String getToDir() {
+ return toDir;
+ }
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajWget.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajWget.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/BmajWget.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,609 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPFile;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.task.BmajTask;
+import org.inria.biomaj.internal.ant.task.net.FtpImpl;
+import org.inria.biomaj.internal.ant.task.net.HttpImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Tache ANt pour le telechargements des fichiers ftp et http :
+ * Principe:
+ * Classe principale BmajWget qui execute N (files.num.thread) thread wget
+ *
+ * Les threads Wget definissent NB_TRY tentative pour le telachargement de fichier,
+ * ci celui n est tjs pas telecharger, la classe principale BmajWegt remte le fichier dans la liste de fichier a telecharger
+ * (NB_TENTATIV_GLOBAL fois) si celui ci n est tjs pas telecharger on l ajoute a une liste de fichier Erreur !
+ *
+ * En fin de telechargement (tous les fichiers valide qui sont telecharger), une erreur stop l application si la liste de fichier erreur est non vide !
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BmajWget extends BmajTask {
+
+ /**
+ * numbers of file to download
+ * @uml.property name="nbFileDownload"
+ */
+ private int nbFileDownload = 0;
+
+ private int downloaded = 0;
+
+ /**
+ * Liste pour les sous listes des fichiers a telecharger
+ */
+ //private Vector<Vector> listFileByThread = new Vector<Vector>();
+ //valeur : Nbre de tentative de telechargement / nom du fichier a telecharger
+
+ public class TwoValue {
+ public int nbTentative = 0;
+ public boolean isTreat = false;
+ }
+
+ /**
+ * @uml.property name="attributFilesDownload"
+ * @uml.associationEnd inverse="this$0:org.inria.biomaj.ant.task.net.BmajWget$TwoValue" qualifier="rf:org.inria.biomaj.internal.ant.task.net.RemoteFile org.inria.biomaj.ant.task.net.BmajWget$TwoValue"
+ */
+ private Map<RemoteFile,TwoValue> attributFilesDownload = new HashMap<RemoteFile,TwoValue>();
+ public static final int NB_TENTATIV_GLOBAL = 5;
+
+ /**
+ * @uml.property name="protocol"
+ */
+ private String protocol ;
+ /**
+ * @uml.property name="server"
+ */
+ private String server ;
+ /**
+ * @uml.property name="port"
+ */
+ private Integer port ;
+ /**
+ * @uml.property name="userid"
+ */
+ private String userid ;
+ /**
+ * @uml.property name="password"
+ */
+ private String password;
+ /**
+ * @uml.property name="remotedir"
+ */
+ private String remotedir;
+ /**
+ * @uml.property name="listing"
+ */
+ private String listing;
+ /**
+ * @uml.property name="toDir"
+ */
+ private String toDir;
+
+ private Vector<String> treeMapErrorDownload = new Vector<String>();
+
+ /**
+ * @uml.property name="useWget"
+ */
+ private boolean useWget = false;
+
+ @Override
+ public void execute() throws BuildException {
+ InputValidation.checkString(getProject(),server, "");
+ if (port == null)
+ throw new BiomajBuildException(getProject(),"error.remote.port.malformed",new Exception());
+
+ InputValidation.checkString(getProject(),userid, "");
+ InputValidation.checkString(getProject(),password, "");
+ //InputValidation.checkString(getProject(),remotedir, "");
+ InputValidation.checkString(getProject(),listing, "");
+ InputValidation.checkString(getProject(),toDir, "");
+
+ if (useWget)
+ executeWithWget();
+ else
+ executeWithoutWget();
+
+ }
+
+ protected void executeWithoutWget() {
+ log("FTPClient method",Project.MSG_INFO);
+ BufferedReader br;
+ Vector<RemoteFile> files = new Vector<RemoteFile>();
+ try {
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line=br.readLine())!= null) {
+ files.add(new RemoteFile(line));
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+ RemoteCommandImpl pro = null ;
+ try {
+ if (protocol.compareTo(RemoteCommand.FTP_PROTOCOL)==0)
+ pro = new FtpImpl(this);
+ else if (protocol.compareTo(RemoteCommand.HTTP_PROTOCOL)==0)
+ pro = new HttpImpl(this);
+ else
+ throw new BiomajBuildException(getProject(),"error.implementation.find",protocol,new Exception());
+ long totaltime = 0;
+ pro.init(server,port,userid,password);
+ Date m_chrono = new Date();
+ for (int i=0;i<files.size();i++) {
+ RemoteFile rf = files.get(i);
+ int j=0;
+ log("downloading:"+rf.getAbsolutePath(),Project.MSG_VERBOSE);
+ while ((!pro.getFile(remotedir,rf.getAbsolutePath(),toDir,rf.getAbsolutePath()))&&(j<WgetThread.NB_TRY)) {
+ j++;
+ log(j+" try downloading:"+rf.getAbsolutePath(),Project.MSG_INFO);
+ }
+ Date end = new Date();
+ Long l = new Long(end.getTime() - m_chrono.getTime());
+ totaltime+=l;
+ addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()), Long.toString(rf.getSize()));
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+Integer.toString(i+1)+"/"+Integer.toString(files.size())+" file(s) downloaded!",Project.MSG_INFO);
+ }
+ log(Integer.toString(files.size())+"/"+Integer.toString(files.size())+" file(s) downloaded! time:"+BiomajUtils.timeToString(totaltime),Project.MSG_INFO);
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (Exception e) {
+ throw new BiomajBuildException(getProject(),e);
+ } finally {
+ if (pro != null)
+ pro.disconnect();
+ }
+
+ }
+
+ protected void executeWithWget() {
+ log("Wget method",Project.MSG_INFO);
+ BufferedReader br;
+ try {
+ br = new BufferedReader(new FileReader(listing));
+ String line;
+ while ((line=br.readLine())!= null) {
+ attributFilesDownload.put(new RemoteFile(line),new TwoValue());
+ }
+ } catch (IOException e) {
+ throw new BiomajBuildException(getProject(),e);
+ } catch (BiomajException be) {
+ throw new BuildException(be);
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getProject(),e);
+ }
+
+ this.setNbFileDownload(attributFilesDownload.size());
+
+ InputValidation.checkString(getProject(),this.getProject().getProperty("offline.dir"), "offline directory is not specified!");
+ InputValidation.checkString(getProject(),this.getProject().getProperty("wget.out.log"), "file for log messages from wget is not specified!");
+
+ int numThread = 1;
+ try {
+ String filesNumThread = BiomajUtils.getProperty(this.getProject(),BiomajConst.filesNumThreadProperty);
+ numThread = new Integer(filesNumThread);
+ }
+ catch (BiomajException e) {
+ log("files.num.thread is not defined ! New value is : 1",Project.MSG_WARN);
+ }
+
+ if ( numThread <= 0 ){
+ log("Bad value for files.num.thread ("+numThread+"). New value is : 1",Project.MSG_WARN);
+ numThread = 1;
+ }
+
+ if (nbFileDownload < numThread) {
+ numThread = nbFileDownload;
+ }
+ log("Starting " + numThread + " thread(s) to download " + nbFileDownload + " file(s)",Project.MSG_INFO);
+
+
+ int cptWget = 0;
+ Vector<WgetThread> lWget = new Vector<WgetThread>();
+ for (int i = 0;i<numThread;i++) {
+
+ WgetThread wt = new WgetThread(cptWget,this);
+ lWget.add(wt);
+ wt.start();
+ cptWget++;
+ }
+
+ for (int i=0;i<lWget.size();i++) {
+ lWget.get(i).synchr();
+ }
+
+ if (errorDetected()) {
+ log("Biomaj haves errors for files:",Project.MSG_ERR);
+ for (String file : treeMapErrorDownload) {
+ log(file,Project.MSG_ERR);
+ }
+ throw new BiomajBuildException(getProject(),"wget.error.download",new Exception());
+ }
+ }
+
+// Yo ajout de methode pour check 2
+ protected void diffRemoteLocalFile(String downloadFile, long downloadTime, long downloadSize){
+
+ Boolean boolDiff = false;
+ FTPClient client = new FTPClient();
+ try {
+ client.connect(server, port);
+ int nbTent = 0 ;
+ while ((!client.login(userid, password))&&(nbTent<WgetThread.NB_TRY))
+ nbTent++ ;
+ if (nbTent>=WgetThread.NB_TRY) {
+ throw new BiomajBuildException(getProject(),"ftp.loggin.error",client.getReplyString(),new Exception());
+ }
+ client.changeWorkingDirectory(remotedir);
+
+ FTPFile[] remoteFiles = client.listFiles(downloadFile);
+
+ // Ligne barbare pour pouvoir comparer time de Biomaj et du remoteFile dans les meme conditions
+ Date d ;
+ if (remoteFiles.length>0) {
+ //d = BiomajUtils.stringToDate(BiomajUtils.dateToString(new Date(remoteFiles[0].getTimestamp().getTime().getTime())));
+ d = remoteFiles[0].getTimestamp().getTime() ;
+ }
+ else {
+ getProject().log("Can't compare files listfiles :get 0 files on remote dir.",Project.MSG_VERBOSE);
+ getProject().log("client code:"+client.getReplyCode()+" string:"+client.getReplyString(),Project.MSG_VERBOSE);
+ return;
+ }
+
+ if ( downloadFile.compareTo(remoteFiles[0].getName())!=0)
+ {
+ getProject().log("Name file change: [local:"+downloadFile+"] [server:"+remoteFiles[0].getName()+"]",Project.MSG_WARN);
+ boolDiff = true;
+ }
+
+ if ( new Long(downloadSize).longValue() != remoteFiles[0].getSize())
+ {
+ getProject().log("["+downloadFile+"] Size file change: [local:"+Long.toString(downloadSize)+"] [server:"+Long.toString(remoteFiles[0].getSize())+"]",Project.MSG_WARN);
+ boolDiff = true;
+ }
+
+ if ( new Long(downloadTime).longValue() != d.getTime())
+ {
+ getProject().log("["+downloadFile+"] Time file change: [local:"+Long.toString(downloadTime)+"] [server:"+Long.toString(d.getTime())+"]",Project.MSG_WARN);
+ boolDiff = true;
+ }
+
+ if ( boolDiff.booleanValue() )
+ {
+ getProject().log("Launch a new update cycle",Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),"wget.error.newRemoteFile",downloadFile,new Exception());
+ }
+ if(client.isConnected()) {
+ try {
+ client.disconnect();
+ } catch(IOException ioe) {
+ getProject().log("Cant disconnect from server :"+ioe.getMessage(),Project.MSG_VERBOSE);
+ }
+ }
+ } catch (Exception se) {
+ throw new BiomajBuildException(getProject(),"ftp.loggin.error",se.getMessage(),new Exception());
+ }
+ }
+// Fin Yo
+
+ protected int computCuteDir(String dir) {
+ String t = dir.trim();
+ t = t.replaceAll("\\.\\./", "");
+ String[] res = t.split("/");
+ int cutdir=0;
+ for (int i=0;i<res.length;i++)
+ if (res[i].trim().compareTo("")!=0)
+ cutdir++;
+ return cutdir;
+ }
+
+ protected String computePathLinkFile(String pathLink,int cutdir) {
+ String[] t = pathLink.split("/");
+ String res="";
+
+ for (int i=cutdir-1;i<t.length;i++)
+ res=res+"/"+t[i];
+
+ if (res.compareTo("")==0)
+ res = pathLink;
+ else
+ res.replaceFirst("/", "");
+ return res;
+ }
+
+
+ /**
+ * Les fils wgetThread appele cette methode pour prevenir d'une erreur
+ *
+ */
+ protected synchronized void setErrorOnChild(RemoteFile rf) {
+
+ if (attributFilesDownload.containsKey(rf)) {
+ if (attributFilesDownload.get(rf).nbTentative>=BmajWget.NB_TENTATIV_GLOBAL) {
+ treeMapErrorDownload.add(rf.getAbsolutePath());
+ attributFilesDownload.remove(rf);
+ return;
+ }
+ log("ONE MORE TIME TENTATIV GLOBAL TO DOWNLOAD:"+rf.getAbsolutePath()+" ("+attributFilesDownload.get(rf).nbTentative+" tries)",Project.MSG_VERBOSE);
+ attributFilesDownload.get(rf).isTreat=false;
+ } else
+ treeMapErrorDownload.add(rf.getAbsolutePath());
+ }
+
+ public boolean errorDetected() {
+ return treeMapErrorDownload.size()!=0;
+ }
+
+ /**
+ * @return the listing
+ * @uml.property name="listing"
+ */
+ public String getListing() {
+ return listing;
+ }
+
+ /**
+ * @param listing the listing to set
+ * @uml.property name="listing"
+ */
+ public void setListing(String listing) {
+ this.listing = listing;
+ }
+
+ /**
+ * @return the password
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * @param password the password to set
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @return the remotedir
+ * @uml.property name="remotedir"
+ */
+ public String getRemotedir() {
+ return remotedir;
+ }
+
+ /**
+ * @param remotedir the remotedir to set
+ * @uml.property name="remotedir"
+ */
+ public void setRemotedir(String remotedir) {
+ this.remotedir = remotedir;
+ }
+
+ /**
+ * @return the server
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return this.server;
+ }
+
+ /**
+ * @param server the server to set
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+ /**
+ * @return the protocol
+ * @uml.property name="protocol"
+ */
+ public String getProtocol() {
+ return this.protocol;
+ }
+
+ /**
+ * @return the toDir
+ * @uml.property name="toDir"
+ */
+ public String getToDir() {
+ return toDir;
+ }
+
+ /**
+ * @param toDir the toDir to set
+ * @uml.property name="toDir"
+ */
+ public void setToDir(String toDir) {
+ this.toDir = toDir;
+ }
+
+ /**
+ * @return the userid
+ * @uml.property name="userid"
+ */
+ public String getUserid() {
+ return userid;
+ }
+
+ /**
+ * @param userid the userid to set
+ * @uml.property name="userid"
+ */
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public void setPort(String port) {
+ this.port = Integer.valueOf(port);
+ }
+
+ public int getPort() {
+ return this.port;
+ }
+
+ /**
+ * @param protocol the protocol to set
+ * @uml.property name="protocol"
+ */
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * @return the nbFileDownload
+ * @uml.property name="nbFileDownload"
+ */
+ public int getNbFileDownload() {
+ return this.nbFileDownload;
+ }
+
+ /**
+ * @param nbFileDownload the nbFileDownload to set
+ * @uml.property name="nbFileDownload"
+ */
+ public void setNbFileDownload(int nbFileDownload) {
+ this.nbFileDownload = nbFileDownload;
+ }
+ public void setUseWget(String useWget) {
+ if ((useWget.trim().compareTo("true")==0)||
+ (useWget.trim().compareTo("on")==0)||
+ (useWget.trim().compareTo("yes")==0))
+ this.useWget = true;
+ else
+ this.useWget = false;
+ }
+
+ /**
+ * @uml.property name="nThread"
+ * @uml.associationEnd qualifier="valueOf:java.lang.Integer java.lang.Integer"
+ */
+ private HashMap<Integer,Integer> nThread = new HashMap<Integer,Integer>();
+
+ public synchronized void logDownload(int thread) {
+
+ if (nThread.containsKey(thread)){
+ Integer v = nThread.get(thread);
+ v++;
+ nThread.put(thread,v);
+ } else
+ nThread.put(thread,1);
+
+ String message = "";
+ int totalD = 0;
+
+ for (Integer k : nThread.keySet()) {
+ message+="Thread "+k+"=>["+nThread.get(k)+"] ";
+ totalD += nThread.get(k);
+ }
+ message+=" [" + totalD+ "/" + this.getNbFileDownload() +"]";
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+message,Project.MSG_INFO);
+ }
+
+ @Override
+ public synchronized void log(String msg,int mode) {
+ super.log(msg,mode);
+ }
+
+ /**
+ * Methode d accession pour un fonctionnement Consomateur en groupe sur une liste de fichier a telecharger
+ *
+ */
+
+ public boolean thereAreDownloadFile() {
+ return (attributFilesDownload.size() != 0);
+ }
+
+ public synchronized int getDownloaded() {
+ return downloaded;
+ }
+
+ public synchronized RemoteFile getFileToDownload() {
+ if (attributFilesDownload.size()==0)
+ return null;
+
+ for (RemoteFile rf : attributFilesDownload.keySet()) {
+ if (!attributFilesDownload.get(rf).isTreat) {
+ attributFilesDownload.get(rf).isTreat = true ;
+ attributFilesDownload.get(rf).nbTentative++;
+ getProject().log("Get file ["+rf.getAbsolutePath()+" num_tent="+attributFilesDownload.get(rf).nbTentative+"] to download",Project.MSG_VERBOSE);
+ downloaded++;
+ return rf;
+ }
+ }
+ return null;
+ }
+ //Free the map
+ public synchronized void downloadIsOk(RemoteFile rf) {
+ attributFilesDownload.remove(rf);
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/DownloadThread.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/DownloadThread.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/DownloadThread.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,93 @@
+package org.inria.biomaj.ant.task.net;
+
+import java.util.Date;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.internal.ant.task.net.FtpImpl;
+import org.inria.biomaj.internal.ant.task.net.HttpImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.internal.ant.task.net.SftpImpl;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * Thread that that handles downloading with a specified protocol.
+ *
+ * @author rsabas
+ *
+ */
+public class DownloadThread extends Thread {
+
+ private BmajDownload task;
+ private String threadName;
+ private int threadId;
+
+ private Exception error = null;
+
+ public DownloadThread(BmajDownload task, int pos) {
+ this.task = task;
+ threadName = "downloadthead" + pos;
+ threadId = pos;
+ }
+
+ /**
+ * Runs the parallel download task.
+ * Asks Bmajsftp for files to download and stops once there's no left.
+ */
+ @Override
+ public void run() {
+
+ String protocol = task.getProtocol();
+ RemoteCommandImpl pro;
+ if (protocol.equals(RemoteCommand.FTP_PROTOCOL))
+ pro = new FtpImpl(task);
+ else if (protocol.equals(RemoteCommand.HTTP_PROTOCOL))
+ pro = new HttpImpl(task);
+ else
+ pro = new SftpImpl(task);
+
+ try {
+ long totaltime = 0;
+ int fileCount = 0;
+ pro.init(task.getServer(), task.getPort(), task.getUserId(), task.getPassword());
+ Date m_chrono = new Date();
+ RemoteFile rf = null;
+ while ((rf = task.getFile()) != null) {
+ int j = 0;
+ task.log(threadName + " downloading:"+rf.getAbsolutePath(),Project.MSG_VERBOSE);
+ while ((!pro.getFile(task.getRemoteDir(), rf.getAbsolutePath(), task.getToDir(),rf.getAbsolutePath())) && (j<WgetThread.NB_TRY)) {
+ j++;
+ task.log(j+" attempt for : "+rf.getAbsolutePath(),Project.MSG_INFO);
+ }
+ if (j > WgetThread.NB_TRY)
+ throw new BiomajException("Could not download " + rf.getAbsolutePath() + ", " + WgetThread.NB_TRY + " tries failed");
+ fileCount++;
+ Date end = new Date();
+ Long l = new Long(end.getTime() - m_chrono.getTime());
+ totaltime += l;
+ task.logDownload(threadId);
+// task.log(rf.getAbsolutePath() + " downloaded");
+ task.addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()), Long.toString(rf.getSize()));
+ }
+ task.log(threadName + " : " + fileCount + " files downloaded in " + totaltime,Project.MSG_VERBOSE);
+ } catch (BiomajException e) {
+ // Throwing exception here is useless as they won't be treated by ant
+ // and so won't stop the workflow.
+ // At the end of the thread the master will retrieve that exception
+ // and throw it.
+ error = new BiomajBuildException(task.getProject(),e);
+ } catch (Exception e) {
+ error = new BiomajBuildException(task.getProject(),e);
+ } finally {
+ if (pro != null)
+ pro.disconnect();
+ }
+
+ }
+
+ public Exception getError() {
+ return error;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/HttpListingParser.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/HttpListingParser.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/HttpListingParser.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,191 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.text.ParseException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class HttpListingParser implements ListingParser {
+
+ /**
+ * @uml.property name="patternLineDirectory"
+ */
+ private Pattern patternLineDirectory ;
+ /**
+ * @uml.property name="patternLineFile"
+ */
+ private Pattern patternLineFile ;
+ /**
+ * @uml.property name="groupDateDir"
+ */
+ private int groupDateDir ;
+ /**
+ * @uml.property name="groupDateFile"
+ */
+ private int groupDateFile ;
+ /**
+ * @uml.property name="groupNameDir"
+ */
+ private int groupNameDir ;
+ /**
+ * @uml.property name="groupNameFile"
+ */
+ private int groupNameFile ;
+ /**
+ * @uml.property name="groupeSizeFile"
+ */
+ private int groupeSizeFile ;
+
+
+
+ /**
+ * @uml.property name="lineToParse"
+ */
+ private String lineToParse="";
+ /**
+ * @uml.property name="rf"
+ * @uml.associationEnd
+ */
+ private RemoteFile rf ;
+
+ /**
+ * Parse a html line to detecet a directory or a file specified by biomaj admin
+ * Put -1 of groupe if you don't know the group in pattern
+ *
+ * @param patternDirectory pattern directory with groups
+ * @param groupeDirName name of directory in pattern directory
+ * @param groupeDirDate date directiry in pattern directory
+ * @param patternFile pattern file with group
+ * @param groupeFileName group in patternfile
+ * @param groupeFileDate date of file in pattern file
+ * @param groupeFileSize size of file in pattern size
+ */
+ public HttpListingParser(String patternDirectory,int groupDirName,int groupDirDate,String patternDateDir,
+ String patternFile,int groupFileName,int groupFileDate,int groupFileSize,String patternDateFile) {
+
+ patternLineDirectory = Pattern.compile(patternDirectory);
+ patternLineFile = Pattern.compile(patternFile);
+ groupDateDir = groupDirDate;
+ groupDateFile = groupFileDate;
+ groupNameDir = groupDirName;
+ groupNameFile = groupFileName;
+ groupeSizeFile = groupFileSize;
+
+ }
+
+ public String getFileName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getFileSize() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getLinkName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getTime() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean isLink() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean parse() throws ParseException {
+ //Line have to begin by a tag <a
+ rf = new RemoteFile();
+ /*
+ if (!lineToParse.startsWith("<a", 0)) {
+ //System.out.println("\""+lineToParse+"\" can't be parsed!");
+ return ;
+ }
+ */
+ Matcher mDir = patternLineDirectory.matcher(lineToParse);
+
+ if (mDir.find()) {
+ rf.setName(mDir.group(groupNameDir));
+ rf.setDir(true);
+ rf.setDate(BiomajUtils.stringToDate(mDir.group(groupDateDir)));
+ rf.setSize(new Long(0));
+ return true;
+ }
+
+ Matcher mFile = patternLineFile.matcher(lineToParse);
+
+ if (mFile.find()) {
+ //System.out.println(lineToParse);
+ rf.setName(mFile.group(groupNameFile));
+ rf.setDir(false);
+ rf.setDate(BiomajUtils.stringToDate(mFile.group(groupDateFile)));
+ rf.setSize(BiomajUtils.stringToSize(mFile.group(groupeSizeFile)));
+ return true;
+ }
+
+ return false ;
+ //System.out.println(lineToParse+" not matche!");
+ }
+
+ public void setLine(String s) {
+ lineToParse = s;
+ }
+
+
+ public boolean matches(String line) {
+ return (patternLineDirectory.matcher(lineToParse).find()
+ ||patternLineFile.matcher(lineToParse).find());
+ }
+
+ public RemoteFile getRemoteFile() {
+ return rf;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/ListingParser.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/ListingParser.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/ListingParser.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,79 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.text.ParseException;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+
+/**
+ * Interface to parse line from a specific protocol
+ * @author ofilangi
+ */
+public interface ListingParser {
+ /**
+ * Get file name
+ * @uml.property name="fileName"
+ */
+ public String getFileName() ;
+ /**
+ * Get link name
+ * @uml.property name="linkName"
+ */
+ public String getLinkName() ;
+ /** Get size */
+ public long getFileSize() ;
+ /** True if the file is a link */
+ public boolean isLink() ;
+ /** Creation Time */
+ public long getTime() ;
+ /** Set a line to parsed */
+ public void setLine(String s) ;
+ /** Process the parsing
+ * @throws ParseException TODO*/
+ public boolean parse() throws ParseException ;
+
+ /**
+ * @uml.property name="remoteFile"
+ * @uml.associationEnd
+ */
+ public RemoteFile getRemoteFile();
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RSyncListingParser.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RSyncListingParser.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RSyncListingParser.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,168 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Vector;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+public class RSyncListingParser implements ListingParser {
+
+ private static final String DATE_FORMAT_RSYNC="yyyy/MM/dd HH:mm:ss";
+ /**
+ * Line to parse
+ * @uml.property name="line"
+ */
+ private String line;
+ /**
+ * Current Ant Project
+ * @uml.property name="project"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Project project ;
+ /**
+ * result file parsed
+ * @uml.property name="remoteFile"
+ * @uml.associationEnd
+ */
+ private RemoteFile remoteFile;
+
+ /**
+ * Constructeur
+ * @param s
+ * @param p
+ */
+ public RSyncListingParser(Project p) {
+ project = p;
+ }
+
+ public String getFileName() {
+ return remoteFile.getName();
+ }
+
+ public long getFileSize() {
+ return remoteFile.getSize();
+ }
+
+ public String getLinkName() {
+ return remoteFile.getLinkName();
+ }
+
+ public long getTime() {
+ return remoteFile.getDate().getTime();
+ }
+
+ public boolean isLink() {
+ return remoteFile.isLink();
+ }
+
+ public boolean parse() throws ParseException {
+ project.log("Rsync mode: parsing line:"+line,Project.MSG_DEBUG);
+ if (line==null)
+ throw new BiomajBuildException(project,"rsyncListingParser.error.init",new Exception());
+
+ String[] tabAtt = line.split("[\\s]");
+ Vector<String> tabAttribut = new Vector<String>();
+
+ //Remove blanks!
+ for (int i=0;i<tabAtt.length;i++) {
+ if (tabAtt[i].trim().compareTo("")!=0)
+ tabAttribut.add(tabAtt[i]);
+ }
+
+ // there are a minimum of 5 index : permission-size-date-date-nameFile
+ if (tabAttribut.size()<5)
+ throw new BiomajBuildException(project,"rsyncListingParser.error.parse",line,new Exception());
+
+
+ try {
+ //For instance, link are not managed!!!!
+ /*if (line.charAt(0)=='l')
+ throw new BiomajBuildException(project,"rsyncListingParser.error.link",line);
+ */
+ if (line.charAt(0)=='l')
+ {
+ project.log("Find a link:"+line,Project.MSG_VERBOSE);
+
+ }
+ remoteFile = new RemoteFile();
+ //remoteFile.setValueString(line);
+ //if is directory
+ remoteFile.setDir(tabAttribut.get(0).trim().charAt(0)=='d');
+
+ remoteFile.setSize(Long.valueOf(tabAttribut.get(1).trim()));
+ project.log("Rsync mode - value of size:"+remoteFile.getSize(),Project.MSG_DEBUG);
+ SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_RSYNC);
+
+ Date date = sdf.parse(tabAttribut.get(2).trim()+" "+tabAttribut.get(3).trim());
+
+ remoteFile.setDate(date);
+ project.log("Rsync mode - value of date:"+sdf.format(remoteFile.getDate()),Project.MSG_DEBUG);
+ remoteFile.setName(tabAttribut.get(tabAttribut.size()-1));
+ project.log("Rsync mode - name file:"+remoteFile.getName(),Project.MSG_DEBUG);
+ return true;
+ } catch (Exception e) {
+ throw new BiomajBuildException(project,e);
+ }
+ }
+
+ /**
+ * @return the remoteFile
+ * @uml.property name="remoteFile"
+ */
+ public RemoteFile getRemoteFile() {
+ return remoteFile;
+ }
+
+ /**
+ * @param line the line to set
+ * @uml.property name="line"
+ */
+ public void setLine(String s) {
+ line = s;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RemoteCommand.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RemoteCommand.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/RemoteCommand.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,222 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.internal.ant.task.net.FtpImpl;
+import org.inria.biomaj.internal.ant.task.net.HttpImpl;
+import org.inria.biomaj.internal.ant.task.net.LocalImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl;
+import org.inria.biomaj.internal.ant.task.net.RsyncImpl;
+import org.inria.biomaj.internal.ant.task.net.SftpImpl;
+import org.inria.biomaj.utils.BiomajBuildException;
+
+public class RemoteCommand extends Task {
+
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server;
+
+ /**
+ * @uml.property name="port"
+ */
+ private int port;
+
+ /**
+ * @uml.property name="username"
+ */
+ private String username;
+
+ /**
+ * @uml.property name="password"
+ */
+ private String password;
+
+ public static final String FTP_PROTOCOL = "ftp";
+ public static final String HTTP_PROTOCOL = "http";
+ public static final String LOCAL_PROTOCOL = "local";
+ public static final String RSYNC_PROTOCOL = "rsync";
+ public static final String SFTP_PROTOCOL = "sftp";
+
+ /**
+ * @uml.property name="protocol"
+ */
+ private String protocol;
+
+ /**
+ * @uml.property name="impl"
+ * @uml.associationEnd
+ */
+ protected RemoteCommandImpl impl;
+
+ public void initRemoteCommand() throws BuildException {
+ //Implementation
+ getProject().log("**** Start Remote Session ****",Project.MSG_VERBOSE);
+ log("Implementation:"+protocol, Project.MSG_VERBOSE);
+ if (protocol.compareTo(FTP_PROTOCOL)==0)
+ impl = new FtpImpl(this);
+ else if (protocol.compareTo(HTTP_PROTOCOL)==0)
+ impl = new HttpImpl(this);
+ else if (protocol.compareTo(LOCAL_PROTOCOL)==0)
+ impl = new LocalImpl(this);
+ else if (protocol.compareTo(RSYNC_PROTOCOL)==0)
+ impl = new RsyncImpl(this);
+ else if (protocol.compareTo(SFTP_PROTOCOL)==0) {
+ impl = new SftpImpl(this);
+ }
+ else
+ throw new BiomajBuildException(getProject(),"error.implementation.find",protocol,new Exception());
+
+
+ impl.init(server,port,username,password);
+
+ }
+
+ public void closeRemoteCommand() throws BuildException {
+ if (impl!=null)
+ impl.disconnect();
+ getProject().log("**** End Remote Session ****",Project.MSG_VERBOSE);
+ }
+
+ /**
+ * @return the password
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * @param password the password to set
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @return the port
+ * @uml.property name="port"
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * @param port the port to set
+ * @uml.property name="port"
+ */
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ /**
+ * @return the server
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return server;
+ }
+
+ /**
+ * @param server the server to set
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+ /**
+ * @return the username
+ * @uml.property name="username"
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * @param username the username to set
+ * @uml.property name="username"
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ /**
+ * @return the protocol
+ * @uml.property name="protocol"
+ */
+ public String getProtocol() {
+ return protocol;
+ }
+
+ /**
+ * @param protocol the protocol to set
+ * @uml.property name="protocol"
+ */
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * Checks the attributes passed to ftplisting task.
+ *
+ * @throws org.apache.tools.ant.BuildException If required attributes are not set.
+ */
+ protected void checkInputInit() {
+ InputValidation.checkString(getProject(),server, "server name");
+ InputValidation.checkString(getProject(),Integer.toString(port), "port number");
+ InputValidation.checkString(getProject(),username, "username");
+ InputValidation.checkString(getProject(),password, "password");
+ }
+
+ @Override
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return super.getDescription();
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/SftpThread.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/SftpThread.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/SftpThread.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,69 @@
+package org.inria.biomaj.ant.task.net;
+
+import java.util.Date;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.internal.ant.task.net.SftpImpl;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * Thread that runs a sftp download task.
+ *
+ * @author rsabas
+ *
+ */
+public class SftpThread extends Thread {
+
+ private BmajSftp task;
+ private String threadName;
+
+ public SftpThread(BmajSftp task, int pos) {
+ this.task = task;
+ threadName = "sftpthead" + pos;
+ }
+
+ /**
+ * Runs the parallel download task.
+ * Asks Bmajsftp for files to download and stops once there's no left.
+ */
+ @Override
+ public void run() {
+
+ RemoteCommandImpl pro = new SftpImpl(task);
+ try {
+ long totaltime = 0;
+ int fileCount = 0;
+ pro.init(task.getServer(), task.getPort(), task.getUserId(), task.getPassword());
+ Date m_chrono = new Date();
+ RemoteFile rf = null;
+ while ((rf = task.getFile()) != null) {
+ int j = 0;
+ task.log(threadName + " downloading:"+rf.getAbsolutePath(),Project.MSG_VERBOSE);
+ while ((!pro.getFile(task.getRemoteDir(), rf.getAbsolutePath(), task.getToDir(),rf.getName())) && (j<WgetThread.NB_TRY)) {
+ j++;
+ task.log(j+" try downloading:"+rf.getAbsolutePath(),Project.MSG_INFO);
+ }
+ if (j > WgetThread.NB_TRY)
+ throw new BiomajException("Could not download " + rf.getAbsolutePath() + ", " + WgetThread.NB_TRY + " tries failed");
+ fileCount++;
+ Date end = new Date();
+ Long l = new Long(end.getTime() - m_chrono.getTime());
+ totaltime+=l;
+ task.addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()), Long.toString(rf.getSize()));
+ }
+ task.log(threadName + " : " + fileCount + " files downloaded in " + totaltime,Project.MSG_VERBOSE);
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(task.getProject(),e);
+ } catch (Exception e) {
+ throw new BiomajBuildException(task.getProject(),e);
+ } finally {
+ if (pro != null)
+ pro.disconnect();
+ }
+
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/WgetThread.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/WgetThread.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/WgetThread.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,439 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.ant.task.net;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.Semaphore;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.inria.biomaj.ant.task.BmajExtract;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Tache ANt pour le telechargements des fichiers ftp et http :
+ * Principe:
+ * Classe principale BmajWget qui execute N (files.num.thread) thread wget
+ *
+ * Les threads Wget definissent NB_TRY tentative pour le telachargement de fichier,
+ * ci celui n est tjs pas telecharger, la classe principale BmajWegt remte le fichier dans la liste de fichier a telecharger
+ * (NB_TENTATIV_GLOBAL fois) si celui ci n est tjs pas telecharger on l ajoute a une liste de fichier Erreur !
+ *
+ * En fin de telechargement (tous les fichiers valide qui sont telecharger), une erreur stop l application si la liste de fichier erreur est non vide !
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class WgetThread extends Thread {
+
+ private final static String OPTIONS_WGET_DEFAULT_STATIC = "--tries=inf --wait=5 --random-wait --passive-ftp --timeout=50" ;
+
+ /**
+ * @uml.property name="oPTIONS_WGET_DEFAULT"
+ */
+ private String OPTIONS_WGET_DEFAULT = OPTIONS_WGET_DEFAULT_STATIC ;
+
+ /**
+ * The workflow is lock by default!
+ * @uml.property name="lockWorkflow"
+ */
+ private Semaphore lockWorkflow = new Semaphore(0);
+
+ /**
+ * @uml.property name="nb_try"
+ */
+ public static final int NB_TRY = 10;
+
+ /**
+ * @uml.property name="numThread"
+ */
+ private int numThread;
+ /**
+ * @uml.property name="threadName"
+ */
+ private String threadName;
+ /**
+ * @uml.property name="wget"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private BmajWget wget;
+
+ public WgetThread(int numThread,BmajWget wget) {
+
+ this.numThread = numThread+1;
+ this.threadName = "WgetThread"+this.numThread;
+
+ setThreadName(threadName);
+ this.wget = wget;
+ }
+
+
+ public void run() throws BiomajBuildException {
+
+ String decal = "Thread "+this.numThread+" : ";
+ //throw new NullPointerException();
+ //String optionWgetProxy ="";
+
+
+ if (wget.getProject().getProperties().containsKey(BiomajConst.optionWgetProperty)) {
+ String opt = wget.getProject().getProperty(BiomajConst.optionWgetProperty);
+ if (opt.contains("--cut-dirs=")||opt.contains("--directory-prefix=")||opt.contains("-a")) {
+ wget.log("Thread["+numThread+"] "+BiomajConst.optionWgetProperty+" can't redefine theses options [--cut-dirs --directory-prefix -a]", Project.MSG_WARN);
+ } else {
+ OPTIONS_WGET_DEFAULT = opt;
+ }
+ }
+
+
+ /**
+ * Add proxy func : 29/06/2007 O.Filangi
+ */
+ /*
+ if (wget.getProject().getProperties().containsKey(BiomajConst.proxyUser)&&wget.getProject().getProperties().containsKey(BiomajConst.proxyPassword)) {
+ String userProxy=wget.getProject().getProperty(BiomajConst.proxyUser);
+ String passwordProxy=wget.getProject().getProperty(BiomajConst.proxyPassword);
+
+ optionWgetProxy = " --proxy-user="+userProxy+" --proxy-password="+passwordProxy+" ";
+ }
+
+ String optionWgetAuth ="";
+ */
+ // try {
+
+ Commandline cmd = new Commandline();
+
+ String pathWget="";
+ try {
+ pathWget = BiomajInformation.getInstance().getProperty(BiomajInformation.WGET);
+ } catch (BiomajException ioe) {
+ throw new BiomajBuildException(wget.getProject(),ioe);
+ }
+ cmd.setExecutable(pathWget);
+
+ String offlineDirectory = wget.getProject().getProperty("offline.dir");
+
+ //delete log file
+ File logFileWget = new File(wget.getProject().getProperty("wget.out.log"));
+ if (logFileWget.exists())
+ logFileWget.delete();
+
+
+ Execute execute = new Execute(new LogStreamHandler(wget, Project.MSG_INFO,Project.MSG_ERR),null);
+
+ /*while(wget.thereAreDownloadFile()) {
+ RemoteFile rf = wget.getFileToDownload();
+
+ if (rf == null)
+ continue;
+ */
+ RemoteFile rf = null;
+ while((rf = wget.getFileToDownload()) != null) {
+ int numberTentative=0;
+// wget.log("[Thread " + numThread + "] Downloading : "+rf.getName() + " [" + wget.getDownloaded() + "/" + wget.getNbFileDownload() + "]",Project.MSG_INFO);
+ wget.log("downloading:"+rf.getName(),Project.MSG_VERBOSE);
+ boolean isOk = false;
+ int code_retour = -1;
+
+ while ((!isOk)&&(numberTentative<NB_TRY)) {
+ isOk = false;
+ int cutdir=0;
+ Commandline newcmd = (Commandline) cmd.clone();
+
+ String wherePutFile = offlineDirectory;
+
+ if (wget.getProtocol().compareTo(RemoteCommand.HTTP_PROTOCOL)==0)
+ {
+ wherePutFile = offlineDirectory ;// + "/" + BiomajUtils.getRelativeDirectory(rf.getAbsolutePath());
+ cutdir = wget.computCuteDir(wget.getRemotedir());
+
+ /*
+ //Ajout ofilangi pour authentification 29/06/2007
+ if (wget.getProject().getProperties().containsKey(BiomajConst.userNameProperty)) {
+ //Si c est anonymous pas besoin d ajouter ces options � wget
+ String user = wget.getProject().getProperty(BiomajConst.userNameProperty);
+ String password = wget.getProject().getProperty(BiomajConst.passwordProperty);
+ if (user.compareTo("")!=0) {
+ optionWgetAuth = " --http-user="+user+" --http-password="+password;
+ }
+ }
+ */
+ }
+ else {
+ if (rf.isLink()) {
+ String absPath = BiomajUtils.getRelativeDirectory(rf.getAbsolutePath());
+ wherePutFile = offlineDirectory + "/" + absPath;
+ /*Correction erreur de link 19 juin 2007
+ -------------------------------------
+ Exemple : link = ../../MapView/Mus_musculus/sequence/current/initial_release/bes_seq.md.gz
+
+ * on se retroure avec un lien $repdir/initial_release/bes_seq.md.gz
+ *
+ * on doit donc prendre en compte les repertoire qui ne sont pas coupe par cut_dir de wget!
+ *
+ */
+ //Calcul du cut-dir avec le linkName
+ String stringForCutDir = wget.getRemotedir()+"/"+rf.getLinkName() ;
+ //remove les ../..etc...
+ String trueCutDir = BiomajUtils.getNormalizedPath(stringForCutDir);
+ cutdir = wget.computCuteDir(trueCutDir);
+ } else
+ cutdir = wget.computCuteDir(wget.getRemotedir());
+
+ //Ajout ofilangi pour authentification 29/06/2007
+ /*
+ if (wget.getProject().getProperties().containsKey(BiomajConst.userNameProperty)) {
+ //Si c est anonymous pas besoin d ajouter ces options � wget
+ String user = wget.getProject().getProperty(BiomajConst.userNameProperty);
+ String password = wget.getProject().getProperty(BiomajConst.passwordProperty);
+ if (user.compareTo("")!=0) {
+ optionWgetAuth = " --ftp-user="+user+" --ftp-password="+password+" ";
+ }
+ }
+ */
+ }
+
+ String options_line= OPTIONS_WGET_DEFAULT+" -N -c -x -nH --cut-dirs="+Integer.toString(cutdir);
+ //Fatal errors like ''connection refused'' or ''not found'' (404)
+ options_line +=" --directory-prefix=" + wherePutFile + " -a "+ wget.getProject().getProperty("wget.out.log")+this.numThread;
+ //options_line +=optionWgetAuth+" "+optionWgetProxy;
+
+ String serverAndPort = wget.getServer();
+ if (wget.getProtocol().equals(RemoteCommand.FTP_PROTOCOL)) {
+ if (serverAndPort.endsWith("/"))
+ serverAndPort = serverAndPort.substring(0, serverAndPort.lastIndexOf("/")) + ":" + wget.getPort() + "/";
+ else
+ serverAndPort += ":" + wget.getPort();
+ }
+
+ if (!rf.isLink())
+ options_line = options_line + " " + wget.getProtocol()+"://"+serverAndPort+wget.getRemotedir()+"/"+rf.getAbsolutePath();
+ else
+ options_line = options_line + " " + wget.getProtocol()+"://"+serverAndPort+wget.getRemotedir()+"/"+rf.getLinkName();
+
+ wget.log("wget options:"+options_line,Project.MSG_VERBOSE);
+ newcmd.createArgument().setLine(options_line);
+
+ //creation des sous repertoires si il y a besoin!
+ String targetDirectory = offlineDirectory+"/"+BiomajUtils.getRelativeDirectory(rf.getAbsolutePath());
+ BiomajUtils.createSubDirectories(targetDirectory);
+
+ execute.setCommandline(newcmd.getCommandline());
+
+ String message = "";
+ for (int k=0;k<execute.getCommandline().length;k++)
+ message = message+execute.getCommandline()[k]+" ";
+
+ wget.log("Thread["+numThread+"]"+message,Project.MSG_DEBUG);
+
+ try {
+ execute.execute();
+ }
+ catch (Throwable b) {
+ BiomajLogger.getInstance().log(b.getLocalizedMessage());
+ wget.log(b.getLocalizedMessage(),Project.MSG_ERR);
+ code_retour = 1;
+ }
+
+ code_retour = execute.getExitValue();
+
+ if ((code_retour==0)&&(rf.isLink())) {
+
+ String nameLink = BiomajUtils.getNameFile(rf.getLinkName());
+ if (nameLink.compareTo(rf.getName())!=0) {
+ wget.log(decal+"Change name link....["+nameLink+"]---->["+rf.getName()+"]",Project.MSG_VERBOSE);
+ File s = new File(targetDirectory+"/"+nameLink);
+ File d = new File(targetDirectory+"/"+rf.getName());
+ try {
+ if (BiomajUtils.move(s, d))
+ wget.log("["+threadName+"]"+"Ok",Project.MSG_VERBOSE);
+ else
+ {
+ wget.log("["+threadName+"]"+"KO, Can't change name link..["+nameLink+"]---->["+rf.getName()+"]",Project.MSG_ERR);
+ wget.setErrorOnChild(rf);
+ break;
+ }
+ } catch (IOException ioe) {
+ numberTentative++;
+ wget.log(decal+"problem to rename:"+rf.getName()+"-->"+nameLink+" ("+numberTentative+"/"+NB_TRY+") :"+ioe.getMessage(),Project.MSG_WARN);
+ continue;
+ }
+ }
+ }
+
+ boolean notExiste = !new File(targetDirectory+"/"+rf.getName()).exists();
+
+ if ((code_retour!=0)||(notExiste)) {
+ if (code_retour!=0)
+ wget.log(decal+"problem to download file:"+rf.getAbsolutePath()+" code retour:"+code_retour+" ("+numberTentative+"/"+NB_TRY+")",Project.MSG_VERBOSE);
+ else
+ wget.log(decal+"problem to download file:"+rf.getAbsolutePath()+" not find."+" ("+numberTentative+"/"+NB_TRY+")",Project.MSG_WARN);
+
+ numberTentative++;
+
+ if (numberTentative>=NB_TRY)
+ {
+ wget.setErrorOnChild(rf);
+ wget.log("["+threadName+"]"+"Can't download :["+rf.getAbsolutePath()+"]",Project.MSG_DEBUG);
+ //throw new BiomajBuildException(wget.getProject(),"wget.error.download",rf.getAbsolutePath(),new Exception());
+ }
+
+
+ wget.log("["+threadName+"]"+numberTentative+" try downloading:"+rf.getAbsolutePath(),Project.MSG_VERBOSE);
+ if (BiomajUtils.delete(offlineDirectory+"/"+rf.getAbsolutePath()))
+ wget.log ("["+threadName+"]"+"delete file:"+offlineDirectory+"/"+rf.getAbsolutePath(),Project.MSG_DEBUG);
+ // Ajout d'un test pour verif si le fichier distant n'a pas changé
+ /**
+ *
+ * On enleve ce test qui est source d erreur et enleve des perf...
+ * --> cout d une connection au serveur distant pour verifier les attributs du fichiers !
+ wget.diffRemoteLocalFile(rf.getAbsolutePath(),rf.getDate().getTime(),rf.getSize());
+ */
+ //Attente entre 0 et qq sec pour retelecharger
+ long t = (long)((double)5000*Math.random());
+ //wget.log("["+threadName+"]"+"[t="+t+"]", Project.MSG_DEBUG);
+ long i= 0;
+ while ((i++)<t) {}
+ continue;
+ }
+
+ //Download is ok!
+ wget.log("["+threadName+"]"+"["+rf.getAbsolutePath()+"] file downloaded! crc verification if need ... ",Project.MSG_VERBOSE);
+ isOk = true;
+ //if the file is a compressed file we have to verify the crc
+ File f = new File(offlineDirectory+"/"+rf.getAbsolutePath());
+ try {
+ if (BmajExtract.containsCompressedFormat(rf.getAbsolutePath()))
+ {
+ wget.log("["+threadName+"]"+rf.getAbsolutePath()+" : this file is a compressed file :",Project.MSG_VERBOSE);
+ try {
+ isOk=BmajExtract.check(f,wget);
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ throw new BiomajBuildException(wget.getProject(),be);
+ }
+ } else
+ wget.log("["+threadName+"]"+"no need!",Project.MSG_VERBOSE);
+ } catch (BiomajException e) {
+ throw new BiomajBuildException(wget.getProject(),e);
+ }
+ if (isOk)
+ {
+ //wget.log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+decal + Integer.toString(i+1)+"/"+Integer.toString(lFiles.size())+" file(s)",Project.MSG_INFO);
+ wget.logDownload(numThread);
+ wget.addDownloadFile(rf.getAbsolutePath(), Long.toString(rf.getDate().getTime()),Long.toString(rf.getSize()));
+ wget.downloadIsOk(rf);
+ wget.log("["+threadName+"]"+"ok, next download",Project.MSG_VERBOSE);
+ }
+ else
+ {
+ wget.log("["+threadName+"]"+"bad crc....",Project.MSG_VERBOSE);
+ if (!BiomajUtils.delete(offlineDirectory+"/"+rf.getAbsolutePath()))
+ wget.log (decal+"File d'ont exist (can't delete this):"+offlineDirectory+"/"+rf.getAbsolutePath(),Project.MSG_WARN);
+ else
+ wget.log (decal+"File delete:"+offlineDirectory+"/"+rf.getAbsolutePath(),Project.MSG_WARN);
+
+ //Ajout O.F en cas d erreur de tentative on arrete!
+ if (numberTentative>=NB_TRY) {
+ wget.setErrorOnChild(rf);
+ wget.log("["+threadName+"]"+"Can't download :["+rf.getAbsolutePath()+"]",Project.MSG_DEBUG);
+ break;
+ //throw new BiomajBuildException(wget.getProject(),"wget.error.download",rf.getAbsolutePath(),new Exception());
+ }
+ numberTentative++;
+ }
+ }
+ }
+
+ wget.log("Thread ["+threadName+"] dead",Project.MSG_INFO);
+
+ /* } catch (Exception e) {
+ wget.setErrorOnChild(e);
+ //throw new BiomajBuildException(wget.getProject(),e);
+ } finally {
+ release();
+ }
+ */
+ release();
+ }
+
+ protected void synchr() {
+ try {
+ wget.log("acquire:"+getThreadName()+" nb semaphore:"+lockWorkflow.availablePermits(),Project.MSG_VERBOSE);
+ lockWorkflow.acquire();
+ wget.log("acquire ok:"+getThreadName()+" nb semaphore:"+lockWorkflow.availablePermits(),Project.MSG_VERBOSE);
+ } catch (InterruptedException ex) {
+ BiomajLogger.getInstance().log(ex);
+ System.exit(-1);
+ }
+ }
+
+ protected void release() {
+ wget.log("release:"+getThreadName(),Project.MSG_VERBOSE);
+ lockWorkflow.release();
+ }
+
+ /**
+ * @return the threadName
+ * @uml.property name="threadName"
+ */
+ public String getThreadName() {
+ return threadName;
+ }
+
+ /**
+ * @param threadName the threadName to set
+ * @uml.property name="threadName"
+ */
+ public void setThreadName(String threadName) {
+ this.threadName = threadName;
+ }
+}
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/org.inria.biomaj.ant.task.net.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/org.inria.biomaj.ant.task.net.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/org.inria.biomaj.ant.task.net.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.ant.task.net" metadata="uml2-1.0" initialized="true" zoom="0.75" scrolledX="98" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="WgetThread" location="700,714" size="117,64" id="org.inria.biomaj.ant.task.net/WgetThread" runTimeClassModel="wget,threadName,release(),setThreadName(Ljava.lang.String;),WgetThread(ILorg.inria.biomaj.ant.task.net.BmajWget;),nb_try,synchr(),run(),lockWorkflow,numThread,oPTIONS_WGET_DEFAULT_STATIC,oPTIONS_WGET_DEFAULT,getThreadName()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="240,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="269,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" id="org.inria.biomaj.ant.task.net/BmajWget at wget+org.inria.biomaj.ant.task.net/WgetThread@" source="//@children.0" target="//@children.5" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,3" id="org.inria.biomaj.ant.task.net/BmajWget at wget+org.inria.biomaj.ant.task.net/WgetThread@|org.inria.biomaj.ant.task.net/WgetThread#" attachSource="true" roleLabel="//@children.0/@sourceConnections.0/@children.1/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="693,692" size="0,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="wget" location="149,51" id="org.inria.biomaj.ant.task.net/BmajWget at wget+org.inria.biomaj.ant.task.net/WgetThread@|org.inria.biomaj.ant.task.net/BmajWget#wget" multiplicityLabel="//@children.0/@sourceConnections.0/@children.2/@children.1" roleLabel="//@children.0/@sourceConnections.0/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - wget" location="627,536" size="33,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="627,567" size="6,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.0" target="//@children.17" targetEnd="//@children.0/@sourceConnections.1/@children.1" sourceEnd="//@children.0/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,58" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="247,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajGetRelease" location="1399,504" size="197,200" id="org.inria.biomaj.ant.task.net/BmajGetRelease" runTimeClassModel="getDateFormat(),releaseProperty,setReleaseProperty(Ljava.lang.String;),getReleaseProperty(),getRemoteDir(),release,nameFile,findReleaseInsideFile(),findReleaseWithDateOfRemoteFile(),dateFormat,execute(),remoteDir,setRegexp(Ljava.lang.String;),setDateFormat(Ljava.lang.String;),findReleaseWithFileName(),setNameFile(Ljava.lang.String;),getNameFile(),getRegexp(),regexp,setRemoteDir(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="129,114">
+ <children xsi:type="editmodel:AttributeEditModel" name="dateFormat" id="org.inria.biomaj.ant.task.net/BmajGetRelease#dateFormat"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nameFile" id="org.inria.biomaj.ant.task.net/BmajGetRelease#nameFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regexp" id="org.inria.biomaj.ant.task.net/BmajGetRelease#regexp"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="release" id="org.inria.biomaj.ant.task.net/BmajGetRelease#release"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="releaseProperty" id="org.inria.biomaj.ant.task.net/BmajGetRelease#releaseProperty"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteDir" id="org.inria.biomaj.ant.task.net/BmajGetRelease#remoteDir"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="245,266"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task.net/RemoteCommand<-org.inria.biomaj.ant.task.net/BmajGetRelease" source="//@children.1" target="//@children.2/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="98,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajRemoteListing" location="1079,508" size="221,191" id="org.inria.biomaj.ant.task.net/BmajRemoteListing" runTimeClassModel="listingFile,getListingFile(),getRemoteDir(),getRemoteFiles(),setExcludedFiles(Ljava.lang.String;),execute(),remoteDir,setListingFile(Ljava.lang.String;),getExcludedFiles(),remoteFiles,setRemoteFiles(Ljava.lang.String;),excludedFiles,setRemoteDir(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="117,76">
+ <children xsi:type="editmodel:AttributeEditModel" name="excludedFiles" id="org.inria.biomaj.ant.task.net/BmajRemoteListing#excludedFiles"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listingFile" id="org.inria.biomaj.ant.task.net/BmajRemoteListing#listingFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteDir" id="org.inria.biomaj.ant.task.net/BmajRemoteListing#remoteDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteFiles" id="org.inria.biomaj.ant.task.net/BmajRemoteListing#remoteFiles"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="218,171"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.1/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.ant.task.net/RemoteCommand<-org.inria.biomaj.ant.task.net/BmajRemoteListing" source="//@children.2" target="//@children.3" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="110,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="105,264" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.15/@sourceConnections.0" name="RemoteCommand" location="1270,154" size="210,264" id="org.inria.biomaj.ant.task.net/RemoteCommand" runTimeClassModel="initRemoteCommand(),password,protocol,fTP_PROTOCOL,hTTP_PROTOCOL,setUsername(Ljava.lang.String;),rSYNC_PROTOCOL,lOCAL_PROTOCOL,setProtocol(Ljava.lang.String;),port,getDescription(),setServer(Ljava.lang.String;),impl,setPassword(Ljava.lang.String;),getPassword(),getUsername(),checkInputInit(),getProtocol(),closeRemoteCommand(),username,setPort(I),server,getServer(),getPort()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="157,190">
+ <children xsi:type="editmodel:AttributeEditModel" name="fTP_PROTOCOL" id="org.inria.biomaj.ant.task.net/RemoteCommand#fTP_PROTOCOL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="hTTP_PROTOCOL" id="org.inria.biomaj.ant.task.net/RemoteCommand#hTTP_PROTOCOL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="impl" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl at impl+org.inria.biomaj.ant.task.net/RemoteCommand@|org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#impl"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOCAL_PROTOCOL" id="org.inria.biomaj.ant.task.net/RemoteCommand#lOCAL_PROTOCOL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="password" id="org.inria.biomaj.ant.task.net/RemoteCommand#password"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="port" id="org.inria.biomaj.ant.task.net/RemoteCommand#port"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="protocol" id="org.inria.biomaj.ant.task.net/RemoteCommand#protocol"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rSYNC_PROTOCOL" id="org.inria.biomaj.ant.task.net/RemoteCommand#rSYNC_PROTOCOL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="server" id="org.inria.biomaj.ant.task.net/RemoteCommand#server"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="username" id="org.inria.biomaj.ant.task.net/RemoteCommand#username"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="187,266"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task.net/RemoteCommand" source="//@children.3" target="//@children.6/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="105,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="164,64"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl at impl+org.inria.biomaj.ant.task.net/RemoteCommand@" source="//@children.3" target="//@children.9" targetEnd="//@children.3/@sourceConnections.1/@children.2" label="//@children.3/@sourceConnections.1/@children.0" sourceEnd="//@children.3/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="210,132" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl at impl+org.inria.biomaj.ant.task.net/RemoteCommand@|org.inria.biomaj.ant.task.net/RemoteCommand#" attachSource="true" roleLabel="//@children.3/@sourceConnections.1/@children.1/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="1487,261" size="0,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="impl" location="0,43" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl at impl+org.inria.biomaj.ant.task.net/RemoteCommand@|org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#impl" multiplicityLabel="//@children.3/@sourceConnections.1/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.1/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" # impl" location="1671,261" size="31,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1684,292" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajRsync" location="219,509" size="140,64" id="org.inria.biomaj.ant.task.net/BmajRsync" runTimeClassModel="setUserid(Ljava.lang.String;),setRemotedir(Ljava.lang.String;),setServer(Ljava.lang.String;),continueOnError,cmd,setPassword(Ljava.lang.String;),userid,getUserid(),BmajRsync(),server,getFailonerror(),password,failonerror,getRemotedir(),setListing(Ljava.lang.String;),toDir,execute(),setFailonerror(Ljava.lang.String;),setToDir(Ljava.lang.String;),listing,getPassword(),getToDir(),getListing(),getServer(),remotedir">
+ <children xsi:type="editmodel:CompartmentEditModel" size="142,171"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="191,304"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0 //@children.18/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task.net/BmajRsync" source="//@children.4" target="//@children.6" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="68,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="193,311" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.4" target="//@children.16" targetEnd="//@children.4/@sourceConnections.1/@children.1" sourceEnd="//@children.4/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="69,64" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="139,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0" name="BmajWget" location="470,509" size="151,64" id="org.inria.biomaj.ant.task.net/BmajWget" runTimeClassModel="errorDetected(),protocol,computCuteDir(Ljava.lang.String;),setUseWget(Ljava.lang.String;),log(Ljava.lang.String;I),setUserid(Ljava.lang.String;),nThread,setRemotedir(Ljava.lang.String;),port,executeWithWget(),setServer(Ljava.lang.String;),treeMapErrorDownload,setPassword(Ljava.lang.String;),userid,useWget,computePathLinkFile(Ljava.lang.String;I),getUserid(),setNbFileDownload(I),setPort(Ljava.lang.String;),server,nbFileDownload,password,getRemotedir(),downloadIsOk(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),getFileToDownload(),getNbFileDownload(),setListing(Ljava.lang.String;),toDir,execute(),setProtocol(Ljava.lang.String;),attributFilesDownload,executeWithoutWget(),setToDir(Ljava.lang.String;),thereAreDownloadFile(),nB_TENTATIV_GLOBAL,org.inria.biomaj.ant.task.net.BmajWget.TwoValue,diffRemoteLocalFile(Ljava.lang.String;JJ),logDownload(I),setErrorOnChild(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),listing,getToDir(),getPassword(),getListing(),getProtocol(),remotedir,getServer()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="176,266"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="454,589"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="119,114"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task.net/BmajWget" source="//@children.5" target="//@children.4/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="74,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.5" target="//@children.17" targetEnd="//@children.5/@sourceConnections.1/@children.1" sourceEnd="//@children.5/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="75,64" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="220,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.4/@sourceConnections.0 //@children.8/@sourceConnections.0" name="BmajTask" location="419,154" size="386,311" id="org.inria.biomaj.ant.task/BmajTask" runTimeClassModel="filterProcessTerminatedIsOk,filterAddLocalOfflineFile,log(Ljava.lang.String;I),addLocalOnlineFile(Ljava.lang.String;),addDownloadFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),filterAddExtractedFile,filterAddDownloadedFile,addLocalOfflineFile(Ljava.lang.String;),regExpAddExtractedFile,regExpAddLocalOfflineFile,filterAddProductionFile,filterAddLocalOnlineFile,regExpAddLocalOnlineFile,addProductionFile(Ljava.lang.String;Ljava.lang.String;Z),regExpAddDownloadedFile,addExtractFile(Ljava.lang.String;Ljava.lang.String;),filterAddProcess,regExpAddProductionFile">
+ <children xsi:type="editmodel:CompartmentEditModel" size="187,228">
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddDownloadedFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddDownloadedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddExtractedFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddExtractedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddLocalOfflineFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddLocalOfflineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddLocalOnlineFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddLocalOnlineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddProcess" id="org.inria.biomaj.ant.task/BmajTask#filterAddProcess"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddProductionFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddProductionFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterProcessTerminatedIsOk" id="org.inria.biomaj.ant.task/BmajTask#filterProcessTerminatedIsOk"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddDownloadedFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddDownloadedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddExtractedFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddExtractedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddLocalOfflineFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddLocalOfflineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddLocalOnlineFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddLocalOnlineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddProductionFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddProductionFile"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="426,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.3/@sourceConnections.0" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajTask" source="//@children.6" target="//@children.7" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="193,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="109,64" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.6/@sourceConnections.0" name="Task" location="834,40" size="218,64" id="org.apache.tools.ant/Task">
+ <children xsi:type="editmodel:CompartmentEditModel" size="168,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="374,551"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" backgroundRGB="255,139,139" location="69,45" size="440,60" fontInfo="Arial-12-1" note="BmajWget et BmajRsync herite de Bmajtask
Ces taches sont dédiés au telechargement des fichiers">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.8" target="//@children.6" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="394,60" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="44,15"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.11/@sourceConnections.0 //@children.3/@sourceConnections.1 //@children.14/@sourceConnections.0" name="RemoteCommandImpl" location="1710,243" size="490,86" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="109,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="749,532"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="270,295"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="FtpImpl" location="1714,628" size="391,64" id="org.inria.biomaj.internal.ant.task.net/FtpImpl" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="188,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,171"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/FtpImpl" source="//@children.10" target="//@children.11/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="147,-2" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="-1351,-181" anchorKind="FixedAtEdge" attachSource="true"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="HttpImpl" location="1960,500" size="386,64" id="org.inria.biomaj.internal.ant.task.net/HttpImpl" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="103,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.13/@sourceConnections.0 //@children.10/@sourceConnections.0 //@children.12/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/HttpImpl" source="//@children.11" target="//@children.9" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="193,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="245,86" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="LocalImpl" location="1569,789" size="424,93" id="org.inria.biomaj.internal.ant.task.net/LocalImpl" runTimeClassModel="listDir(Ljava.lang.String;Ljava.lang.String;),LocalImpl(Lorg.apache.tools.ant.Task;),listFiles(Ljava.lang.String;Ljava.lang.String;),init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),disconnect(),listFiles">
+ <children xsi:type="editmodel:CompartmentEditModel" size="76,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="listFiles" id="java.io/File at listFiles+org.inria.biomaj.internal.ant.task.net/LocalImpl@|java.io/File#listFiles"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/LocalImpl" source="//@children.12" target="//@children.11/@sourceConnections.0" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="231,-1" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="-1129,1"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="RsyncImpl" location="2234,589" size="395,64" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="101,57"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,285"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/RsyncImpl" source="//@children.13" target="//@children.11/@sourceConnections.0" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="197,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" backgroundRGB="255,139,139" location="1840,45" size="510,110" fontInfo="Arial-12-1" note="RemoteCommandeImpl implemente certaines methodes 
d'acces distant qui necessite pas la connaissance du protocole.
Cette classe definit egalement des methodes abstraites que 
les procotoles doivent implementer ">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.14" target="//@children.9" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="179,110" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="309,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" backgroundRGB="255,139,139" location="1219,19" size="540,60" fontInfo="Arial-12-1" note="Les Objets RemoteCommand (RemoteListing et getRelease) 
s'abstrait du protocole en utilisant la classe RemoteCommandeImpl.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" source="//@children.15" target="//@children.3" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="285,60" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="150,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.4/@sourceConnections.1" backgroundRGB="255,227,192" location="149,673" size="358,60" fontInfo="Arial-12-0" note="BmajRsync est utilisé pour le téléchargement
utilisant le protocol RSYNC"/>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.5/@sourceConnections.1 //@children.0/@sourceConnections.1" backgroundRGB="255,227,192" location="325,829" size="360,60" fontInfo="Arial-12-0" note="Wget est utilsé pour le telechargement 
avec le protocol HTTP et FTP "/>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.19/@sourceConnections.0" name="BmajCopy" location="698,510" size="321,86" id="org.inria.biomaj.ant.task/BmajCopy" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="142,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="237,228"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajCopy" source="//@children.18" target="//@children.4/@sourceConnections.0" targetEnd="//@children.18/@sourceConnections.0/@children.1" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="160,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" backgroundRGB="255,227,192" location="899,765" size="342,60" fontInfo="Arial-12-0" note="BmajCopy est utilisé pour le telechargement 
(copie) en miode LOCAL">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.19" target="//@children.18" targetEnd="//@children.19/@sourceConnections.0/@children.1" sourceEnd="//@children.19/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="59,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="260,86"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/net/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant remote task BioMAJ.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/org.inria.biomaj.ant.task.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/org.inria.biomaj.ant.task.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/org.inria.biomaj.ant.task.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.ant.task" metadata="uml2-1.0" initialized="true" scrolledX="1129" scrolledY="-45" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="BmajCreateListLinkFileName" location="1480,160" size="228,112" id="org.inria.biomaj.ant.task/BmajCreateListLinkFileName" runTimeClassModel="getPropertyfilelist(),propertyfilelist,filelist,org.inria.biomaj.ant.task.BmajCreateListLinkFileName.FileFilterString,execute(),findAnsWriteFileLinkName(Ljava.io.File;),setPropertyfilelist(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="118,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="filelist" id="org.inria.biomaj.ant.task/BmajCreateListLinkFileName#filelist"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="propertyfilelist" id="org.inria.biomaj.ant.task/BmajCreateListLinkFileName#propertyfilelist"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="220,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="252,143"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajCreateListLinkFileName" source="//@children.0" target="//@children.18" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="228,92" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,18"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="XIncludeTask" location="1780,500" size="238,168" id="org.inria.biomaj.ant.task/XIncludeTask" runTimeClassModel="out,setIn(Ljava.lang.String;),loadRootNode(Ljava.io.File;),fillXInclude(Lorg.jdom.Element;Ljava.lang.String;),getIn(),printNode(Lorg.jdom.Element;),execute(),setOut(Ljava.lang.String;),in,write(Lorg.jdom.Element;Ljava.lang.String;),getOut()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="68,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="in" id="org.inria.biomaj.ant.task/XIncludeTask#in"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="out" id="org.inria.biomaj.ant.task/XIncludeTask#out"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="262,171"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/XIncludeTask" source="//@children.1" target="//@children.18" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="118,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="133,64"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajCheckFrequency" location="1845,-40" size="179,130" id="org.inria.biomaj.ant.task/BmajCheckFrequency" runTimeClassModel="setValue(Ljava.lang.String;),getNumberFrequency(),value,getValue(),frequency,execute(),getFrequency(),setFrequency(Ljava.lang.String;),frequencyIsOk()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="100,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="frequency" id="org.inria.biomaj.ant.task/BmajCheckFrequency#frequency"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="value" id="org.inria.biomaj.ant.task/BmajCheckFrequency#value"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="187,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajCheckFrequency" source="//@children.2" target="//@children.18" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="89,130" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="169,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajVersionManagement" location="2110,280" size="202,64" id="org.inria.biomaj.ant.task/BmajVersionManagement" runTimeClassModel="dELETE,cREATE,setMode(Ljava.lang.String;),flatDirectory,setNbVersion(Ljava.lang.String;),fLAT_DIRECTORY,nbVersion,getNameNewDirectory(),mODE,createDirectory(Ljava.lang.String;),rESULTS,getDirectoriesVersions(),rebuild(),createNextDirectoryVersion(),getNbVersion(),setRelease(Ljava.lang.String;),getLastNumberFromVersion(Ljava.util.Vector;),getBank(),setProdDirectory(Ljava.lang.String;),setBank(Ljava.lang.String;),getProdDirectory(),numberVersion,gET,rEBUILD,sEP_NUMBER_OF_RELEASE_VERSION,getRelease(Ljava.lang.String;),getFlatDirectory(),release,remoteReleaseExistOnLocalDatabase(Ljava.util.Vector;),setNumberVersion(I),mode,getRoot(),execute(),setRoot(Ljava.lang.String;),bank,deleteOldVersion(),getNumberVersion(),getRelease(),copy(Ljava.lang.String;Ljava.lang.String;),root,createNextReleaseLink(Ljava.io.File;),getLastDirectoryCreated(),setFlatDirectory(Ljava.lang.String;),prodDirectory,getMode(),sEP_RELEASE">
+ <children xsi:type="editmodel:CompartmentEditModel" size="257,323"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="263,551"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajVersionManagement" source="//@children.3" target="//@children.18" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,9" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="271,55"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajLink" location="1560,-31" size="248,112" id="org.inria.biomaj.ant.task/BmajLink" runTimeClassModel="createDirectoryNeeded(Ljava.lang.String;),setTodir(Ljava.lang.String;),BmajLink(),execute(),todir,fileSets,getTodir(),addFileSet(Lorg.apache.tools.ant.types.FileSet;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="92,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="fileSets" id="org.apache.tools.ant.types/FileSet at fileSets+org.inria.biomaj.ant.task/BmajLink@|org.apache.tools.ant.types/FileSet#fileSets"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="todir" id="org.inria.biomaj.ant.task/BmajLink#todir"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="272,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajLink" source="//@children.4" target="//@children.18" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="226,112" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="21,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DirectoryVersionManagementFilter" location="2299,178" size="269,93" id="org.inria.biomaj.ant.task/DirectoryVersionManagementFilter" runTimeClassModel="accept(Ljava.io.File;Ljava.lang.String;),DirectoryVersionManagementFilter(Ljava.lang.String;),bankName">
+ <children xsi:type="editmodel:CompartmentEditModel" size="105,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="bankName" id="org.inria.biomaj.ant.task/DirectoryVersionManagementFilter#bankName"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="293,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="java.io/FilenameFilter<-org.inria.biomaj.ant.task/DirectoryVersionManagementFilter" source="//@children.5" target="//@children.19" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="101,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="150,120"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajGetRelativePath" location="2110,425" size="190,149" id="org.inria.biomaj.ant.task/BmajGetRelativePath" runTimeClassModel="relativPath,getRelativPath(),setAbsolutePath(Ljava.lang.String;),setFromPath(Ljava.lang.String;),getAbsolutePath(),execute(),absolutePath,fromPath,setRelativPath(Ljava.lang.String;),getFromPath()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="115,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="absolutePath" id="org.inria.biomaj.ant.task/BmajGetRelativePath#absolutePath"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fromPath" id="org.inria.biomaj.ant.task/BmajGetRelativePath#fromPath"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="relativPath" id="org.inria.biomaj.ant.task/BmajGetRelativePath#relativPath"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="214,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajGetRelativePath" source="//@children.6" target="//@children.18" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,1" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="177,64"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajCheckFreeSpace" location="2440,862" size="221,64" id="org.inria.biomaj.ant.task/BmajCheckFreeSpace" runTimeClassModel="execute()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="67,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajCheckFreeSpace" source="//@children.7" target="//@children.17/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="110,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajRsync" location="941,1045" size="173,245" id="org.inria.biomaj.ant.task.net/BmajRsync" runTimeClassModel="setUserid(Ljava.lang.String;),setRemotedir(Ljava.lang.String;),setServer(Ljava.lang.String;),continueOnError,cmd,setPassword(Ljava.lang.String;),userid,getUserid(),BmajRsync(),server,getFailonerror(),password,failonerror,getRemotedir(),setListing(Ljava.lang.String;),toDir,execute(),setFailonerror(Ljava.lang.String;),setToDir(Ljava.lang.String;),listing,getPassword(),getToDir(),getListing(),getServer(),remotedir">
+ <children xsi:type="editmodel:CompartmentEditModel" size="142,171">
+ <children xsi:type="editmodel:AttributeEditModel" name="cmd" id="org.apache.tools.ant.types/Commandline at cmd+org.inria.biomaj.ant.task.net/BmajRsync@|org.apache.tools.ant.types/Commandline#cmd"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="continueOnError" id="org.inria.biomaj.ant.task.net/BmajRsync#continueOnError"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="failonerror" id="org.inria.biomaj.ant.task.net/BmajRsync#failonerror"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listing" id="org.inria.biomaj.ant.task.net/BmajRsync#listing"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="password" id="org.inria.biomaj.ant.task.net/BmajRsync#password"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remotedir" id="org.inria.biomaj.ant.task.net/BmajRsync#remotedir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="server" id="org.inria.biomaj.ant.task.net/BmajRsync#server"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="toDir" id="org.inria.biomaj.ant.task.net/BmajRsync#toDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="userid" id="org.inria.biomaj.ant.task.net/BmajRsync#userid"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="191,304"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task.net/BmajRsync" source="//@children.8" target="//@children.17/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="86,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajMove" location="1140,840" size="187,187" id="org.inria.biomaj.ant.task/BmajMove" runTimeClassModel="setMode(Ljava.lang.String;),getToDir(),execute_move(Lorg.apache.tools.ant.types.FileSet;),mode,toDir,execute(),mODE_COPY,mODE_MOVE,vFilesSet,setToDir(Ljava.lang.String;),addConfiguredFileSet(Lorg.apache.tools.ant.types.FileSet;),execute_copy(Lorg.apache.tools.ant.types.FileSet;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="122,95">
+ <children xsi:type="editmodel:AttributeEditModel" name="mODE_COPY" id="org.inria.biomaj.ant.task/BmajMove#mODE_COPY"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mODE_MOVE" id="org.inria.biomaj.ant.task/BmajMove#mODE_MOVE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mode" id="org.inria.biomaj.ant.task/BmajMove#mode"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="toDir" id="org.inria.biomaj.ant.task/BmajMove#toDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="vFilesSet" id="org.apache.tools.ant.types/FileSet at vFilesSet+org.inria.biomaj.ant.task/BmajMove@|org.apache.tools.ant.types/FileSet#vFilesSet"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="211,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajMove" source="//@children.9" target="//@children.17/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="93,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="FileCheck" location="1170,1270" size="334,590" id="org.gmod.biomaj.ant.task.net/FileCheck" runTimeClassModel="ftpFilesNeeded,keepOfflineFile,setExtractFileList(Ljava.io.File;),copyFileList,remoteDir,finished(),port,setServer(Ljava.lang.String;),setOfflineDir(Ljava.io.File;),checkInput(),lastUpdateSession,listingfile,localFiles,addFileToExtractList(Ljava.lang.String;),getTaskName(),up2dateFile,addFileToCopyList(Ljava.lang.String;),setKeepOfflineFileList(Ljava.io.File;),countKeepOffline,sizeToDownload,getKeepOfflineFileList(),execute(),setLocalFiles(Ljava.lang.String;),copyFile,onlineDir,countCopyLocalOffline,getProtocol(),countExtract,getPort(),protocol,getRemoteDir(),extractFileList,getLocalNameFromStateFile(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;Z),addFileToDownloadList(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),setCopyFileList(Ljava.io.File;),setOutput(Ljava.io.File;),server,extractFile,filesUncompressedOnOffline,keepOfflineFileList,setUpdateFile(Ljava.io.File;),setIO(),up2dateFileWriter,output,offlineDir,setProtocol(Ljava.lang.String;),countCopy,addFileToKeepOfflineList(Ljava.lang.String;),setOnlineDir(Ljava.io.File;),ftpListingFile,setPort(I),setRemoteDir(Ljava.lang.String;),setListingFile(Ljava.io.File;),getServer(),countDownload">
+ <children xsi:type="editmodel:CompartmentEditModel" size="197,513">
+ <children xsi:type="editmodel:AttributeEditModel" name="copyFile" id="org.gmod.biomaj.ant.task.net/FileCheck#copyFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="copyFileList" id="org.gmod.biomaj.ant.task.net/FileCheck#copyFileList"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="countCopy" id="org.gmod.biomaj.ant.task.net/FileCheck#countCopy"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="countCopyLocalOffline" id="org.gmod.biomaj.ant.task.net/FileCheck#countCopyLocalOffline"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="countDownload" id="org.gmod.biomaj.ant.task.net/FileCheck#countDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="countExtract" id="org.gmod.biomaj.ant.task.net/FileCheck#countExtract"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="countKeepOffline" id="org.gmod.biomaj.ant.task.net/FileCheck#countKeepOffline"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="extractFile" id="org.gmod.biomaj.ant.task.net/FileCheck#extractFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="extractFileList" id="org.gmod.biomaj.ant.task.net/FileCheck#extractFileList"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filesUncompressedOnOffline" id="org.gmod.biomaj.ant.task.net/FileCheck#filesUncompressedOnOffline"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="ftpFilesNeeded" id="org.gmod.biomaj.ant.task.net/FileCheck#ftpFilesNeeded"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="ftpListingFile" id="org.gmod.biomaj.ant.task.net/FileCheck#ftpListingFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="keepOfflineFile" id="org.gmod.biomaj.ant.task.net/FileCheck#keepOfflineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="keepOfflineFileList" id="org.gmod.biomaj.ant.task.net/FileCheck#keepOfflineFileList"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lastUpdateSession" id="org.gmod.biomaj.ant.task.net/FileCheck#lastUpdateSession"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listingfile" id="org.gmod.biomaj.ant.task.net/FileCheck#listingfile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="localFiles" id="org.gmod.biomaj.ant.task.net/FileCheck#localFiles"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="offlineDir" id="org.gmod.biomaj.ant.task.net/FileCheck#offlineDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="onlineDir" id="org.gmod.biomaj.ant.task.net/FileCheck#onlineDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="output" id="org.gmod.biomaj.ant.task.net/FileCheck#output"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="port" id="org.gmod.biomaj.ant.task.net/FileCheck#port"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="protocol" id="org.gmod.biomaj.ant.task.net/FileCheck#protocol"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteDir" id="org.gmod.biomaj.ant.task.net/FileCheck#remoteDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="server" id="org.gmod.biomaj.ant.task.net/FileCheck#server"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sizeToDownload" id="org.gmod.biomaj.ant.task.net/FileCheck#sizeToDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="up2dateFile" id="org.gmod.biomaj.ant.task.net/FileCheck#up2dateFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="up2dateFileWriter" id="org.gmod.biomaj.ant.task.net/FileCheck#up2dateFileWriter"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="398,532"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.gmod.biomaj.ant.task.net/FileCheck" source="//@children.10" target="//@children.17/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="167,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajExecute" location="2080,830" size="313,460" id="org.inria.biomaj.ant.task/BmajExecute" runTimeClassModel="getNameFileInformationProcess(Ljava.lang.String;),getName(),setKeyName(Ljava.lang.String;),getKillAllOnError(),replacePropertiesValues(Ljava.lang.String;),rELEASE_OLD_FILES_LIST,killAllOnError,getTimeStampExe(Ljava.lang.String;),verifAttributs(),rELEASE_ALL_COMPRESSED_FILES_LIST,setKillAllOnError(Ljava.lang.String;),setExe(Ljava.lang.String;),getPathExe(Lorg.apache.tools.ant.Project;Ljava.lang.String;),getInfoLastProcesses(Ljava.lang.String;),rELEASE_ALL_UNCOMPRESSED_FILES_LIST,setName(Ljava.lang.String;),fILE_PROCESS_INFORMATION,dEPENDANCE_VOLATILE__FILTER,name,exe,mESSAGE_PROPERTY_ERROR,eND_FILTER,type,getKeyName(),args,setArgs(Ljava.lang.String;),keyName,dEPENDANCE_FILTER,execute(),pROPERTY_ERROR,getExe(),getDescription(),getArgs(),setType(Ljava.lang.String;),getType(),rELEASE_NEW_FILES_LIST,wARNING_FILTER,description,getProperty(Ljava.lang.String;),setDescription(Ljava.lang.String;),killAll">
+ <children xsi:type="editmodel:CompartmentEditModel" size="290,361">
+ <children xsi:type="editmodel:AttributeEditModel" name="args" id="org.inria.biomaj.ant.task/BmajExecute#args"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dEPENDANCE_FILTER" id="org.inria.biomaj.ant.task/BmajExecute#dEPENDANCE_FILTER"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dEPENDANCE_VOLATILE__FILTER" id="org.inria.biomaj.ant.task/BmajExecute#dEPENDANCE_VOLATILE__FILTER"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="description" id="org.inria.biomaj.ant.task/BmajExecute#description"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="eND_FILTER" id="org.inria.biomaj.ant.task/BmajExecute#eND_FILTER"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="exe" id="org.inria.biomaj.ant.task/BmajExecute#exe"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fILE_PROCESS_INFORMATION" id="org.inria.biomaj.ant.task/BmajExecute#fILE_PROCESS_INFORMATION"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="keyName" id="org.inria.biomaj.ant.task/BmajExecute#keyName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="killAll" id="org.inria.biomaj.ant.task/BmajExecute#killAll"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="killAllOnError" id="org.inria.biomaj.ant.task/BmajExecute#killAllOnError"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mESSAGE_PROPERTY_ERROR" id="org.inria.biomaj.ant.task/BmajExecute#mESSAGE_PROPERTY_ERROR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="name" id="org.inria.biomaj.ant.task/BmajExecute#name"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="pROPERTY_ERROR" id="org.inria.biomaj.ant.task/BmajExecute#pROPERTY_ERROR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rELEASE_ALL_COMPRESSED_FILES_LIST" id="org.inria.biomaj.ant.task/BmajExecute#rELEASE_ALL_COMPRESSED_FILES_LIST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rELEASE_ALL_UNCOMPRESSED_FILES_LIST" id="org.inria.biomaj.ant.task/BmajExecute#rELEASE_ALL_UNCOMPRESSED_FILES_LIST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rELEASE_NEW_FILES_LIST" id="org.inria.biomaj.ant.task/BmajExecute#rELEASE_NEW_FILES_LIST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rELEASE_OLD_FILES_LIST" id="org.inria.biomaj.ant.task/BmajExecute#rELEASE_OLD_FILES_LIST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="type" id="org.inria.biomaj.ant.task/BmajExecute#type"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="wARNING_FILTER" id="org.inria.biomaj.ant.task/BmajExecute#wARNING_FILTER"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="324,418"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajExecute" source="//@children.11" target="//@children.17/@sourceConnections.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="156,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajAddLocalFile" location="1930,1330" size="192,112" id="org.inria.biomaj.ant.task/BmajAddLocalFile" runTimeClassModel="setFile(Ljava.lang.String;),file,getFileList(),getTaskName(),execute(),setFileList(Ljava.lang.String;),fileList,getFile()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="82,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="file" id="org.inria.biomaj.ant.task/BmajAddLocalFile#file"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fileList" id="org.inria.biomaj.ant.task/BmajAddLocalFile#fileList"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="151,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajAddLocalFile" source="//@children.12" target="//@children.17/@sourceConnections.0" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="96,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajExtract" location="1371,840" size="328,206" id="org.inria.biomaj.ant.task/BmajExtract" runTimeClassModel="check(Ljava.io.File;Lorg.apache.tools.ant.Task;),includesfile,execute(),setFailonerror(Ljava.lang.String;),dir,continueOnError,containsCompressedFormat(Ljava.lang.String;),setDir(Ljava.lang.String;),uncompressedFile(Ljava.lang.String;Ljava.lang.String;Lorg.apache.tools.ant.Task;),removeExtension(Ljava.lang.String;),setIncludesfile(Ljava.lang.String;),getDiffListing(Ljava.util.Vector;Ljava.util.Vector;),getTargetDirectory(Ljava.lang.String;Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="142,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="continueOnError" id="org.inria.biomaj.ant.task/BmajExtract#continueOnError"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dir" id="org.inria.biomaj.ant.task/BmajExtract#dir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="includesfile" id="org.inria.biomaj.ant.task/BmajExtract#includesfile"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="352,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajExtract" source="//@children.13" target="//@children.17/@sourceConnections.0" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="164,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajWget" location="1588,1260" size="284,340" id="org.inria.biomaj.ant.task.net/BmajWget" runTimeClassModel="errorDetected(),protocol,computCuteDir(Ljava.lang.String;),setUseWget(Ljava.lang.String;),log(Ljava.lang.String;I),setUserid(Ljava.lang.String;),nThread,setRemotedir(Ljava.lang.String;),port,executeWithWget(),setServer(Ljava.lang.String;),treeMapErrorDownload,setPassword(Ljava.lang.String;),userid,useWget,computePathLinkFile(Ljava.lang.String;I),getUserid(),setNbFileDownload(I),setPort(Ljava.lang.String;),server,nbFileDownload,password,getRemotedir(),downloadIsOk(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),getFileToDownload(),getNbFileDownload(),setListing(Ljava.lang.String;),toDir,execute(),setProtocol(Ljava.lang.String;),attributFilesDownload,executeWithoutWget(),setToDir(Ljava.lang.String;),thereAreDownloadFile(),nB_TENTATIV_GLOBAL,org.inria.biomaj.ant.task.net.BmajWget.TwoValue,diffRemoteLocalFile(Ljava.lang.String;JJ),logDownload(I),setErrorOnChild(Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),listing,getToDir(),getPassword(),getListing(),getProtocol(),remotedir,getServer()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="176,266">
+ <children xsi:type="editmodel:AttributeEditModel" name="attributFilesDownload" id="org.inria.biomaj.ant.task.net/BmajWget$TwoValue at attributFilesDownload+org.inria.biomaj.ant.task.net/BmajWget at this$0|org.inria.biomaj.ant.task.net/BmajWget$TwoValue#attributFilesDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listing" id="org.inria.biomaj.ant.task.net/BmajWget#listing"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nB_TENTATIV_GLOBAL" id="org.inria.biomaj.ant.task.net/BmajWget#nB_TENTATIV_GLOBAL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nThread" id="java.lang/Integer at nThread+org.inria.biomaj.ant.task.net/BmajWget@|java.lang/Integer#nThread"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nbFileDownload" id="org.inria.biomaj.ant.task.net/BmajWget#nbFileDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="password" id="org.inria.biomaj.ant.task.net/BmajWget#password"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="port" id="org.inria.biomaj.ant.task.net/BmajWget#port"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="protocol" id="org.inria.biomaj.ant.task.net/BmajWget#protocol"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remotedir" id="org.inria.biomaj.ant.task.net/BmajWget#remotedir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="server" id="org.inria.biomaj.ant.task.net/BmajWget#server"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="toDir" id="org.inria.biomaj.ant.task.net/BmajWget#toDir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="treeMapErrorDownload" id="java.lang/String at treeMapErrorDownload+org.inria.biomaj.ant.task.net/BmajWget@|java.lang/String#treeMapErrorDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="useWget" id="org.inria.biomaj.ant.task.net/BmajWget#useWget"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="userid" id="org.inria.biomaj.ant.task.net/BmajWget#userid"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="454,589"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="119,114"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task.net/BmajWget" source="//@children.14" target="//@children.17/@sourceConnections.0" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="142,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.17/@sourceConnections.0" name="BmajTask" location="1180,450" size="402,302" id="org.inria.biomaj.ant.task/BmajTask" runTimeClassModel="filterProcessTerminatedIsOk,filterAddLocalOfflineFile,log(Ljava.lang.String;I),addLocalOnlineFile(Ljava.lang.String;),addDownloadFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),filterAddExtractedFile,filterAddDownloadedFile,addLocalOfflineFile(Ljava.lang.String;),regExpAddExtractedFile,regExpAddLocalOfflineFile,filterAddProductionFile,filterAddLocalOnlineFile,regExpAddLocalOnlineFile,addProductionFile(Ljava.lang.String;Ljava.lang.String;Z),regExpAddDownloadedFile,addExtractFile(Ljava.lang.String;Ljava.lang.String;),filterAddProcess,regExpAddProductionFile">
+ <children xsi:type="editmodel:CompartmentEditModel" size="187,228">
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddDownloadedFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddDownloadedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddExtractedFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddExtractedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddLocalOfflineFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddLocalOfflineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddLocalOnlineFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddLocalOnlineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddProcess" id="org.inria.biomaj.ant.task/BmajTask#filterAddProcess"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterAddProductionFile" id="org.inria.biomaj.ant.task/BmajTask#filterAddProductionFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="filterProcessTerminatedIsOk" id="org.inria.biomaj.ant.task/BmajTask#filterProcessTerminatedIsOk"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddDownloadedFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddDownloadedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddExtractedFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddExtractedFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddLocalOfflineFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddLocalOfflineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddLocalOnlineFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddLocalOnlineFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="regExpAddProductionFile" id="org.inria.biomaj.ant.task/BmajTask#regExpAddProductionFile"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="426,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.tools.ant/Task<-org.inria.biomaj.ant.task/BmajTask" source="//@children.15" target="//@children.18" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="402,21" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="85,64"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajCopy" location="1770,840" size="213,320" id="org.inria.biomaj.ant.task/BmajCopy" runTimeClassModel="setFrom(Ljava.lang.String;),getTargetDirectory(Ljava.lang.String;),getFrom(),setListing(Ljava.lang.String;),toDir,from,execute(),setToDir(Ljava.lang.String;),cmd,continueOnError,listing,getToDir(),getNameFile(Ljava.lang.String;),setFailOnError(Z),getListing(),failOnError,BmajCopy(),remotedir,isFailOnError()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="142,133">
+ <children xsi:type="editmodel:AttributeEditModel" name="cmd" id="org.apache.tools.ant.types/Commandline at cmd+org.inria.biomaj.ant.task/BmajCopy@|org.apache.tools.ant.types/Commandline#cmd"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="continueOnError" id="org.inria.biomaj.ant.task/BmajCopy#continueOnError"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="failOnError" id="org.inria.biomaj.ant.task/BmajCopy#failOnError"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="from" id="org.inria.biomaj.ant.task/BmajCopy#from"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listing" id="org.inria.biomaj.ant.task/BmajCopy#listing"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remotedir" id="org.inria.biomaj.ant.task/BmajCopy#remotedir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="toDir" id="org.inria.biomaj.ant.task/BmajCopy#toDir"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="237,228"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajCopy" source="//@children.16" target="//@children.17/@sourceConnections.0" targetEnd="//@children.16/@sourceConnections.0/@children.1" sourceEnd="//@children.16/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="106,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BmajDelete" location="810,800" size="195,112" id="org.inria.biomaj.ant.task/BmajDelete" runTimeClassModel="setDir(Ljava.lang.String;),getDir(),execute(),setListingExclude(Ljava.lang.String;),listingExclude,dir,getListingExclude()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="116,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="dir" id="org.inria.biomaj.ant.task/BmajDelete#dir"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listingExclude" id="org.inria.biomaj.ant.task/BmajDelete#listingExclude"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="219,95"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.10/@sourceConnections.0 //@children.8/@sourceConnections.0 //@children.14/@sourceConnections.0 //@children.9/@sourceConnections.0 //@children.13/@sourceConnections.0 //@children.16/@sourceConnections.0 //@children.11/@sourceConnections.0 //@children.7/@sourceConnections.0 //@children.12/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.ant.task/BmajTask<-org.inria.biomaj.ant.task/BmajDelete" source="//@children.17" target="//@children.15" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="97,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="201,301" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.15/@sourceConnections.0 //@children.4/@sourceConnections.0 //@children.2/@sourceConnections.0 //@children.0/@sourceConnections.0 //@children.3/@sourceConnections.0 //@children.6/@sourceConnections.0 //@children.1/@sourceConnections.0" name="Task" location="1765,234" size="271,64" id="org.apache.tools.ant/Task">
+ <children xsi:type="editmodel:CompartmentEditModel" size="168,114"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="374,551"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.5/@sourceConnections.0" name="FilenameFilter" location="2250,-20" size="252,120" id="java.io/FilenameFilter">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="229,19">
+ <children xsi:type="editmodel:MethodEditModel" name="accept" id="java.io/FilenameFilter#accept(Ljava.io.File;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="960,0" size="489,146" fontInfo="Arial-8-0" note="Ce pacquage implemente l'ensemble des classes qui sont utilise dans les scripts
mirror.xml et handle_process.xml.
Elle implemente des taches sur des traitements locaux.

Toutes les taches herites de la classe Ant Task pour etre utilise dans une balise dans un script ant.

On retrouve le mapping des classes et des tag dans le fichiers workflow/biomaj_common.xml
"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler>
+ <guides position="1512"/>
+ </topRuler>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant task BioMAJ
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajCopy.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajCopy.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajCopy.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,126 @@
+package org.inria.biomaj.ant.task.test;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+import static junit.framework.Assert.assertTrue;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajCopy;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test class for BmajCopy.
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajCopy {
+
+ private static final String FROM_DIR = System.getProperty("user.home") + "/testfrom";
+ private static final String TO_DIR = System.getProperty("user.home") + "/testto";
+ private static final String LISTING_FILE = System.getProperty("user.home") + "/testlisting";
+ private static List<File> filz = new ArrayList<File>();
+
+
+ /**
+ * Creates files and directories to copy.
+ */
+ @BeforeClass
+ public static void setup() {
+ File from = new File(FROM_DIR);
+ File to = new File(TO_DIR);
+ File list = new File(LISTING_FILE);
+
+ BiomajUtils.deleteAll(from);
+ BiomajUtils.deleteAll(to);
+ list.delete();
+
+ from.mkdir();
+ populateFromDir();
+ createListing(list, filz);
+ }
+
+ /**
+ * Write the file listing to be copied
+ *
+ * @param list file name
+ * @param filz file list to write
+ */
+ private static void createListing(File list, List<File> filz) {
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(list);
+ for (File f : filz) {
+ pw.println("name=" + f.getName() +
+ ",base=" + "" +
+ ",link=" + "" +
+ ",date=" + BiomajUtils.dateToString(new Date(), Locale.US) +
+ ",size=" + f.length() +
+ ",isDir=" + f.isDirectory());
+ }
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void populateFromDir() {
+ File f1 = new File(FROM_DIR + "/test1");
+ File f2 = new File(FROM_DIR + "/test2");
+ File f3 = new File(FROM_DIR + "/test3");
+ try {
+ f1.createNewFile();
+ f2.createNewFile();
+ f3.mkdir();
+
+ filz.add(f1);
+ filz.add(f2);
+ filz.add(f3);
+
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+
+
+ @AfterClass
+ public static void cleanup() {
+ BiomajUtils.deleteAll(new File(FROM_DIR));
+ BiomajUtils.deleteAll(new File(TO_DIR));
+ new File(LISTING_FILE).delete();
+ }
+
+ /**
+ * Executes task and checks that files have been
+ * copied but not directories.
+ */
+ @Test
+ public void runTests() {
+
+ BmajCopy copy = new BmajCopy();
+ copy.setProject(new Project());
+ copy.setFrom(FROM_DIR);
+ copy.setToDir(TO_DIR);
+ copy.setListing(LISTING_FILE);
+ copy.execute();
+
+ for (File f : filz) {
+ assertTrue(f.exists());
+ if (f.isDirectory())
+ assertTrue(new File(TO_DIR + "/" + f.getName()).exists() == false);
+ else
+ assertTrue(new File(TO_DIR + "/" + f.getName()).exists());
+ }
+
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajDelete.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajDelete.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajDelete.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,100 @@
+package org.inria.biomaj.ant.task.test;
+
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajDelete;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Test class for BmajDelete
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajDelete {
+
+ private static final String DIR = System.getProperty("user.home") + "/testdir";
+ private static final String EX_FILE = System.getProperty("user.home") + "/testexclude";
+ private static List<File> excludz = new ArrayList<File>();
+
+ @BeforeClass
+ public static void setup() {
+ File dir = new File(DIR);
+ BiomajUtils.deleteAll(new File(DIR));
+ dir.mkdir();
+
+ File ex = new File(EX_FILE);
+ ex.delete();
+
+ for (int i = 0; i < 5; i++) {
+ File f = new File(DIR + "/test" + i);
+ try {
+ f.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ for (int i = 0; i < 3; i++) {
+ File f = new File(DIR + "/ex" + i);
+ try {
+ f.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ excludz.add(f);
+ }
+
+ createListing(ex, excludz);
+
+ }
+
+ private static void createListing(File list, List<File> filz) {
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(list);
+ for (File f : filz) {
+ pw.println(f.getAbsolutePath());
+ }
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Executes the tasks and checks that only the specified
+ * files in excludz list remain.
+ */
+ @Test
+ public void runTests() {
+ BmajDelete del = new BmajDelete();
+ del.setProject(new Project());
+ del.setDir(DIR);
+ del.setListingExclude(EX_FILE);
+ del.execute();
+
+ File f = new File(DIR);
+ assertTrue(f.list().length == excludz.size());
+ for (File fl : excludz)
+ assertTrue(fl.exists());
+ }
+
+ @AfterClass
+ public static void cleanup() {
+ BiomajUtils.deleteAll(new File(DIR));
+ new File(EX_FILE).delete();
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajExtract.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajExtract.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajExtract.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,159 @@
+package org.inria.biomaj.ant.task.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajExtract;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertTrue;
+
+
+/**
+ * Test class for BmajExtract class.
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajExtract {
+
+ private static List<File> toZip = new ArrayList<File>();
+ private static final String LISTING = System.getProperty("user.home") + "/listing";
+ private static final String DIR = System.getProperty("user.home") + "/testextract";
+ private static final String ARCHIVE = DIR + "/out.zip";
+
+ /**
+ * Creates a zip archive.
+ */
+ @BeforeClass
+ public static void setup() {
+ File dir = new File(DIR);
+ BiomajUtils.deleteAll(dir);
+ dir.mkdir();
+
+ for (int i = 0; i < 5; i++) {
+ File f = new File(DIR + "/extract" + i);
+ writeRandom(f);
+ toZip.add(f);
+ }
+ createZip();
+ List<File> filz = new ArrayList<File>();
+ filz.add(new File(ARCHIVE));
+ createListing(filz);
+
+ for (File f : toZip)
+ f.delete();
+ }
+
+ /**
+ * Creates the listing file that contains the archive(s) location.
+ *
+ * @param filz
+ */
+ private static void createListing(List<File> filz) {
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(new File(LISTING));
+ for (File f : filz) {
+ pw.println(f.getName());
+ }
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Removes the directory that contained the test files.
+ */
+ @AfterClass
+ public static void cleanup() {
+ BiomajUtils.deleteAll(new File(DIR));
+ }
+
+ /**
+ * Unzips the files and checks that :
+ * - they have all been extracted to the right location
+ * - their size is the same
+ */
+ @Test
+ public void runTests() {
+ BmajExtract extract = new BmajExtract();
+ extract.setProject(new Project());
+ extract.setDir(DIR);
+ extract.setIncludesfile(LISTING);
+ extract.execute();
+
+ checkFiles();
+ }
+
+ /**
+ * Writes a random content in a file.
+ *
+ * @param file
+ */
+ private static void writeRandom(File file) {
+ file.delete();
+ String rnd = "alezkj lkj^ij mk j ifj mkjqsmkj m kjsqmdlkj qmskj " +
+ "szd kqjm kj mqskj mkfjmri mlzkrjzm lkj mlkj zoiapodjk kj zklj " +
+ "zevdmlkjb iJmZRIJMQKLJ áºROBJÃMllmkj mkj mlkjdm lkjm";
+
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(file);
+ pw.println(rnd);
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Checks existence and size.
+ */
+ private void checkFiles() {
+ for (File f : toZip) {
+ File check = new File(DIR + "/" + f.getName());
+ assertTrue(check.exists());
+ assertTrue(f.length() == check.length());
+ }
+ }
+
+ /**
+ * Method that creates the zip archive with the previously created files.
+ */
+ private static void createZip() {
+
+ byte[] buf = new byte[1024];
+
+ try {
+ ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(ARCHIVE));
+ for (File f : toZip) {
+ FileInputStream uncompressed = new FileInputStream(f);
+ zip.putNextEntry(new ZipEntry(f.getName()));
+ int count;
+ while ((count = uncompressed.read(buf)) > 0) {
+ zip.write(buf, 0, count);
+ }
+ zip.closeEntry();
+ uncompressed.close();
+ }
+ zip.close();
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajLink.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajLink.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajLink.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,113 @@
+package org.inria.biomaj.ant.task.test;
+
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.FileSet;
+import org.inria.biomaj.ant.task.BmajLink;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test class for BmajLink.
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajLink {
+
+ private static final String FROM_DIR = System.getProperty("user.home") + "/fromtestlink";
+ private static final String TO_DIR = System.getProperty("user.home") + "/totestlink";
+ private List<File> toLink;
+ private FileSet fileSet;
+
+ /**
+ * Creates source and destination directories and files to move.
+ */
+ @Before
+ public void setup() {
+ toLink = new ArrayList<File>();
+ fileSet = new FileSet();
+ new File(FROM_DIR).mkdir();
+ new File(TO_DIR).mkdir();
+
+ for (int i = 0; i < 5; i++) {
+ File f = new File(FROM_DIR + "/testmove" + i);
+ writeRandom(f);
+ toLink.add(f);
+ }
+
+ fileSet.setDir(new File(FROM_DIR));
+ }
+
+ /**
+ * Removes the directories that contained the test files.
+ */
+ @After
+ public void cleanup() {
+ BiomajUtils.deleteAll(new File(FROM_DIR));
+ BiomajUtils.deleteAll(new File(TO_DIR));
+ }
+
+ /**
+ * Test the move method via file copy.
+ */
+ @Test
+ public void runTests() {
+
+ BmajLink link = new BmajLink();
+ link.setTodir(TO_DIR);
+ link.setProject(new Project());
+ link.addFileSet(fileSet);
+ link.execute();
+
+ checkLinks();
+ }
+
+ /**
+ * Writes a random content in a file.
+ *
+ * @param file
+ */
+ private static void writeRandom(File file) {
+ file.delete();
+ String rnd = "alezkj lkj-ij mk j ifj mkjqsmkj m kjsqmdlkj qmskj " +
+ "szd kqjm kj mqskj mkfjmri mlzkrjzm lkj mlkj zoiapodjk kj zklj " +
+ "zevdmlkjb iJmZRIJMQKLJ _ROBJÃMllmkj mkj mlkjdm lkjm";
+
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(file);
+ pw.println(rnd);
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Checks existence and that it really is a link.
+ */
+ private void checkLinks() {
+ for (File f : toLink) {
+ File check = new File(TO_DIR + "/" + f.getName());
+ assertTrue(check.exists());
+ try {
+ // It is a link if canonical and absolute path are different.
+ assertTrue(!check.getCanonicalPath().equals(check.getAbsolutePath()));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajMove.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajMove.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajMove.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,140 @@
+package org.inria.biomaj.ant.task.test;
+
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.FileSet;
+import org.inria.biomaj.ant.task.BmajMove;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test class for BmajMove class.
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajMove {
+
+ private static final String FROM_DIR = System.getProperty("user.home") + "/fromtestmove";
+ private static final String TO_DIR = System.getProperty("user.home") + "/totestmove";
+ private List<File> toMove;
+ private FileSet fileSet;
+ private long size = 0;
+
+ /**
+ * Creates source and destination directories and files to move.
+ */
+ @Before
+ public void setup() {
+ toMove = new ArrayList<File>();
+ fileSet = new FileSet();
+ new File(FROM_DIR).mkdir();
+ new File(TO_DIR).mkdir();
+
+ for (int i = 0; i < 5; i++) {
+ File f = new File(FROM_DIR + "/testmove" + i);
+ writeRandom(f);
+ toMove.add(f);
+ size = f.length();
+ }
+
+ fileSet.setDir(new File(FROM_DIR));
+ }
+
+ /**
+ * Removes the directories that contained the test files.
+ */
+ @After
+ public void cleanup() {
+ BiomajUtils.deleteAll(new File(FROM_DIR));
+ BiomajUtils.deleteAll(new File(TO_DIR));
+ }
+
+ /**
+ * Test the move method via file copy.
+ */
+ @Test
+ public void runTestCopy() {
+
+ BmajMove move = new BmajMove();
+ move.setMode(BmajMove.MODE_COPY);
+ move.setToDir(TO_DIR);
+ move.addConfiguredFileSet(fileSet);
+ move.setProject(getProject());
+ move.execute();
+
+ checkFiles();
+ }
+
+ /**
+ * Test the move method via file move (rename).
+ */
+ @Test
+ public void runTestMove() {
+ BmajMove move = new BmajMove();
+ move.setMode(BmajMove.MODE_MOVE);
+ move.setToDir(TO_DIR);
+ move.setProject(getProject());
+ move.addConfiguredFileSet(fileSet);
+ move.execute();
+
+ checkFiles();
+ }
+
+ /**
+ * Initializes a project with the required properties.
+ *
+ * @return
+ */
+ private Project getProject() {
+ Project p = new Project();
+ p.setProperty(BiomajConst.dataDirProperty, System.getProperty("user.home"));
+ p.setProperty(BiomajConst.offlineDirProperty, "fromtestmove");
+
+ return p;
+ }
+
+ /**
+ * Writes a random content in a file.
+ *
+ * @param file
+ */
+ private static void writeRandom(File file) {
+ file.delete();
+ String rnd = "alezkj lkj-ij mk j ifj mkjqsmkj m kjsqmdlkj qmskj " +
+ "szd kqjm kj mqskj mkfjmri mlzkrjzm lkj mlkj zoiapodjk kj zklj " +
+ "zevdmlkjb iJmZRIJMQKLJ _ROBJÃMllmkj mkj mlkjdm lkjm";
+
+ PrintWriter pw;
+ try {
+ pw = new PrintWriter(file);
+ pw.println(rnd);
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Checks existence and size.
+ */
+ private void checkFiles() {
+ for (File f : toMove) {
+ File check = new File(TO_DIR + "/" + f.getName());
+ assertTrue(check.exists());
+ assertTrue(size == check.length());
+ assertTrue(!f.exists());
+ }
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajVersionManagement.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajVersionManagement.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/ant/task/test/TestBmajVersionManagement.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,157 @@
+package org.inria.biomaj.ant.task.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.sql.Statement;
+import java.util.Date;
+import java.util.Locale;
+
+import static junit.framework.Assert.assertTrue;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajVersionManagement;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test class for BmajVersionManagement.
+ *
+ * @author rsabas
+ *
+ */
+public class TestBmajVersionManagement {
+
+ private final String DIR = System.getProperty("user.home") + "/testversionmanagement";
+ private final String bankName = "test";
+ private final String release = "x1";
+
+ /**
+ * Creates the production directories, links and the related records in the test database.
+ * The creation date is modified so that it is different for each directory.
+ */
+ @Before
+ public void setup() {
+
+ SQLConnectionFactory.setTestMode(true);
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ conn.createDB();
+ String query = "INSERT INTO bank(name) values('" + bankName + "')";
+
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+
+ new File(DIR + "/dir1").mkdirs();
+ query = "INSERT INTO productionDirectory(remove,creation,size,state,session,path,ref_idbank) " +
+ "VALUES('" + BiomajUtils.dateToString(new Date(), Locale.US) + "','" + BiomajUtils.dateToString(new Date(new Date().getTime() - 10000), Locale.US) +
+ "','1M','deleted',12121,'" + DIR + "/dir1',0)";
+ conn.executeUpdate(query, stat);
+
+
+ new File(DIR + "/dir2").mkdirs();
+ query = "INSERT INTO productionDirectory(remove,creation,size,state,session,path,ref_idbank) " +
+ "VALUES('" + BiomajUtils.dateToString(new Date(), Locale.US) + "','" + BiomajUtils.dateToString(new Date(new Date().getTime() - 5000), Locale.US) +
+ "','1M','available',12121,'" + DIR + "/dir2',0)";
+ conn.executeUpdate(query, stat);
+
+
+ File current = new File(DIR + "/dir3");
+ current.mkdirs();
+ query = "INSERT INTO productionDirectory(remove,creation,size,state,session,path,ref_idbank) " +
+ "VALUES(null,'" + BiomajUtils.dateToString(new Date(), Locale.US) +
+ "','1M','available',12121,'" +DIR + "/dir3',0)";
+ conn.executeUpdate(query, stat);
+
+ try {
+ SQLConnectionFactory.closeConnection(stat);
+ BiomajUtils.createLinkOnFileSystem(current, BiomajConst.currentLink);
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @After
+ public void cleanup() {
+ BiomajUtils.deleteAll(new File(DIR));
+ }
+
+ /**
+ * Checks that the latest directory is retrieved.
+ */
+ @Test
+ public void testGet() {
+
+ BmajVersionManagement v = getBmajVersionManagement();
+ Project p = new Project();
+ v.setProject(p);
+ v.setMode(BmajVersionManagement.GET);
+ v.execute();
+
+ assertTrue(p.getProperty("prod.dir").equals(DIR + "/dir3"));
+ }
+
+ /**
+ * Checks that the next directory is created and the associated future link.
+ */
+ @Test
+ public void testCreate() {
+
+ BmajVersionManagement v = getBmajVersionManagement();
+ Project p = new Project();
+ v.setProject(p);
+ v.setMode(BmajVersionManagement.CREATE);
+ v.execute();
+
+ File f = new File(DIR + "/" + bankName + "_" + release);
+ assertTrue(f.exists());
+ File link = new File(DIR + "/" + BiomajConst.futureReleaseLink);
+ assertTrue(link.exists());
+ try {
+ assertTrue(link.getCanonicalPath().equals(f.getAbsolutePath()));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Checks that the links are correctly set.
+ */
+ @Test
+ public void testRebuild() {
+
+ BmajVersionManagement v = getBmajVersionManagement();
+ Project p = new Project();
+ v.setProject(p);
+ v.setMode(BmajVersionManagement.REBUILD);
+ v.execute();
+
+ File current = new File(DIR + "/" + BiomajConst.currentLink);
+ File future = new File(DIR + "/" + BiomajConst.futureReleaseLink);
+
+ try {
+ assertTrue(current.getCanonicalPath().equals(DIR + "/dir2"));
+ assertTrue(future.getCanonicalPath().equals(DIR + "/dir3"));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private BmajVersionManagement getBmajVersionManagement() {
+ BmajVersionManagement v = new BmajVersionManagement();
+ v.setNbVersion("2");
+ v.setBank(bankName);
+ v.setRoot(DIR);
+ v.setFlatDirectory("flat.dir");
+ v.setProdDirectory("prod.dir");
+ v.setRelease(release);
+
+ return v;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankFactory.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankFactory.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankFactory.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,620 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.inria.biomaj.ant.task.net.RemoteCommand;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class BankFactory {
+
+
+ public BiomajBank createBank(String bankName,boolean verbose) throws BiomajException {
+ return createBank(bankName,false,verbose);
+ }
+ /**
+ */
+ public BiomajBank createBank(String bankName,boolean testMode,boolean verbose) throws BiomajException {
+
+ if ((bankName==null)||(bankName.trim().compareTo("")==0))
+ throw new BiomajException("bankfactory.error.banks.blank",bankName);
+
+ Properties bankProperties = new Properties();
+ File file = null;
+
+ File global_properties = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+BiomajConst.globalProperties);
+ addProperties(bankProperties,global_properties);
+
+ File parent = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR));
+ for (File f : parent.listFiles()) {
+ if (f.getName().equalsIgnoreCase(bankName + ".properties")) {
+ file = f;
+ break;
+ }
+ }
+
+// file = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+bankName+".properties");
+
+
+ if (file == null) {
+ throw new BiomajException("bankfactory.error.banks.exist",bankName);
+ }
+
+ addProperties(bankProperties, file);
+
+ // 0.9.3.0 notion d include dans le fichier de propriete :
+ while (bankProperties.containsKey(BiomajConst.includePropertiesProperty)) {
+ String[] filesToInclude = bankProperties.getProperty(BiomajConst.includePropertiesProperty).split(",");
+ bankProperties.remove(BiomajConst.includePropertiesProperty);
+ String base = BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR);
+ for ( String f : filesToInclude )
+ addProperties(bankProperties, new File(base+"/"+f));
+ }
+
+
+ //postulat : A bank can't be a virtual and depends bank !
+ boolean isVirtual = false;
+ boolean isDepends = false;
+
+ if (bankProperties.containsKey(BiomajConst.virtualListProperty))
+ {
+ isVirtual = true;
+ if (bankProperties.getProperty(BiomajConst.virtualListProperty).trim().compareTo("")==0)
+ {
+ isVirtual = false;
+ bankProperties.remove(BiomajConst.virtualListProperty);
+ }
+ }
+
+ if (bankProperties.containsKey(BiomajConst.dependsListProperty))
+ {
+ isDepends = true;
+ if (bankProperties.getProperty(BiomajConst.dependsListProperty).trim().compareTo("")==0)
+ {
+ isDepends = false;
+ bankProperties.remove(BiomajConst.dependsListProperty);
+ }
+ }
+
+ if (bankProperties.containsKey(BiomajConst.mailSmtpHostProperty)||
+ bankProperties.containsKey(BiomajConst.mailAdminProperty)||
+ bankProperties.containsKey(BiomajConst.mailFromProperty)) {
+
+
+ if (!bankProperties.containsKey(BiomajConst.mailSmtpHostProperty)) {
+ System.err.println(BiomajConst.mailSmtpHostProperty+" are not defined in global properties. ["+
+ BiomajConst.mailAdminProperty+"="+bankProperties.getProperty(BiomajConst.mailAdminProperty)+"]");
+ throw new BiomajException("biomaj.property.define.error",bankName,BiomajConst.mailSmtpHostProperty);
+
+ }
+
+ if (!bankProperties.containsKey(BiomajConst.mailAdminProperty)) {
+ System.err.println(BiomajConst.mailAdminProperty+" are not defined in global properties. ["+
+ BiomajConst.mailAdminProperty+"="+bankProperties.getProperty(BiomajConst.mailAdminProperty)+"]");
+ throw new BiomajException("biomaj.property.define.error",bankName,BiomajConst.mailAdminProperty);
+ }
+
+ if (!bankProperties.containsKey(BiomajConst.mailFromProperty)) {
+ System.err.println(BiomajConst.mailFromProperty+" are not defined in global properties. ["+
+ BiomajConst.mailFromProperty+"="+bankProperties.getProperty(BiomajConst.mailFromProperty)+"]");
+ throw new BiomajException("biomaj.property.define.error",bankName,BiomajConst.mailAdminProperty);
+ }
+ }
+
+ if (isDepends) {
+ constructAndCheckPropertiesForDependsBank(bankProperties,file.getAbsolutePath(),verbose);
+ }
+
+ if (!isVirtual)
+ {
+ boolean isOk = checkProperties(bankProperties,file.getAbsolutePath(),verbose);
+ if (!isOk)
+ throw new BiomajException("bankfactory.error.property",bankName);
+ }
+
+ if (isVirtual&&isDepends)
+ throw new BiomajException("bankfactory.error.incompatible.virtual.depends",bankName);//"bankfactory.error.incompatible.virtual.depends",bankName);
+
+ if (isVirtual) {
+ return createVirtualBank(bankProperties,testMode);
+ } else if (isDepends) {
+ return createDependsBank(bankProperties,testMode);
+ }
+
+ if (bankProperties.getProperty(BiomajConst.offlineDirProperty).compareTo("")==0){
+ String offlineDir = "biomaj_tmp/"+bankProperties.getProperty(BiomajConst.dbNameProperty);
+ offlineDir += "_tmp";
+ bankProperties.setProperty(BiomajConst.offlineDirProperty,offlineDir);
+ }
+
+ if (bankProperties.getProperty(BiomajConst.versionDirProperty).compareTo("")==0){
+ String offlineDir = bankProperties.getProperty(BiomajConst.dbNameProperty);
+ bankProperties.setProperty(BiomajConst.versionDirProperty,offlineDir);
+ }
+
+ //bankProperties.list(System.out);
+
+ return new RemoteBank(bankProperties);
+
+ }
+
+
+ public BiomajBank createBankSet(String[] banks,boolean testMode) throws BiomajException {
+ BankSet b = new BankSet();
+
+ for (int i=0; i<banks.length;i++) {
+ b.addListBanks(createBank(banks[i],testMode));
+ }
+
+ return b;
+ }
+
+
+ protected BiomajBank createVirtualBank(Properties props,boolean testMode) throws BiomajException {
+
+ VirtualBank b = new VirtualBank(props);
+
+ String listBank = props.getProperty(BiomajConst.virtualListProperty);
+
+ if (listBank == null)
+ throw new NullPointerException("virtual bank property bad defined !");
+
+ String[] banks = listBank.split(",");
+
+ for (int i=0; i<banks.length;i++) {
+ b.addListBanks(createBank(banks[i],testMode));
+ }
+
+ return b;
+ }
+
+ protected BiomajBank createDependsBank(Properties props,boolean testMode) throws BiomajException {
+
+ ComputedBank b = new ComputedBank(props);
+
+ String listBank = props.getProperty(BiomajConst.dependsListProperty);
+
+ if (listBank == null)
+ throw new NullPointerException("virtual bank property bad defined !");
+
+ String[] banks = listBank.split(",");
+
+ for (int i=0; i<banks.length;i++) {
+ b.addListBanks(createBank(banks[i],testMode));
+ }
+
+ return b;
+ }
+
+ protected void addProperties(Properties in_out_props,File toAdd) throws BiomajException {
+
+ if (toAdd == null)
+ throw new BiomajException("error.dev","var fileToAdd is null !");
+
+ if (!toAdd.exists()) {
+ throw new BiomajException("io.error","file ["+toAdd.getAbsolutePath()+"] does not exist!");
+ }
+
+ try {
+ Properties bankProperties = new Properties();
+ FileInputStream fis = new FileInputStream(toAdd);
+ bankProperties.load(fis);
+ fis.close();
+ Enumeration<?> keys = bankProperties.keys();
+ while (keys.hasMoreElements()) {
+ String k = (String)keys.nextElement();
+ if (in_out_props.contains(k))
+ in_out_props.remove(k);
+
+ in_out_props.put(k, getRecursiveProperty( in_out_props,bankProperties,k,(String)bankProperties.get(k)));
+ }
+
+ } catch (FileNotFoundException e) {
+ System.err.println("ERROR BIOMAJ file not found:"+e.getMessage());
+ } catch (IOException ioe) {
+ System.err.println("ERROR BIOMAJ: ioexception"+ioe.getMessage());
+ }
+ }
+
+ private String getRecursiveProperty(Properties prop1,Properties prop2,String keyOrigine,String value) throws BiomajException {
+
+ if (value == null || value.compareTo("")==0)
+ return "";
+
+ //dans le cas des arguments d'un process on n'effactue pas de verif
+ if (keyOrigine.endsWith(".args"))
+ return value;
+
+ if (value.startsWith("${"))
+ {
+ String key = value.replace("${", "");
+ key = key.replace("}", "");
+
+ if (key.trim().compareTo(keyOrigine)==0)
+ throw new BiomajException("bankfactory.recursive.key",keyOrigine);
+
+ String val ="" ;
+ if (prop1.containsKey(key)) {
+ val = (String) prop1.get(key);
+ } else if (prop2.containsKey(key)) {
+ val = (String) prop2.get(key);
+ } else {
+ String name = "";
+ if (prop1.containsKey(BiomajConst.dbNameProperty))
+ name = prop1.getProperty(BiomajConst.dbNameProperty);
+ else if (prop2.containsKey(BiomajConst.dbNameProperty))
+ name = prop2.getProperty(BiomajConst.dbNameProperty);
+ throw new BiomajException("biomaj.property.define.error",name,key);
+ }
+
+ return getRecursiveProperty(prop1,prop2,key,val);
+ }
+
+ return value;
+ }
+
+ public static String getRecursiveProperty(Hashtable<String, String> prop,String keyOrigine) throws BiomajException {
+
+ if ((prop == null)||(keyOrigine == null))
+ throw new BiomajException("error.dev","Properties data are not set.");
+
+ if (!prop.containsKey(keyOrigine)) {
+ String name = "";
+ if (prop.containsKey(BiomajConst.dbNameProperty))
+ name = prop.get(BiomajConst.dbNameProperty);
+ throw new BiomajException("biomaj.property.define.error",name,keyOrigine);
+ }
+
+ String value = prop.get(keyOrigine);
+
+
+ if (value.startsWith("${"))
+ {
+ String key = value.replace("${", "");
+ key = key.replace("}", "");
+
+ if (key.trim().compareTo(keyOrigine)==0)
+ throw new BiomajException("bankfactory.recursive.key",keyOrigine);
+
+ if (prop.containsKey(key)) {
+ return getRecursiveProperty(prop,key);
+ }
+ }
+
+ return value;
+ }
+
+ protected void checkRegExp(Properties bankProperties,String property,String fileName) throws BiomajException {
+
+ if (bankProperties.containsKey(property))
+ {
+ String value = bankProperties.getProperty(property);
+ String[] values = value.split("\\s");
+ String val="";
+ try {
+ for (int i=0;i<values.length;i++) {
+ val = values[i];
+ Pattern.compile(val);
+ }
+ } catch (PatternSyntaxException pse) {
+ System.err.println(pse.getMessage());
+ throw new BiomajException("bankfactory.error.property.regexpr",val,property,fileName);
+ }
+ }
+
+ }
+
+ protected void checkProperty(Properties bankProperties,String property,String fileName) throws BiomajException {
+
+ if (!bankProperties.containsKey(property) || (bankProperties.get(property).toString().trim().compareTo("")==0))
+ throw new BiomajException("bankfactory.error.property.exist",property,fileName);
+
+ }
+
+ protected void checkProcesses(Properties bankProperties,String block,String property) throws BiomajException {
+
+ if ((!bankProperties.containsKey(property)&&(block==null)))
+ return;
+
+ String dbName = bankProperties.getProperty(BiomajConst.dbNameProperty);
+
+ if ((!bankProperties.containsKey(property)&&(block!=null)))
+ throw new BiomajException("bankfactory.error.block.dbproperty",dbName,block);
+
+ String lMeta = ((String)bankProperties.get(property));
+
+ if (lMeta.trim().compareTo("")==0)
+ return;
+
+ String[] listMeta = lMeta.split(",");
+ for (String metaProcess : listMeta) {
+
+ if (!bankProperties.containsKey(metaProcess))
+ throw new BiomajException("bankfactory.error.metaprocess.exist",dbName,metaProcess);
+
+ String list = ((String)bankProperties.get(metaProcess));
+
+ if (list.trim().compareTo("")==0)
+ throw new BiomajException("bankfactory.error.metaprocess.empty",dbName,metaProcess);
+
+ String[] listProcess = list.split(",");
+
+
+ for (String process: listProcess) {
+
+ if (!bankProperties.containsKey(process+".name"))
+ throw new BiomajException("bankfactory.error.process.exist",dbName,process+".name");
+ if (!bankProperties.containsKey(process+".exe"))
+ throw new BiomajException("bankfactory.error.process.exist",dbName,process+".exe");
+ if (!bankProperties.containsKey(process+".args"))
+ throw new BiomajException("bankfactory.error.process.exist",dbName,process+".args");
+ if (!bankProperties.containsKey(process+".desc"))
+ throw new BiomajException("bankfactory.error.process.exist",dbName,process+".desc");
+ if (!bankProperties.containsKey(process+".type"))
+ throw new BiomajException("bankfactory.error.process.exist",dbName,process+".type");
+ }
+ }
+ }
+
+
+ protected void checkUnicityProcessName(Properties bankProperties) throws BiomajException {
+ ArrayList<String> blocks = new ArrayList<String>();
+ ArrayList<String> metas = new ArrayList<String>();
+ ArrayList<String> processes = new ArrayList<String>();
+
+ if (bankProperties.containsKey(BiomajConst.blockPostprocessProperty)) {
+ Collections.addAll(blocks, ((String)bankProperties.get(BiomajConst.blockPostprocessProperty)).split(","));
+ } else {
+ if (bankProperties.containsKey(BiomajConst.dbPostProcessProperty)) {
+ Collections.addAll(metas,((String)bankProperties.get(BiomajConst.dbPostProcessProperty)).split(","));
+ }
+ }
+
+ for (String block : blocks) {
+ if (bankProperties.containsKey(block+"."+BiomajConst.dbPostProcessProperty))
+ Collections.addAll(metas, ((String)bankProperties.get(block+"."+BiomajConst.dbPostProcessProperty)).split(","));
+ }
+
+ for (String meta : metas) {
+ if (bankProperties.containsKey(meta))
+ Collections.addAll(processes, ((String)bankProperties.get(meta)).split(","));
+ }
+
+ if (blocks.size()>0) {
+ for (String block : blocks) {
+ for (String meta : metas) {
+ for (String proc : processes) {
+ if (proc.compareTo(meta)==0) {
+ throw new BiomajException("bankfactory.error.meta-process.name",proc);
+ }
+ if (proc.compareTo(block)==0) {
+ throw new BiomajException("bankfactory.error.block-process.name",proc);
+ }
+ if (block.compareTo(meta)==0) {
+ throw new BiomajException("bankfactory.error.block-meta.name",meta);
+ }
+ }
+ }
+ }
+ } else {
+ for (String meta : metas) {
+ for (String proc : processes) {
+ if (proc.compareTo(meta)==0) {
+ throw new BiomajException("bankfactory.error.meta-process.name",proc);
+ }
+ }
+ }
+ }
+
+
+
+
+ }
+
+ protected boolean constructAndCheckPropertiesForDependsBank(Properties bankProperties,String fileName,boolean verbose) throws BiomajException {
+
+ // la banque est forcement en mode local
+ bankProperties.setProperty(BiomajConst.serverProperty, "localhost");
+ bankProperties.setProperty(BiomajConst.protocolProperty, RemoteCommand.LOCAL_PROTOCOL);
+
+
+ if (!(bankProperties.containsKey(BiomajConst.protocolProperty)&&(bankProperties.getProperty(BiomajConst.protocolProperty).compareTo(RemoteCommand.LOCAL_PROTOCOL)==0))) {
+ if (verbose)
+ System.err.println("banks dependent are local banque -->[protocol=\"local\"]");
+ }
+
+ String[] list = bankProperties.getProperty(BiomajConst.dependsListProperty).split(",");
+
+ if (!bankProperties.containsKey(BiomajConst.flatRepositoryProperty)) {
+ if (verbose)
+ System.out.println("Default value for property "+BiomajConst.flatRepositoryProperty+" [/flat]");
+ }
+
+ if (!bankProperties.containsKey(BiomajConst.blockPostprocessProperty)) {
+ if (verbose)
+ {
+ System.out.println();
+ System.out.println("No property "+BiomajConst.blockPostprocessProperty+" defined");
+ }
+ }
+
+ if (list.length>1) {
+ if (verbose)
+ System.err.println("ERREUR DEPENDENCE");
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean checkProperties(Properties bankProperties,String fileName,boolean verbose) throws BiomajException {
+
+ checkProperty(bankProperties, BiomajConst.dbFullNameProperty,fileName);
+ checkProperty(bankProperties, BiomajConst.dbNameProperty,fileName);
+ String dbName = bankProperties.getProperty(BiomajConst.dbNameProperty);
+
+ //Contrainte sur dbname
+
+ /*if (dbName.contains(BmajVersionManagement.SEP_NUMBER_OF_RELEASE_VERSION))
+ {
+ System.err.println("dbname ["+dbName+"] can't contains ["+BmajVersionManagement.SEP_NUMBER_OF_RELEASE_VERSION+"] characters");
+ throw new BiomajException("kill.application",BiomajConst.dbNameProperty,fileName);
+ }*/
+
+
+ if (!bankProperties.containsKey(BiomajConst.dependsListProperty))
+ checkProperty(bankProperties, BiomajConst.remoteDirProperty,fileName);
+
+ checkProperty(bankProperties, BiomajConst.remoteFilesProperty,fileName);
+ checkProperty(bankProperties, BiomajConst.dataDirProperty,fileName);
+ //checkProperty(bankProperties, BiomajConst.offlineDirProperty,fileName);
+ if (!bankProperties.containsKey(BiomajConst.offlineDirProperty)) {
+ bankProperties.setProperty(BiomajConst.offlineDirProperty, dbName+"_tmp");
+ if (verbose)
+ System.out.println("offline directory not define. default value["+bankProperties.getProperty(BiomajConst.offlineDirProperty)+"]");
+ }
+
+ checkProperty(bankProperties, BiomajConst.localFilesProperty,fileName);
+ checkProperty(bankProperties, BiomajConst.frequencyProperty,fileName);
+
+ if (!bankProperties.containsKey(BiomajConst.localFilesExcludedProperty)) {
+ bankProperties.setProperty(BiomajConst.localFilesExcludedProperty, "");
+ }
+
+ if (!bankProperties.containsKey(BiomajConst.dependsListProperty))
+ checkProperty(bankProperties, BiomajConst.protocolProperty,fileName);
+
+ checkProperty(bankProperties, BiomajConst.keepOldVersionProperty,fileName);
+ try {
+ Integer k = Integer.valueOf((String)bankProperties.get(BiomajConst.keepOldVersionProperty));
+
+ if (k<0) {
+ if (verbose)
+ System.err.println("property keep.old.version must be positive ["+(String)bankProperties.get(BiomajConst.keepOldVersionProperty)+"].");
+ return false;
+ }
+ } catch (NumberFormatException ne) {
+ System.err.println("property keep.old.version must be a positive number ["+(String)bankProperties.get(BiomajConst.keepOldVersionProperty)+"].");
+ }
+ //checkProperty(bankProperties, BiomajConst.versionDirProperty,fileName);
+ if (!bankProperties.containsKey(BiomajConst.versionDirProperty)) {
+ bankProperties.setProperty(BiomajConst.versionDirProperty, dbName);
+ if (verbose)
+ System.out.println("version directory not define. default value["+bankProperties.getProperty(BiomajConst.versionDirProperty)+"]");
+ }
+
+ checkProperty(bankProperties, BiomajConst.productionDirChmodProperty,fileName);
+
+ checkRegExp(bankProperties, BiomajConst.remoteFilesProperty,fileName);
+ checkRegExp(bankProperties, BiomajConst.localFilesProperty,fileName);
+ checkRegExp(bankProperties, BiomajConst.localFilesExcludedProperty,fileName);
+
+ if (bankProperties.containsKey(BiomajConst.releaseRegExpProperty))
+ checkRegExp(bankProperties, BiomajConst.releaseRegExpProperty,fileName);
+ /*
+ if (verbose) {
+ //System.out.println("Check correspondances with\n"+BiomajConst.remoteFilesProperty+"["+bankProperties.getProperty(BiomajConst.remoteFilesProperty)+"]\n"
+ // +BiomajConst.localFilesProperty+"["+bankProperties.getProperty(BiomajConst.localFilesProperty)+"]");
+ //System.out.println("each expression of local.files has to finished with '$' to no match with remote.files!");
+ }
+ */
+ checkProcesses(bankProperties,null,BiomajConst.dbPreProcessProperty);
+
+ if ((!bankProperties.containsKey(BiomajConst.blockPostprocessProperty))||(bankProperties.getProperty(BiomajConst.blockPostprocessProperty).trim().compareTo("")==0))
+ checkProcesses(bankProperties,null,BiomajConst.dbPostProcessProperty);
+ else {
+ String[] lBlocks = bankProperties.getProperty(BiomajConst.blockPostprocessProperty).split(",");
+ for (String block : lBlocks)
+ checkProcesses(bankProperties,block,block+"."+BiomajConst.dbPostProcessProperty);
+ }
+
+ checkUnicityProcessName(bankProperties);
+
+ //Ajout 17/04/2007 O.Filangi - no.extract initialiser a faux si non initi dans le properties
+ if (!bankProperties.containsKey(BiomajConst.noExtractProperty))
+ bankProperties.setProperty(BiomajConst.noExtractProperty, "false");
+// Ajout 25/07/2007 O.Filangi server=localhost si protocol=copy
+ if (bankProperties.containsKey(BiomajConst.protocolProperty)&&(bankProperties.getProperty(BiomajConst.protocolProperty).compareTo(RemoteCommand.LOCAL_PROTOCOL)==0)) {
+ bankProperties.remove(BiomajConst.serverProperty);
+ bankProperties.setProperty(BiomajConst.serverProperty, "localhost");
+ }
+
+ //Ajout d'un test sur la construction du nom du serveur : si celui-ci contient ://, la propriet� est non valide!
+ if ((!bankProperties.containsKey(BiomajConst.dependsListProperty))&&(!bankProperties.containsKey(BiomajConst.serverProperty))) {
+ if (verbose)
+ System.err.println("server property is not set.");
+ return false;
+ }
+
+ String value = bankProperties.getProperty(BiomajConst.serverProperty);
+ if (value.contains("://")) {
+ if (verbose)
+ System.err.println("value for server property is not correct:["+value+"] (protocol must not be specified like ftp:// or http://)");
+ return false;
+ }
+
+
+ if (!bankProperties.containsKey(BiomajConst.logFilesProperty))
+ {
+ System.err.println("You have to define property ["+BiomajConst.logFilesProperty+"=true|false].");
+ return false;
+ }
+
+
+ return true;
+ }
+
+}
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankSet.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankSet.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BankSet.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,229 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+
+/**
+ * @uml.stereotype uml_id="Standard::Metaclass"
+ */
+public class BankSet extends org.inria.biomaj.exe.bank.BiomajBank {
+
+
+ public BankSet(Properties props) {
+ super(props);
+ }
+
+ public BankSet() {
+
+ }
+
+
+ @Override
+ public boolean check() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ private List<BiomajBank> biomajBank = new ArrayList<BiomajBank>();
+
+ /**
+ * Getter of the property <tt>listBanks</tt>
+ * @return Returns the biomajBank.
+ * @uml.property name="listBanks"
+ */
+ public List<BiomajBank> getListBanks() {
+ return biomajBank;
+ }
+
+ /**
+ * Returns the element at the specified position in this list.
+ * @param index index of element to return.
+ * @return the element at the specified position in this list.
+ * @see java.util.List#get(int)
+ * @uml.property name="listBanks"
+ */
+ public BiomajBank getListBanks(int i) {
+ return biomajBank.get(i);
+ }
+
+ /**
+ * Returns an iterator over the elements in this list in proper sequence.
+ * @return an iterator over the elements in this list in proper sequence.
+ * @see java.util.List#iterator()
+ * @uml.property name="listBanks"
+ */
+ public Iterator<BiomajBank> listBanksIterator() {
+ return biomajBank.iterator();
+ }
+
+ /**
+ * Returns <tt>true</tt> if this list contains no elements.
+ * @return <tt>true</tt> if this list contains no elements.
+ * @see java.util.List#isEmpty()
+ * @uml.property name="listBanks"
+ */
+ public boolean isListBanksEmpty() {
+ return biomajBank.isEmpty();
+ }
+
+ /**
+ * Returns <tt>true</tt> if this list contains the specified element.
+ * @param element element whose presence in this list is to be tested.
+ * @return <tt>true</tt> if this list contains the specified element.
+ * @see java.util.List#contains(Object)
+ * @uml.property name="listBanks"
+ */
+ public boolean containsListBanks(BiomajBank biomajBank) {
+ return this.biomajBank.contains(biomajBank);
+ }
+
+ /**
+ * Returns <tt>true</tt> if this list contains all of the elements of the specified collection.
+ * @param elements collection to be checked for containment in this list.
+ * @return <tt>true</tt> if this list contains all of the elements of the specified collection.
+ * @see java.util.List#containsAll(Collection)
+ * @uml.property name="listBanks"
+ */
+ public boolean containsAllListBanks(Collection<? extends BiomajBank> listBanks) {
+ return biomajBank.containsAll(listBanks);
+ }
+
+ /**
+ * Returns the number of elements in this list.
+ * @return the number of elements in this list.
+ * @see java.util.List#size()
+ * @uml.property name="listBanks"
+ */
+ public int listBanksSize() {
+ return biomajBank.size();
+ }
+
+ /**
+ * Returns an array containing all of the elements in this list in proper sequence.
+ * @return an array containing all of the elements in this list in proper sequence.
+ * @see java.util.List#toArray()
+ * @uml.property name="listBanks"
+ */
+ public BiomajBank[] listBanksToArray() {
+ return biomajBank.toArray(new BiomajBank[biomajBank.size()]);
+ }
+
+ /**
+ * Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.
+ * @param a the array into which the elements of this list are to be stored.
+ * @return an array containing all of the elements in this list in proper sequence.
+ * @see java.util.List#toArray(Object[])
+ * @uml.property name="listBanks"
+ */
+ public <T extends BiomajBank> T[] listBanksToArray(T[] listBanks) {
+ return biomajBank.toArray(listBanks);
+ }
+
+ /**
+ * Inserts the specified element at the specified position in this list (optional operation)
+ * @param index index at which the specified element is to be inserted.
+ * @param element element to be inserted.
+ * @see java.util.List#add(int,Object)
+ * @uml.property name="listBanks"
+ */
+ public void addListBanks(int index, BiomajBank biomajBank) {
+ this.biomajBank.add(index, biomajBank);
+ }
+
+ /**
+ * Appends the specified element to the end of this list (optional operation).
+ * @param element element to be appended to this list.
+ * @return <tt>true</tt> (as per the general contract of the <tt>Collection.add</tt> method).
+ * @see java.util.List#add(Object)
+ * @uml.property name="listBanks"
+ */
+ public boolean addListBanks(BiomajBank biomajBank) {
+ return this.biomajBank.add(biomajBank);
+ }
+
+ /**
+ * Removes the element at the specified position in this list (optional operation).
+ * @param index the index of the element to removed.
+ * @return the element previously at the specified position.
+ * @see java.util.List#remove(int)
+ * @uml.property name="listBanks"
+ */
+ public Object removeListBanks(int index) {
+ return biomajBank.remove(index);
+ }
+
+ /**
+ * Removes the first occurrence in this list of the specified element (optional operation).
+ * @param element element to be removed from this list, if present.
+ * @return <tt>true</tt> if this list contained the specified element.
+ * @see java.util.List#remove(Object)
+ * @uml.property name="listBanks"
+ */
+ public boolean removeListBanks(BiomajBank biomajBank) {
+ return this.biomajBank.remove(biomajBank);
+ }
+
+ /**
+ * Removes all of the elements from this list (optional operation).
+ * @see java.util.List#clear()
+ * @uml.property name="listBanks"
+ */
+ public void clearListBanks() {
+ biomajBank.clear();
+ }
+
+ /**
+ * Setter of the property <tt>listBanks</tt>
+ * @param listBanks the biomajBank to set.
+ * @uml.property name="listBanks"
+ */
+ public void setListBanks(List<BiomajBank> listBanks) {
+ biomajBank = listBanks;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BiomajBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BiomajBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/BiomajBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,139 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+import org.inria.biomaj.utils.BiomajConst;
+
+
+/**
+ * @uml.stereotype uml_id="Standard::Metaclass"
+ */
+public abstract class BiomajBank {
+
+ public BiomajBank() {
+ setPropertiesFromBankFile(new Properties());
+ setDbName("MAIN SESSION CITRINA");
+ setFullDbName("MAIN SESSION CITRINA");
+ }
+
+ public BiomajBank(Properties props) {
+ setPropertiesFromBankFile(props);
+ setDbName(props.getProperty(BiomajConst.dbNameProperty));
+ setFullDbName(props.getProperty(BiomajConst.dbFullNameProperty));
+ }
+ /**
+ * @uml.property name="dbName"
+ */
+ private String dbName = "";
+
+ /**
+ * Getter of the property <tt>dbName</tt>
+ * @return Returns the dbName.
+ * @uml.property name="dbName"
+ */
+ public String getDbName() {
+ return dbName;
+ }
+
+ /**
+ * Setter of the property <tt>dbName</tt>
+ * @param dbName The dbName to set.
+ * @uml.property name="dbName"
+ */
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ /**
+ * @uml.property name="fullDbName"
+ */
+ private String fullDbName = "";
+
+ /**
+ * Getter of the property <tt>fullDbName</tt>
+ * @return Returns the fullDbName.
+ * @uml.property name="fullDbName"
+ */
+ public String getFullDbName() {
+ return fullDbName;
+ }
+
+ /**
+ * Setter of the property <tt>fullDbName</tt>
+ * @param fullDbName The fullDbName to set.
+ * @uml.property name="fullDbName"
+ */
+ public void setFullDbName(String fullDbName) {
+ this.fullDbName = fullDbName;
+ }
+
+
+ /**
+ * true if property file is well formed
+ */
+ public abstract boolean check();
+
+ /**
+ * @uml.property name="propertiesFromBankFile"
+ */
+ private Properties propertiesFromBankFile = new Properties();
+
+ /**
+ * Getter of the property <tt>propertiesFromBankFile</tt>
+ * @return Returns the propertiesFromBankFile.
+ * @uml.property name="propertiesFromBankFile"
+ */
+ public Properties getPropertiesFromBankFile() {
+ return propertiesFromBankFile;
+ }
+
+ /**
+ * Setter of the property <tt>propertiesFromBankFile</tt>
+ * @param propertiesFromBankFile The propertiesFromBankFile to set.
+ * @uml.property name="propertiesFromBankFile"
+ */
+ public void setPropertiesFromBankFile(Properties propertiesFromBankFile) {
+ this.propertiesFromBankFile = propertiesFromBankFile;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputeBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputeBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputeBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,52 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+
+
+public class ComputeBank extends SingleBank {
+ public ComputeBank(Properties props) {
+ super(props);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputedBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputedBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/ComputedBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,78 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+
+
+
+public class ComputedBank extends BankSet {
+
+ public ComputedBank(Properties props) {
+ super(props);
+ singleBank = new RemoteBank(props);
+ }
+ /**
+ * @uml.property name="singleBank"
+ * @uml.associationEnd multiplicity="(1 1)" aggregation="composite"
+ */
+ private SingleBank singleBank = null;
+
+ /**
+ * Getter of the property <tt>singleBank</tt>
+ * @return Returns the singleBank.
+ * @uml.property name="singleBank"
+ */
+ public SingleBank getSingleBank() {
+ return singleBank;
+ }
+
+ /**
+ * Setter of the property <tt>singleBank</tt>
+ * @param singleBank The singleBank to set.
+ * @uml.property name="singleBank"
+ */
+ public void setSingleBank(SingleBank singleBank) {
+ this.singleBank = singleBank;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/RemoteBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/RemoteBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/RemoteBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,316 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+import org.inria.biomaj.utils.BiomajConst;
+
+
+public class RemoteBank extends SingleBank {
+
+ public RemoteBank(Properties props) {
+ super(props);
+ setServer(props.getProperty(BiomajConst.serverProperty));
+ setPort(Integer.valueOf(props.getProperty(BiomajConst.portProperty)));
+ setUserName(props.getProperty(BiomajConst.userNameProperty));
+ setPassword(props.getProperty(BiomajConst.passwordProperty));
+ setFrequencyUpdate(props.getProperty(BiomajConst.frequencyProperty));
+ setReleaseFile(props.getProperty(BiomajConst.releaseFileProperty));
+ setReleaseRegExp(props.getProperty(BiomajConst.releaseRegExpProperty));
+ setRemoteDirectory(props.getProperty(BiomajConst.remoteDirProperty));
+ setLinkCopy(Boolean.valueOf(props.getProperty(BiomajConst.copyModeProperty)));
+ }
+ /**
+ * @uml.property name="server"
+ */
+ private String server = "";
+
+ /**
+ * Getter of the property <tt>server</tt>
+ * @return Returns the server.
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return server;
+ }
+
+ /**
+ * Setter of the property <tt>server</tt>
+ * @param server The server to set.
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+ /**
+ * @uml.property name="port"
+ */
+ private Integer port = -1;
+
+ /**
+ * Getter of the property <tt>port</tt>
+ * @return Returns the port.
+ * @uml.property name="port"
+ */
+ public Integer getPort() {
+ return port;
+ }
+
+ /**
+ * Setter of the property <tt>port</tt>
+ * @param port The port to set.
+ * @uml.property name="port"
+ */
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ /**
+ * @uml.property name="userName"
+ */
+ private String userName = "";
+
+ /**
+ * Getter of the property <tt>userName</tt>
+ * @return Returns the userName.
+ * @uml.property name="userName"
+ */
+ public String getUserName() {
+ return userName;
+ }
+
+ /**
+ * Setter of the property <tt>userName</tt>
+ * @param userName The userName to set.
+ * @uml.property name="userName"
+ */
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ /**
+ * @uml.property name="password"
+ */
+ private String password = "";
+
+ /**
+ * Getter of the property <tt>password</tt>
+ * @return Returns the password.
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Setter of the property <tt>password</tt>
+ * @param password The password to set.
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @uml.property name="remoteDirectory"
+ */
+ private String remoteDirectory = "";
+
+ /**
+ * Getter of the property <tt>remoteDirectory</tt>
+ * @return Returns the remoteDirectory.
+ * @uml.property name="remoteDirectory"
+ */
+ public String getRemoteDirectory() {
+ return remoteDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>remoteDirectory</tt>
+ * @param remoteDirectory The remoteDirectory to set.
+ * @uml.property name="remoteDirectory"
+ */
+ public void setRemoteDirectory(String remoteDirectory) {
+ this.remoteDirectory = remoteDirectory;
+ }
+
+ /**
+ * @uml.property name="frequencyUpdate"
+ */
+ private String frequencyUpdate = "";
+
+ /**
+ * Getter of the property <tt>frequencyUpdate</tt>
+ * @return Returns the frequencyUpdate.
+ * @uml.property name="frequencyUpdate"
+ */
+ public String getFrequencyUpdate() {
+ return frequencyUpdate;
+ }
+
+ /**
+ * Setter of the property <tt>frequencyUpdate</tt>
+ * @param frequencyUpdate The frequencyUpdate to set.
+ * @uml.property name="frequencyUpdate"
+ */
+ public void setFrequencyUpdate(String frequencyUpdate) {
+ this.frequencyUpdate = frequencyUpdate;
+ }
+
+ /**
+ * @uml.property name="releaseFile"
+ */
+ private String releaseFile = "";
+
+ /**
+ * Getter of the property <tt>releaseFile</tt>
+ * @return Returns the releaseFile.
+ * @uml.property name="releaseFile"
+ */
+ public String getReleaseFile() {
+ return releaseFile;
+ }
+
+ /**
+ * Setter of the property <tt>releaseFile</tt>
+ * @param releaseFile The releaseFile to set.
+ * @uml.property name="releaseFile"
+ */
+ public void setReleaseFile(String releaseFile) {
+ this.releaseFile = releaseFile;
+ }
+
+ /**
+ * @uml.property name="releaseRegExp"
+ */
+ private String releaseRegExp = "";
+
+ /**
+ * Getter of the property <tt>releaseRegExp</tt>
+ * @return Returns the releaseRegExp.
+ * @uml.property name="releaseRegExp"
+ */
+ public String getReleaseRegExp() {
+ return releaseRegExp;
+ }
+
+ /**
+ * Setter of the property <tt>releaseRegExp</tt>
+ * @param releaseRegExp The releaseRegExp to set.
+ * @uml.property name="releaseRegExp"
+ */
+ public void setReleaseRegExp(String releaseRegExp) {
+ this.releaseRegExp = releaseRegExp;
+ }
+
+ /**
+ * @uml.property name="protocol"
+ */
+ private String protocol = "";
+
+ /**
+ * Getter of the property <tt>protocol</tt>
+ * @return Returns the protocol.
+ * @uml.property name="protocol"
+ */
+ public String getProtocol() {
+ return protocol;
+ }
+
+ /**
+ * Setter of the property <tt>protocol</tt>
+ * @param protocol The protocol to set.
+ * @uml.property name="protocol"
+ */
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * @uml.property name="extract"
+ */
+ private Boolean extract = true;
+
+ /**
+ * Getter of the property <tt>extract</tt>
+ * @return Returns the extract.
+ * @uml.property name="extract"
+ */
+ public Boolean getExtract() {
+ return extract;
+ }
+
+ /**
+ * Setter of the property <tt>extract</tt>
+ * @param extract The extract to set.
+ * @uml.property name="extract"
+ */
+ public void setExtract(Boolean extract) {
+ this.extract = extract;
+ }
+
+ /**
+ * If true, Biomaj create link from the online directory for files which not need to be downloaded, copy files otherwise
+ * @uml.property name="linkCopy"
+ */
+ private Boolean linkCopy = true;
+
+ /**
+ * Getter of the property <tt>linkCopy</tt>
+ * @return Returns the linkCopy.
+ * @uml.property name="linkCopy"
+ */
+ public Boolean getLinkCopy() {
+ return linkCopy;
+ }
+
+ /**
+ * Setter of the property <tt>linkCopy</tt>
+ * @param linkCopy The linkCopy to set.
+ * @uml.property name="linkCopy"
+ */
+ public void setLinkCopy(Boolean linkCopy) {
+ this.linkCopy = linkCopy;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/SingleBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/SingleBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/SingleBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,201 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+import org.inria.biomaj.utils.BiomajConst;
+
+/**
+ * @uml.stereotype uml_id="Standard::Metaclass"
+ */
+public class SingleBank extends org.inria.biomaj.exe.bank.BiomajBank {
+
+ public SingleBank(Properties props) {
+ super(props);
+ setDataDirectory(props.getProperty(BiomajConst.dataDirProperty));
+ setOfflineDirectory(props.getProperty(BiomajConst.offlineDirProperty));
+ setLocalFilesRegExp(props.getProperty(BiomajConst.localFilesProperty));
+ setDbType(props.getProperty(BiomajConst.typeProperty));
+ setKeepOldVersion(Integer.valueOf(props.getProperty(BiomajConst.keepOldVersionProperty)));
+ }
+ @Override
+ public boolean check() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /**
+ * @uml.property name="dataDirectory"
+ */
+ private String dataDirectory = "";
+
+ /**
+ * Getter of the property <tt>dataDirectory</tt>
+ * @return Returns the dataDirectory.
+ * @uml.property name="dataDirectory"
+ */
+ public String getDataDirectory() {
+ return dataDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>dataDirectory</tt>
+ * @param dataDirectory The dataDirectory to set.
+ * @uml.property name="dataDirectory"
+ */
+ public void setDataDirectory(String dataDirectory) {
+ this.dataDirectory = dataDirectory;
+ }
+
+ /**
+ * @uml.property name="offlineDirectory"
+ */
+ private String offlineDirectory = "";
+
+ /**
+ * Getter of the property <tt>offlineDirectory</tt>
+ * @return Returns the offlineDirectory.
+ * @uml.property name="offlineDirectory"
+ */
+ public String getOfflineDirectory() {
+ return offlineDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>offlineDirectory</tt>
+ * @param offlineDirectory The offlineDirectory to set.
+ * @uml.property name="offlineDirectory"
+ */
+ public void setOfflineDirectory(String offlineDirectory) {
+ this.offlineDirectory = offlineDirectory;
+ }
+
+ /**
+ * @uml.property name="localFilesRegExp"
+ */
+ private String localFilesRegExp = "";
+
+ /**
+ * Getter of the property <tt>localFilesRegExp</tt>
+ * @return Returns the localFilesRegExp.
+ * @uml.property name="localFilesRegExp"
+ */
+ public String getLocalFilesRegExp() {
+ return localFilesRegExp;
+ }
+
+ /**
+ * Setter of the property <tt>localFilesRegExp</tt>
+ * @param localFilesRegExp The localFilesRegExp to set.
+ * @uml.property name="localFilesRegExp"
+ */
+ public void setLocalFilesRegExp(String localFilesRegExp) {
+ this.localFilesRegExp = localFilesRegExp;
+ }
+
+ /**
+ * @uml.property name="dbType"
+ */
+ private String dbType = "";
+
+ /**
+ * Getter of the property <tt>dbType</tt>
+ * @return Returns the dbType.
+ * @uml.property name="dbType"
+ */
+ public String getDbType() {
+ return dbType;
+ }
+
+ /**
+ * Setter of the property <tt>dbType</tt>
+ * @param dbType The dbType to set.
+ * @uml.property name="dbType"
+ */
+ public void setDbType(String dbType) {
+ this.dbType = dbType;
+ }
+
+ /**
+ * @uml.property name="keepOldVersion"
+ */
+ private Integer keepOldVersion = 0;
+
+ /**
+ * Getter of the property <tt>keeOldVersion</tt>
+ * @return Returns the keeOldVersion.
+ * @uml.property name="keeOldVersion"
+ */
+ public Integer getKeepOldVersion() {
+ return keepOldVersion;
+ }
+
+ /**
+ * Setter of the property <tt>keeOldVersion</tt>
+ * @param keeOldVersion The keeOldVersion to set.
+ * @uml.property name="keeOldVersion"
+ */
+ public void setKeepOldVersion(Integer keeOldVersion) {
+ this.keepOldVersion = keeOldVersion;
+ }
+
+ private ComputedBank dependsBank;
+
+ /**
+ * Getter of the property <tt>dependsBank</tt>
+ * @return Returns the dependsBank.
+ * @uml.property name="dependsBank"
+ */
+ public ComputedBank getDependsBank() {
+ return dependsBank;
+ }
+
+ /**
+ * Setter of the property <tt>dependsBank</tt>
+ * @param dependsBank The dependsBank to set.
+ * @uml.property name="dependsBank"
+ */
+ public void setDependsBank(ComputedBank dependsBank) {
+ this.dependsBank = dependsBank;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/VirtualBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/VirtualBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/VirtualBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.bank;
+
+import java.util.Properties;
+
+
+
+public class VirtualBank extends BankSet {
+
+ public VirtualBank(Properties props) {
+ super(props);
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/org.inria.biomaj.exe.bank.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/org.inria.biomaj.exe.bank.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/org.inria.biomaj.exe.bank.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.exe.bank" metadata="uml2-1.0" initialized="true" scrolledX="-215" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.9/@sourceConnections.0" name="BankFactory" location="-210,80" size="521,160" id="org.inria.biomaj.exe.bank/BankFactory" runTimeClassModel="createBank(Ljava.lang.String;Z),getRecursiveProperty(Ljava.util.Hashtable;Ljava.lang.String;),createBank(Ljava.lang.String;ZZ),createBankSet([Ljava.lang.String;Z)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="629,266">
+ <children xsi:type="editmodel:MethodEditModel" name="createBank" id="org.inria.biomaj.exe.bank/BankFactory#createBank(Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createBankSet" id="org.inria.biomaj.exe.bank/BankFactory#createBankSet([Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createBank" id="org.inria.biomaj.exe.bank/BankFactory#createBank(Ljava.lang.String;ZZ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRecursiveProperty" id="org.inria.biomaj.exe.bank/BankFactory#getRecursiveProperty(Ljava.util.Hashtable;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.bank/BankFactory->org.inria.biomaj.exe.bank/BiomajBank" source="//@children.0" target="//@children.6" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="521,80" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,110"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPublicMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ComputedBank" location="834,960" size="241,160" id="org.inria.biomaj.exe.bank/ComputedBank" runTimeClassModel="singleBank,getSingleBank(),setSingleBank(Lorg.inria.biomaj.exe.bank.SingleBank;),ComputedBank(Ljava.util.Properties;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="129,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="singleBank" id="org.inria.biomaj.exe.bank/SingleBank at singleBank+org.inria.biomaj.exe.bank/ComputedBank@|org.inria.biomaj.exe.bank/SingleBank#singleBank"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="218,57">
+ <children xsi:type="editmodel:MethodEditModel" name="ComputedBank" id="org.inria.biomaj.exe.bank/ComputedBank#ComputedBank(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSingleBank" id="org.inria.biomaj.exe.bank/ComputedBank#getSingleBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSingleBank" id="org.inria.biomaj.exe.bank/ComputedBank#setSingleBank(Lorg.inria.biomaj.exe.bank.SingleBank;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.bank/BankSet<-org.inria.biomaj.exe.bank/ComputedBank" source="//@children.1" target="//@children.3/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="120,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0 //@children.8/@sourceConnections.0" name="SingleBank" location="354,429" size="290,481" id="org.inria.biomaj.exe.bank/SingleBank" runTimeClassModel="localFilesRegExp,setLocalFilesRegExp(Ljava.lang.String;),setOfflineDirectory(Ljava.lang.String;),dependsBank,getKeeOldVersion(),dbType,getLocalFilesRegExp(),setDbType(Ljava.lang.String;),getDependsBank(),setKeeOldVersion(Ljava.lang.Integer;),SingleBank(Ljava.util.Properties;),getOfflineDirectory(),dataDirectory,getDbType(),getDataDirectory(),offlineDirectory,keeOldVersion,check(),setDataDirectory(Ljava.lang.String;),setDependsBank(Lorg.inria.biomaj.exe.bank.ComputedBank;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="164,114">
+ <children xsi:type="editmodel:AttributeEditModel" name="dataDirectory" id="org.inria.biomaj.exe.bank/SingleBank#dataDirectory"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dbType" id="org.inria.biomaj.exe.bank/SingleBank#dbType"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dependsBank" id="org.inria.biomaj.exe.bank/SingleBank#dependsBank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="keeOldVersion" id="org.inria.biomaj.exe.bank/SingleBank#keeOldVersion"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="localFilesRegExp" id="org.inria.biomaj.exe.bank/SingleBank#localFilesRegExp"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="offlineDirectory" id="org.inria.biomaj.exe.bank/SingleBank#offlineDirectory"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="267,266">
+ <children xsi:type="editmodel:MethodEditModel" name="SingleBank" id="org.inria.biomaj.exe.bank/SingleBank#SingleBank(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="check" id="org.inria.biomaj.exe.bank/SingleBank#check()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDataDirectory" id="org.inria.biomaj.exe.bank/SingleBank#getDataDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDbType" id="org.inria.biomaj.exe.bank/SingleBank#getDbType()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDependsBank" id="org.inria.biomaj.exe.bank/SingleBank#getDependsBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getKeeOldVersion" id="org.inria.biomaj.exe.bank/SingleBank#getKeeOldVersion()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocalFilesRegExp" id="org.inria.biomaj.exe.bank/SingleBank#getLocalFilesRegExp()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getOfflineDirectory" id="org.inria.biomaj.exe.bank/SingleBank#getOfflineDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDataDirectory" id="org.inria.biomaj.exe.bank/SingleBank#setDataDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDbType" id="org.inria.biomaj.exe.bank/SingleBank#setDbType(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDependsBank" id="org.inria.biomaj.exe.bank/SingleBank#setDependsBank(Lorg.inria.biomaj.exe.bank.ComputedBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setKeeOldVersion" id="org.inria.biomaj.exe.bank/SingleBank#setKeeOldVersion(Ljava.lang.Integer;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLocalFilesRegExp" id="org.inria.biomaj.exe.bank/SingleBank#setLocalFilesRegExp(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setOfflineDirectory" id="org.inria.biomaj.exe.bank/SingleBank#setOfflineDirectory(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.exe.bank/BiomajBank<-org.inria.biomaj.exe.bank/SingleBank" source="//@children.2" target="//@children.6" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="145,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="182,329" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="VirtualBank" location="604,960" size="200,103" id="org.inria.biomaj.exe.bank/VirtualBank" runTimeClassModel="VirtualBank(Ljava.util.Properties;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="177,19">
+ <children xsi:type="editmodel:MethodEditModel" name="VirtualBank" id="org.inria.biomaj.exe.bank/VirtualBank#VirtualBank(Ljava.util.Properties;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.1/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.exe.bank/BankSet<-org.inria.biomaj.exe.bank/VirtualBank" source="//@children.3" target="//@children.4" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="100,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="154,481" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0 //@children.8/@sourceConnections.1" name="BankSet" location="674,429" size="309,481" id="org.inria.biomaj.exe.bank/BankSet" runTimeClassModel="listBanks,listBanksToArray(),isListBanksEmpty(),listBanksIterator(),getListBanks(),removeListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;),addListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;),clearListBanks(),containsAllListBanks(Ljava.util.Collection;),setListBanks(Ljava.util.List;),removeListBanks(I),addListBanks(ILorg.inria.biomaj.exe.bank.BiomajBank;),listBanksToArray,containsListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;),biomajBank,check(),BankSet(Ljava.util.Properties;),listBanksSize(),BankSet(),getListBanks(I)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="136,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="biomajBank" id="org.inria.biomaj.exe.bank/BiomajBank at biomajBank+org.inria.biomaj.exe.bank/BankSet@|org.inria.biomaj.exe.bank/BiomajBank#biomajBank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="listBanks" id="org.inria.biomaj.exe.bank/BiomajBank at listBanks+org.inria.biomaj.exe.bank/BankSet@|org.inria.biomaj.exe.bank/BiomajBank#listBanks"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="286,342">
+ <children xsi:type="editmodel:MethodEditModel" name="BankSet" id="org.inria.biomaj.exe.bank/BankSet#BankSet(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="BankSet" id="org.inria.biomaj.exe.bank/BankSet#BankSet()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addListBanks" id="org.inria.biomaj.exe.bank/BankSet#addListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addListBanks" id="org.inria.biomaj.exe.bank/BankSet#addListBanks(ILorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="check" id="org.inria.biomaj.exe.bank/BankSet#check()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="clearListBanks" id="org.inria.biomaj.exe.bank/BankSet#clearListBanks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="containsAllListBanks" id="org.inria.biomaj.exe.bank/BankSet#containsAllListBanks(Ljava.util.Collection;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="containsListBanks" id="org.inria.biomaj.exe.bank/BankSet#containsListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListBanks" id="org.inria.biomaj.exe.bank/BankSet#getListBanks(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListBanks" id="org.inria.biomaj.exe.bank/BankSet#getListBanks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isListBanksEmpty" id="org.inria.biomaj.exe.bank/BankSet#isListBanksEmpty()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listBanksIterator" id="org.inria.biomaj.exe.bank/BankSet#listBanksIterator()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listBanksSize" id="org.inria.biomaj.exe.bank/BankSet#listBanksSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listBanksToArray" id="org.inria.biomaj.exe.bank/BankSet#listBanksToArray()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeListBanks" id="org.inria.biomaj.exe.bank/BankSet#removeListBanks(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeListBanks" id="org.inria.biomaj.exe.bank/BankSet#removeListBanks(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setListBanks" id="org.inria.biomaj.exe.bank/BankSet#setListBanks(Ljava.util.List;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.bank/BiomajBank<-org.inria.biomaj.exe.bank/BankSet" source="//@children.4" target="//@children.2/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="154,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="RemoteBank" location="294,960" size="280,730" id="org.inria.biomaj.exe.bank/RemoteBank" runTimeClassModel="getLinkCopy(),extract,protocol,getFrequencyUpdate(),getReleaseFile(),releaseFile,getRemoteDirectory(),RemoteBank(Ljava.util.Properties;),setReleaseRegExp(Ljava.lang.String;),frequencyUpdate,linkCopy,setUserName(Ljava.lang.String;),port,setServer(Ljava.lang.String;),setPassword(Ljava.lang.String;),setRemoteDirectory(Ljava.lang.String;),server,getReleaseRegExp(),setReleaseFile(Ljava.lang.String;),password,userName,remoteDirectory,setPort(Ljava.lang.Integer;),setExtract(Ljava.lang.Boolean;),setProtocol(Ljava.lang.String;),getPassword(),getProtocol(),setFrequencyUpdate(Ljava.lang.String;),getUserName(),getServer(),getPort(),releaseRegExp,setLinkCopy(Ljava.lang.Boolean;),getExtract()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="135,209">
+ <children xsi:type="editmodel:AttributeEditModel" name="extract" id="org.inria.biomaj.exe.bank/RemoteBank#extract"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="frequencyUpdate" id="org.inria.biomaj.exe.bank/RemoteBank#frequencyUpdate"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="linkCopy" id="org.inria.biomaj.exe.bank/RemoteBank#linkCopy"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="password" id="org.inria.biomaj.exe.bank/RemoteBank#password"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="port" id="org.inria.biomaj.exe.bank/RemoteBank#port"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="protocol" id="org.inria.biomaj.exe.bank/RemoteBank#protocol"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="releaseFile" id="org.inria.biomaj.exe.bank/RemoteBank#releaseFile"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="releaseRegExp" id="org.inria.biomaj.exe.bank/RemoteBank#releaseRegExp"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteDirectory" id="org.inria.biomaj.exe.bank/RemoteBank#remoteDirectory"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="server" id="org.inria.biomaj.exe.bank/RemoteBank#server"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="userName" id="org.inria.biomaj.exe.bank/RemoteBank#userName"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="257,437">
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteBank" id="org.inria.biomaj.exe.bank/RemoteBank#RemoteBank(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getExtract" id="org.inria.biomaj.exe.bank/RemoteBank#getExtract()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFrequencyUpdate" id="org.inria.biomaj.exe.bank/RemoteBank#getFrequencyUpdate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinkCopy" id="org.inria.biomaj.exe.bank/RemoteBank#getLinkCopy()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPassword" id="org.inria.biomaj.exe.bank/RemoteBank#getPassword()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPort" id="org.inria.biomaj.exe.bank/RemoteBank#getPort()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProtocol" id="org.inria.biomaj.exe.bank/RemoteBank#getProtocol()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getReleaseFile" id="org.inria.biomaj.exe.bank/RemoteBank#getReleaseFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getReleaseRegExp" id="org.inria.biomaj.exe.bank/RemoteBank#getReleaseRegExp()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteDirectory" id="org.inria.biomaj.exe.bank/RemoteBank#getRemoteDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getServer" id="org.inria.biomaj.exe.bank/RemoteBank#getServer()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUserName" id="org.inria.biomaj.exe.bank/RemoteBank#getUserName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setExtract" id="org.inria.biomaj.exe.bank/RemoteBank#setExtract(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFrequencyUpdate" id="org.inria.biomaj.exe.bank/RemoteBank#setFrequencyUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLinkCopy" id="org.inria.biomaj.exe.bank/RemoteBank#setLinkCopy(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPassword" id="org.inria.biomaj.exe.bank/RemoteBank#setPassword(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPort" id="org.inria.biomaj.exe.bank/RemoteBank#setPort(Ljava.lang.Integer;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProtocol" id="org.inria.biomaj.exe.bank/RemoteBank#setProtocol(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setReleaseFile" id="org.inria.biomaj.exe.bank/RemoteBank#setReleaseFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setReleaseRegExp" id="org.inria.biomaj.exe.bank/RemoteBank#setReleaseRegExp(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoteDirectory" id="org.inria.biomaj.exe.bank/RemoteBank#setRemoteDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setServer" id="org.inria.biomaj.exe.bank/RemoteBank#setServer(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUserName" id="org.inria.biomaj.exe.bank/RemoteBank#setUserName(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.bank/SingleBank<-org.inria.biomaj.exe.bank/RemoteBank" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="169,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="109,481" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.7/@sourceConnections.0 //@children.0/@sourceConnections.0" name="BiomajBank" location="560,50" size="364,329" id="org.inria.biomaj.exe.bank/BiomajBank" runTimeClassModel="setPropertiesFromBankFile(Ljava.util.Properties;),getDbName(),setFullDbName(Ljava.lang.String;),BiomajBank(),check(),dbName,setDbName(Ljava.lang.String;),propertiesFromBankFile,getPropertiesFromBankFile(),BiomajBank(Ljava.util.Properties;),fullDbName,getFullDbName()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="189,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="dbName" id="org.inria.biomaj.exe.bank/BiomajBank#dbName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fullDbName" id="org.inria.biomaj.exe.bank/BiomajBank#fullDbName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="propertiesFromBankFile" id="org.inria.biomaj.exe.bank/BiomajBank#propertiesFromBankFile"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="341,171">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajBank" id="org.inria.biomaj.exe.bank/BiomajBank#BiomajBank(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajBank" id="org.inria.biomaj.exe.bank/BiomajBank#BiomajBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="check" id="org.inria.biomaj.exe.bank/BiomajBank#check()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDbName" id="org.inria.biomaj.exe.bank/BiomajBank#getDbName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFullDbName" id="org.inria.biomaj.exe.bank/BiomajBank#getFullDbName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPropertiesFromBankFile" id="org.inria.biomaj.exe.bank/BiomajBank#getPropertiesFromBankFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDbName" id="org.inria.biomaj.exe.bank/BiomajBank#setDbName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFullDbName" id="org.inria.biomaj.exe.bank/BiomajBank#setFullDbName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPropertiesFromBankFile" id="org.inria.biomaj.exe.bank/BiomajBank#setPropertiesFromBankFile(Ljava.util.Properties;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1000,110" size="328,61" fontInfo="Arial-8-0" note="Ces classes correspond au mapping des fichiers de proprietes.
Le moteur de workflow (WorkflowEngine) se sert de ces classes
pour executer les taches (url, nom de banque,etc....)">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.7" target="//@children.6" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,30" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="364,90"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="-210,680" size="468,61" fontInfo="Arial-8-0" note="On caracterise deux types de workflows decrit par les fichier par les proprietes :
Les ensembles de banques (banques virtuelle, banques dependantes) et les banques unitaire
(banques distantes)">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" source="//@children.8" target="//@children.2" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="468,30" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,334"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" source="//@children.8" target="//@children.4" targetEnd="//@children.8/@sourceConnections.1/@children.1" sourceEnd="//@children.8/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="468,30" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,96"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="-150,320" size="465,44" fontInfo="Arial-8-0" note="L'objet BankFactory sert a instancier le BiomajBank associe au fichier de propriete (workflow)
Il verifie egalement les valeur des propriete definient et le fichier de propriete soit bien formé.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.9" target="//@children.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="230,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="290,160"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/bank/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of a bank abstraction used by the workflow. (Properties banks that is mapping from the properties files)
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/Biomaj.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/Biomaj.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/Biomaj.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,999 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.main;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.commons.cli2.CommandLine;
+import org.apache.commons.cli2.DisplaySetting;
+import org.apache.commons.cli2.Group;
+import org.apache.commons.cli2.Option;
+import org.apache.commons.cli2.builder.ArgumentBuilder;
+import org.apache.commons.cli2.builder.DefaultOptionBuilder;
+import org.apache.commons.cli2.builder.GroupBuilder;
+import org.apache.commons.cli2.commandline.Parser;
+import org.apache.commons.cli2.util.HelpFormatter;
+import org.apache.commons.cli2.validation.EnumValidator;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.options.BioMAJLogger;
+import org.inria.biomaj.exe.options.BiomajCleanDB;
+import org.inria.biomaj.exe.options.BiomajImport;
+import org.inria.biomaj.exe.options.BiomajMoveProductionDirectories;
+import org.inria.biomaj.exe.options.BiomajRemoveBank;
+import org.inria.biomaj.exe.options.ChangeDbName;
+import org.inria.biomaj.exe.options.IndexXmlDescription;
+import org.inria.biomaj.exe.options.StatusInformation;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ *
+ * Biomaj Main / Used Commons Jakarta CLI2 lib to handle Biomaj options.
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.9.2
+ */
+public class Biomaj {
+ /**
+ * Current version of biomaj
+ */
+ public static final String VERSION = "1.1.0";
+
+ /**
+ * Name of Environment variable to get the root application
+ */
+
+ public static final String ENV_BIOMAJ = "BIOMAJ_ROOT";
+
+ /**
+ * Builder for general option
+ */
+ final static DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
+
+ /**
+ * Argument builder
+ */
+ final static ArgumentBuilder abuilder = new ArgumentBuilder();
+
+ /**
+ * Group builder
+ */
+ final static GroupBuilder gbuilder = new GroupBuilder();
+
+ /**
+ * Sub option builder
+ */
+ final static DefaultOptionBuilder subobuilder = new DefaultOptionBuilder();
+
+ /**
+ * Group Builder to construc dependances
+ */
+ final static GroupBuilder childbuilder = new GroupBuilder();
+
+ /**
+ * SubOption Definition
+ */
+ private static Option optionStage ;
+ private static Option optionDebug ;
+ private static Option optionVerbose;
+ private static Option optionCheckCurrentProcess ;
+ private static Option optionConsole ;
+ private static Option optionNew ;
+ private static Option optionFromScratch ;
+
+ private static Option optionKeepDir ;
+ private static Option optionPaths;
+ private static Option optionAllDirs;
+ private static Option optionStatusFilterType;
+ private static Option optionStatusOnline;
+ private static Option optionStatusUpdating;
+
+ private static Option processRebuild;
+ private static Option metaRebuild;
+ private static Option blockRebuild;
+
+ public static void main (String args []) {
+
+ createOptionBase();
+// ------------------------------------------------------------------------------------
+ //Option pour Import
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("import");
+ obuilder.withShortName("I");
+ obuilder.withDescription("Populate database for a bank according to its properties file and production directory. " +
+ "Data tree directory must be in compliance with the bank properties files and biomaj tree directory organisation\n");
+
+// bank argument
+ abuilder.reset();
+ abuilder.withName("bank");
+ abuilder.withDescription("bank name");
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+ Option optionImport = obuilder.create();
+
+// ------------------------------------------------------------------------------------
+ //Option pour Index
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("index");
+ obuilder.withShortName("i");
+ obuilder.withDescription("Generate an index of all release include in repository\nby default index filename is located in : ${statefiles.dir}/index.xml\n");
+ obuilder.withRequired(false);
+// bank argument
+ abuilder.reset();
+ abuilder.withName("file");
+ abuilder.withDescription("Xml name file (saved in statefile directory)");
+ abuilder.withMinimum(0);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+ Option optionIndex = obuilder.create();
+
+
+// ------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
+ //Option pour Change-dbname
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("change-dbname");
+ obuilder.withDescription("Change the name of the workflow on the repository\n ");
+ obuilder.withRequired(false);
+// bank argument
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("");
+ abuilder.withMinimum(2);
+ abuilder.withMaximum(2);
+ obuilder.withArgument(abuilder.create());
+ //abuilder.withName("newDbname");
+ //obuilder.withArgument(abuilder.create());
+
+
+ Option optionChangeDbName = obuilder.create();
+
+// ------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------
+ //Option pour Rebuild
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("rebuild");
+ obuilder.withDescription("Rebuild bank named dbname (downgrade the current version checks data and rerun post-processing)\n");
+ obuilder.withRequired(false);
+
+// bank argument
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("bank name");
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+ abuilder.reset();
+ abuilder.withName("name");
+ //abuilder.withDescription();
+ abuilder.withMinimum(1);
+ abuilder.withSubsequentSeparator(',');
+
+ //Argument a = ;
+
+ subobuilder.reset();
+ subobuilder.withLongName("process");
+ subobuilder.withArgument(abuilder.create());
+ subobuilder.withRequired(false);
+ subobuilder.withDescription("Force the execution of process");
+ processRebuild = subobuilder.create();
+
+ //Option processRebuild =
+
+ subobuilder.reset();
+ subobuilder.withLongName("meta");
+ subobuilder.withArgument(abuilder.create());
+ subobuilder.withRequired(false);
+ subobuilder.withDescription("Force the execution of metaprocess");
+ metaRebuild = subobuilder.create();
+
+ subobuilder.reset();
+ subobuilder.withLongName("block");
+ subobuilder.withArgument(abuilder.create());
+ subobuilder.withRequired(false);
+ subobuilder.withDescription("Force the execution of block");
+ blockRebuild = subobuilder.create();
+
+ childbuilder.reset();
+ childbuilder.withOption(processRebuild);
+ childbuilder.withOption(metaRebuild);
+ childbuilder.withOption(blockRebuild);
+ childbuilder.withOption(optionConsole);
+ childbuilder.withOption(optionVerbose);
+ childbuilder.withOption(optionDebug);
+
+ obuilder.withChildren(childbuilder.create());
+
+ Option optionRebuild = obuilder.create();
+// ------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------
+ //Option pour Version
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("version");
+ obuilder.withDescription("Version information");
+ obuilder.withRequired(false);
+
+ Option optionVersion = obuilder.create();
+// ------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
+ //Option pour Clean
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("clean-database");
+ obuilder.withDescription("Delete files that no longer exist from database.\n");
+ obuilder.withRequired(false);
+
+ Option optionCleanDb = obuilder.create();
+// ------------------------------------------------------------------------------------
+ //Option pour ViewLogger
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("view-log");
+ obuilder.withDescription("view logs\n");
+ obuilder.withRequired(false);
+
+ Option optionViewLog = obuilder.create();
+// ------------------------------------------------------------------------------------
+ //Option pour Help
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("help");
+ obuilder.withDescription("Display current help message");
+ obuilder.withRequired(false);
+
+ Option optionHelp = obuilder.create();
+// ------------------------------------------------------------------------------------
+ //Option pour Move-production-directories
+ //------------------
+ obuilder.reset();
+ obuilder.withLongName("move-production-directories");
+ obuilder.withDescription("Export all production directories to a new version directory construct by the properties data.dir and version.dir.\n");
+ obuilder.withRequired(false);
+
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("bank name");
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+ Option optionMoveProductionDirectories = obuilder.create();
+// ------------------------------------------------------------------------------------
+
+ gbuilder.reset();
+ gbuilder.withName("MAIN OPTIONS:");
+ gbuilder.withMinimum(1);
+ gbuilder.withMaximum(1);
+ gbuilder.withDescription("General descriptions....");
+ Option optionUpdate = createOptionUpdate();gbuilder.withOption(optionUpdate);
+ Option optionStatus = createOptionStatus();gbuilder.withOption(optionStatus);
+ gbuilder.withOption(optionRebuild);
+ Option optionRemove = createOptionRemove();gbuilder.withOption(optionRemove);
+ gbuilder.withOption(optionImport);
+ gbuilder.withOption(optionMoveProductionDirectories);
+ gbuilder.withOption(optionIndex);
+ gbuilder.withOption(optionChangeDbName);
+ gbuilder.withOption(optionCleanDb);
+ //Pour l instant on ne traite pas cette option qui n est pas implement completement....
+ gbuilder.withOption(optionViewLog);
+ gbuilder.withOption(optionVersion);
+ gbuilder.withOption(optionHelp);
+
+ gbuilder.withMinimum(1);
+ gbuilder.withMaximum(1);
+
+ Group mutuallyExclusiveOption = gbuilder.create();
+
+ HelpFormatter hf = new HelpFormatter(" "," "," ",150);
+ hf.setShellCommand("biomaj");
+ hf.setGroup(mutuallyExclusiveOption);
+
+ hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_NAME);
+ hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_ARGUMENT);
+ hf.getFullUsageSettings().add(DisplaySetting.DISPLAY_GROUP_EXPANDED);
+
+ hf.getLineUsageSettings().remove(DisplaySetting.DISPLAY_PROPERTY_OPTION);
+ hf.getLineUsageSettings().add(DisplaySetting.DISPLAY_PARENT_ARGUMENT);
+ hf.getLineUsageSettings().add(DisplaySetting.DISPLAY_ARGUMENT_BRACKETED);
+
+ hf.getLineUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_NAME);
+ //hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_EXPANDED);
+ //hf.getLineUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_ARGUMENT);
+
+ hf.setDisplaySettings(HelpFormatter.DEFAULT_DISPLAY_USAGE_SETTINGS);
+ hf.setDivider(HelpFormatter.DEFAULT_GUTTER_RIGHT);
+
+ hf.setFooter("Biomaj Software is a workflows motor engine dedicated to biological bank managenemt."+
+ "This software is governed by the CeCILL license under French law and abiding by " +
+ "the rules of distribution of free software. You can use, modify and/ or redistribute " +
+ "the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at " +
+ "the following URL \"http://www.cecill.info\"."+"\nCopyright or Copr. INRIA/INRA\n");
+
+
+ //hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_);
+ // parse the command line arguments
+ Parser parser = new Parser();
+ parser.setGroup(mutuallyExclusiveOption);
+ parser.setHelpFormatter(hf);
+ parser.setHelpTrigger("--help");
+
+ CommandLine cl = parser.parseAndHelp(args);
+
+ if (cl==null) {
+ System.exit(-2);
+ }
+
+
+ //Test de la config general !
+ try {
+ BiomajInformation.getInstance();
+ } catch (Exception e) {
+ System.err.println(e.getLocalizedMessage());
+ System.exit(-3);
+ }
+
+// BiomajSQLQuerier.initConnection(true);
+
+ try {
+ /**********************
+ * UPDATE AND REBUILD
+ *********************/
+ if (cl.hasOption(optionUpdate)||cl.hasOption(optionRebuild)) {
+ String[] listP = null, listM= null,listB = null;
+ List<String> banks ;
+ int command = WorkflowEngine.TARGET_ALL;
+ if (cl.hasOption(optionUpdate))
+ banks = cl.getValues(optionUpdate);
+ else
+ {
+ command = WorkflowEngine.TARGET_REBUILD;
+ banks = cl.getValues(optionRebuild);
+
+ if (cl.hasOption(processRebuild)||cl.hasOption(metaRebuild)||cl.hasOption(blockRebuild)) {
+
+ listP = new String[cl.getValues(processRebuild).size()];
+
+ for (int i=0;i<cl.getValues(processRebuild).size();i++)
+ listP[i] = (String)cl.getValues(processRebuild).get(i);
+
+ listM = new String[cl.getValues(metaRebuild).size()];
+
+ for (int i=0;i<cl.getValues(metaRebuild).size();i++)
+ listM[i] = (String)cl.getValues(metaRebuild).get(i);
+
+ listB = new String[cl.getValues(blockRebuild).size()];
+
+ for (int i=0;i<cl.getValues(blockRebuild).size();i++)
+ listB[i] = (String)cl.getValues(blockRebuild).get(i);
+ }
+ }
+
+ if (cl.hasOption(optionStage)) {
+ command = getCommand((String)cl.getValue(optionStage));
+ }
+ int mode = Project.MSG_INFO;
+ if (cl.hasOption(optionVerbose)) {
+ mode = Project.MSG_VERBOSE;
+ }
+ if (cl.hasOption(optionDebug)) {
+ mode = Project.MSG_DEBUG;
+ }
+
+ processBanks(banks,command,cl.hasOption(optionConsole),mode,cl.hasOption(optionCheckCurrentProcess),cl.hasOption(optionNew),cl.hasOption(optionFromScratch),listP,listM,listB);
+ }
+ /*********************
+ * REMOVE
+ *********************/
+ else if (cl.hasOption(optionRemove)) {
+ BiomajRemoveBank brb = new BiomajRemoveBank();
+ int mode = Project.MSG_INFO;
+ if (cl.hasOption(optionVerbose)) {
+ mode = Project.MSG_VERBOSE;
+ }
+ if (cl.hasOption(optionDebug)) {
+ mode = Project.MSG_DEBUG;
+ }
+ brb.setShowConsole(cl.hasOption(optionConsole), mode);
+ brb.setBankName((String)cl.getValue(optionRemove));
+ brb.setKeepProductionDirectory(cl.hasOption(optionKeepDir));
+ if (cl.hasOption(optionAllDirs))
+ brb.executeWithoutUserInteraction(null, true);
+ else if (cl.hasOption(optionPaths))
+ brb.executeWithoutUserInteraction(cl.getValues(optionPaths), false);
+ else
+ brb.execute();
+ }
+ /**********************
+ * STATUS
+ *********************/
+ else if (cl.hasOption(optionStatus)) {
+
+
+ if ((cl.getValue(optionStatus)==null)||(cl.hasOption(optionStatusFilterType)||cl.hasOption(optionStatusUpdating)||cl.hasOption(optionStatusOnline))) {
+ String filterType = "";
+ if (cl.hasOption(optionStatusFilterType))
+ filterType = (String)cl.getValue(optionStatusFilterType);
+ StatusInformation.getStatus(filterType,cl.hasOption(optionStatusUpdating) ,cl.hasOption(optionStatusOnline));
+ } else {
+ StatusInformation.getStatus((String)cl.getValue(optionStatus));
+ }
+
+ }
+ /**********************
+ * CLEAN-DATABASE
+ *********************/
+ else if (cl.hasOption(optionCleanDb)) {
+ BiomajCleanDB.clean();
+ }
+ /**********************
+ * LOG
+ *********************/
+ else if (cl.hasOption(optionViewLog)) {
+ //ViewLogger v = new ViewLogger();
+ //ServiceLogger v = new ServiceLogger();
+ //v.execute();
+ System.out.println("Please wait...");
+ BioMAJLogger v = new BioMAJLogger();
+
+ v.execute();
+ }
+ /**********************
+ * INDEX
+ *********************/
+ else if (cl.hasOption(optionIndex)){
+ IndexXmlDescription gen = new IndexXmlDescription();
+ gen.createXmlGeneralFile((String)cl.getValue(optionIndex));
+ }
+ /**********************
+ * CHANGE-DBNAME
+ *********************/
+ else if (cl.hasOption(optionChangeDbName)) {
+ ChangeDbName.changeDbName((String)cl.getValues(optionChangeDbName).get(0), (String)cl.getValues(optionChangeDbName).get(1));
+ }
+
+ /**********************
+ * IMPORT
+ *********************/
+ else if (cl.hasOption(optionImport)) {
+ BiomajImport.importIntoDB((String)cl.getValue(optionImport));
+// BiomajSQLQuerier.closeConnection();
+ }
+ /**********************
+ * MOVE PRODUCTION VERSION
+ *********************/
+ else if (cl.hasOption(optionMoveProductionDirectories)) {
+ BiomajMoveProductionDirectories move = new BiomajMoveProductionDirectories();
+ move.moveProductionDirectories((String)cl.getValue(optionMoveProductionDirectories));
+ }
+ /**********************
+ * VERSION
+ *********************/
+ else if (cl.hasOption(optionVersion)) {
+ System.out.println("BioMAJ version "+VERSION);
+ }
+
+ } catch (Exception be) {
+ System.err.println(be.getLocalizedMessage());
+ System.err.println("** BioMAJ stopped. **");
+ BiomajLogger.getInstance().log(be.getLocalizedMessage());
+ //BiomajLogger.getInstance().close();
+ }
+ }
+
+ protected static void processBanks(List<String> banks,int command,boolean withConsole,int mode,boolean checkCurrent,boolean newUpdate,boolean fromScratch,
+ String[] listP,String[] listM,String[] listB) {
+ if (banks.size() == 0) {
+ System.out.println("There are no bank to process.");
+ return;
+ }
+
+ /*
+ for (String b : banks)
+ System.out.println("process +"+b+" "+command+Boolean.toString(withConsole)+"-"+mode+" "+Boolean.toString(checkCurrent)+"-"+Boolean.toString(newUpdate)+"-");
+ */
+ setProxyEnvironment();
+ BankFactory bf = new BankFactory();
+ List<Thread> running = new ArrayList<Thread>();
+ for (String bank : banks) {
+ try {
+// BiomajCleanStatefile.corrigeCompatibiliteVersion(bank);
+ BiomajBank bb = bf.createBank(bank,true);
+ // System.out.println("name:"+bb.getDbName());
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bb);
+ we.setModeConsole(withConsole, mode);
+ we.setWorkWithCurrentDirectory(checkCurrent);
+ we.setForceForANewUpdate(newUpdate);
+ we.setFromScratch(fromScratch);
+ we.setCommand(command);
+ we.setListBlockProcessToRebuild(listB);
+ we.setListMetaProcessToRebuild(listM);
+ we.setListProcessToRebuild(listP);
+ we.start();
+ running.add(we);
+
+ } catch (BiomajException e) {
+ // Une biomajException est affichée sur la sortie erreur par defaut!
+ System.err.println("Biomaj has detected an error! for bank ["+ bank+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err
+ .println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bank);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ // Wait for all the threads to end before closing connection
+ for (Thread t : running) {
+ try {
+ t.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+// BiomajSQLQuerier.closeConnection();
+ }
+
+ public static void createOptionBase() {
+ /**
+ * Option console
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("console");
+ subobuilder.withShortName("c");
+ subobuilder.withDescription("Open java console including logs information on workflow session");
+ subobuilder.withRequired(false);
+
+ optionConsole = subobuilder.create();
+
+ /**
+ * Option verbose
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("verbose");
+ subobuilder.withShortName("v");
+ subobuilder.withDescription("Verbose mode");
+ subobuilder.withRequired(false);
+
+ optionVerbose = subobuilder.create();
+
+ /**
+ * Option debug
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("debug");
+ subobuilder.withShortName("V");
+ subobuilder.withDescription("Extra verbose mode\n\n");
+ subobuilder.withRequired(false);
+
+ optionDebug = subobuilder.create();
+ }
+
+ /**
+ * Create update option and dependances options
+ * @since 0.9.2.0
+ * @return
+ */
+ public static Option createOptionUpdate() {
+ obuilder.reset();
+ obuilder.withLongName("update");
+ obuilder.withShortName("d");
+ obuilder.withDescription("Update specified bank (dbname)");
+
+ //bank argument
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("Bank name defined in property file");
+ abuilder.withMinimum(1);
+ abuilder.withSubsequentSeparator(',');
+
+ /*****************************
+ * Creation des options dependantes de update
+ */
+ //On peut valider si le properties existe par exemple !!!
+ //abuilder.withValidator(arg0);
+ obuilder.withArgument(abuilder.create());
+
+ //obuilder.reset();
+ //obuilder.withShortName("stage");
+ //obuilder.withDescription("starting point can be precised");
+ //stag argument
+
+ childbuilder.reset();
+ childbuilder.withName("Update options:\n");
+ //childbuilder.withDescription("");
+ childbuilder.withMinimum(0);
+
+
+ /**
+ * Option update/stage
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("stage");
+ subobuilder.withDescription("Ending point can be specified. possible stage value : preprocess|sync|postprocess|deployment");
+ subobuilder.withRequired(false);
+
+ abuilder.reset();
+ abuilder.withName("task");
+ abuilder.withDescription("Possible value: preprocess|sync|postprocess|deployment\n");
+
+ Set<String> enumSet = new TreeSet<String>();
+ enumSet.add("preprocess");
+ enumSet.add("sync");
+ enumSet.add("postprocess");
+ enumSet.add("deployment");
+
+ EnumValidator validator = new EnumValidator( enumSet );
+ abuilder.withValidator(validator);
+
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ abuilder.withInitialSeparator('=');
+ subobuilder.withArgument(abuilder.create());
+
+ optionStage = subobuilder.create();
+ childbuilder.withOption(optionStage);
+
+ childbuilder.withOption(optionConsole);
+ childbuilder.withOption(optionVerbose);
+ childbuilder.withOption(optionDebug);
+
+ /**
+ * Option update/check current process
+ */
+ /*
+ subobuilder.reset();
+ subobuilder.withLongName("check-current-postprocess");
+ subobuilder.withShortName("p");
+ subobuilder.withDescription("restart process if data have been changed or removed in the current production directory");
+ subobuilder.withRequired(false);
+
+ optionCheckCurrentProcess = subobuilder.create();
+ childbuilder.withOption(optionCheckCurrentProcess);
+ */
+ /**
+ * Option update/new update : force l'update de la banque
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("new");
+ subobuilder.withShortName("N");
+ subobuilder.withDescription("Start a new update cycle even if a unclosed update cycle is open (ps:previous sessions are ignored)\n");
+ subobuilder.withRequired(false);
+
+ optionNew = subobuilder.create();
+ childbuilder.withOption(optionNew);
+
+
+ /**
+ * Option update fromscratch : force le retelechargement de la derniere release en erreur ou non.
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("fromscratch");
+ subobuilder.withDescription("Force update from scratch of the bank by skipping the repository verification\n");
+ subobuilder.withRequired(false);
+
+ optionFromScratch = subobuilder.create();
+ childbuilder.withOption(optionFromScratch);
+
+ /**
+ * On ajoute les fils a l option update
+ */
+ obuilder.withChildren(childbuilder.create());
+
+ return obuilder.create();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public static Option createOptionStatus() {
+ obuilder.reset();
+ obuilder.withLongName("status");
+ obuilder.withShortName("S");
+ obuilder.withDescription("Print out bank status. If dbname is specified, detailed profile will be print out");
+
+// bank argument
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("Bank name defined in property file");
+ abuilder.withMinimum(0);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+ /**
+ * Option status db-type : affiche seulement les bank de type <type>
+ */
+
+ childbuilder.reset();
+ childbuilder.withName("status options:");
+ subobuilder.reset();
+ subobuilder.withLongName("dbtype");
+ subobuilder.withDescription("Filter bank list using dbtype specified");
+ subobuilder.withRequired(false);
+
+ abuilder.reset();
+ abuilder.withName("dbtype");
+ abuilder.withDescription("Filter bank listing using dbtype specifed");
+
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ abuilder.withInitialSeparator('=');
+ subobuilder.withArgument(abuilder.create());
+
+ optionStatusFilterType = subobuilder.create();
+ childbuilder.withOption(optionStatusFilterType);
+
+ /**
+ * Option status online : filtre sur les banque seulement online
+ */
+
+ subobuilder.reset();
+ subobuilder.withLongName("online");
+ subobuilder.withDescription("Filter from bank list online release");
+ subobuilder.withRequired(false);
+
+ optionStatusOnline = subobuilder.create();
+ childbuilder.withOption(optionStatusOnline);
+
+ /**
+ * Option status updating : filtre sur les banque seulement online
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("updating");
+ subobuilder.withDescription("Filter in bank list, updating session\n");
+ subobuilder.withRequired(false);
+
+ optionStatusUpdating = subobuilder.create();
+ childbuilder.withOption(optionStatusUpdating);
+
+
+ /**
+ * On ajoute les fils a l option update
+ */
+ obuilder.withChildren(childbuilder.create());
+
+ return obuilder.create();
+ }
+
+
+ /**
+ *
+ * @return
+ */
+ public static Option createOptionRemove() {
+ obuilder.reset();
+ obuilder.withLongName("remove");
+ obuilder.withDescription("Delete all productions directories (use with care!)");
+
+// bank argument
+ abuilder.reset();
+ abuilder.withName("dbname");
+ abuilder.withDescription("Bank name defined in property file");
+ abuilder.withMinimum(1);
+ abuilder.withMaximum(1);
+ obuilder.withArgument(abuilder.create());
+
+
+
+ childbuilder.reset();
+ childbuilder.withName("options:");
+ //childbuilder.withDescription("");
+ childbuilder.withMinimum(0);
+
+ /*
+ * Option remove/keep-dir-prod : si true n efface pas les repertoire de prod
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("keep-dir-prod");
+ subobuilder.withDescription("Delete/keep production directory\n\n");
+ subobuilder.withRequired(false);
+
+ optionKeepDir = subobuilder.create();
+
+ /*
+ * Option to directly specify the paths of the directories to be deleted
+ */
+ subobuilder.reset();
+ subobuilder.withLongName("paths");
+ subobuilder.withDescription("Directly specify the directories paths to be deleted");
+ subobuilder.withRequired(false);
+ abuilder.reset();
+ abuilder.withName("path");
+ abuilder.withDescription("Production directory paths");
+ abuilder.withMinimum(1);
+ subobuilder.withArgument(abuilder.create());
+
+ optionPaths = subobuilder.create();
+
+ subobuilder.reset();
+ subobuilder.withLongName("all");
+ subobuilder.withDescription("Delete all directories");
+ subobuilder.withRequired(false);
+ optionAllDirs = subobuilder.create();
+
+ childbuilder.withOption(optionPaths);
+ childbuilder.withOption(optionAllDirs);
+ childbuilder.withOption(optionKeepDir);
+ childbuilder.withOption(optionConsole);
+ childbuilder.withOption(optionVerbose);
+ childbuilder.withOption(optionDebug);
+
+ /*
+ * On ajoute les fils a l option update
+ */
+ obuilder.withChildren(childbuilder.create());
+
+ return obuilder.create();
+ }
+
+ /**
+ * Set proxy
+ * author:ofilangi
+ *
+ * a tester
+ */
+
+ private static void setProxyEnvironment() {
+ final Properties prop = new Properties();
+ try {
+ prop.load(new FileInputStream(new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+BiomajConst.globalProperties)));
+ } catch (Exception e) {
+ System.err.println(e.getMessage());
+ System.exit(-1);
+ }
+ /**
+ * AUTRE METHODE : http://floatingsun.net/articles/java-proxy.html
+ */
+
+ /*
+ if (prop.containsKey(BiomajConst.httpsProxyHost)||prop.containsKey(BiomajConst.httpsProxyPassword)||
+ prop.containsKey(BiomajConst.httpsProxyPort)||prop.containsKey(BiomajConst.httpsProxyUser)) {
+
+ System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
+ System.out.println("values for proxy https...");
+
+ if (prop.containsKey(BiomajConst.httpsProxyHost))
+ {
+ System.setProperty("https.proxyHost",prop.getProperty(BiomajConst.httpsProxyHost));
+ System.out.println("https.proxyHost:"+prop.getProperty(BiomajConst.httpsProxyHost));
+ }
+
+ if (prop.containsKey(BiomajConst.httpsProxyPort))
+ {
+ System.setProperty("https.proxyPort",prop.getProperty(BiomajConst.httpsProxyPort));
+ System.out.println("https.proxyPort"+prop.getProperty(BiomajConst.httpsProxyPort));
+ }
+
+ if (prop.containsKey(BiomajConst.httpsProxyUser))
+ {
+ System.setProperty("https.proxyUser",prop.getProperty(BiomajConst.httpsProxyUser));
+ System.out.println("https.proxyUser"+prop.getProperty(BiomajConst.httpsProxyUser));
+ }
+
+ if (prop.containsKey(BiomajConst.httpsProxyPassword))
+ {
+ System.setProperty("https.proxyPassword",prop.getProperty(BiomajConst.httpsProxyPassword));
+ System.out.println("https.proxyPassword"+prop.getProperty(BiomajConst.httpsProxyPassword));
+ }
+
+ if (prop.containsKey(BiomajConst.httpsProxyUser)&&prop.containsKey(BiomajConst.httpsProxyPassword))
+ Authenticator.setDefault( new HttpAuthenticateProxy(prop.getProperty(BiomajConst.httpsProxyUser),prop.getProperty(BiomajConst.httpsProxyPassword)) );
+
+ } else */
+ if (prop.containsKey(BiomajConst.proxyHost)||prop.containsKey(BiomajConst.proxyPassword)||
+ prop.containsKey(BiomajConst.proxyPort)||prop.containsKey(BiomajConst.proxyUser)) {
+
+ System.getProperties().put("proxySet", "true");
+
+ if (prop.containsKey(BiomajConst.proxyHost)) {
+ System.getProperties().put( "socksProxyHost" ,prop.getProperty(BiomajConst.proxyHost));
+ }
+
+ if (prop.containsKey(BiomajConst.proxyPort)) {
+ System.getProperties().put( "socksProxyPort",prop.getProperty(BiomajConst.proxyPort));
+ }
+ if (prop.containsKey(BiomajConst.proxyUser)&&prop.containsKey(BiomajConst.proxyPassword)) {
+ // Authenticate to the proxy
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(prop.getProperty(BiomajConst.proxyUser),
+ prop.getProperty(BiomajConst.proxyPassword).toCharArray());
+ }
+ });
+ System.getProperties().put("socksProxyUser", prop.getProperty(BiomajConst.proxyUser));
+ System.getProperties().put("socksProxyPassword", prop.getProperty(BiomajConst.proxyPassword));
+ }
+ }
+ }
+
+ protected static Integer getCommand(String c) {
+
+ if (c == null)
+ return WorkflowEngine.TARGET_ALL;
+
+ if (c.compareTo("preprocess") == 0)
+ return WorkflowEngine.TARGET_UNTIL_PREPROCESS;
+ if ((c.compareTo("sync") == 0) || (c.compareTo("mirror") == 0))
+ return WorkflowEngine.TARGET_UNTIL_MIRROR;
+ if (c.compareTo("postprocess") == 0)
+ return WorkflowEngine.TARGET_UNTIL_POSTPROCESS;
+ if (c.compareTo("deploy") == 0)
+ return WorkflowEngine.TARGET_UNTIL_DEPLOY;
+
+ // System.err.println(c+" unknown option!");
+ return WorkflowEngine.TARGET_ALL;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Main of the BioMAJ application
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test/RunTests.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test/RunTests.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/main/test/RunTests.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,42 @@
+package org.inria.biomaj.exe.main.test;
+
+import org.inria.biomaj.ant.task.test.TestBmajCopy;
+import org.inria.biomaj.ant.task.test.TestBmajDelete;
+import org.inria.biomaj.ant.task.test.TestBmajExtract;
+import org.inria.biomaj.ant.task.test.TestBmajLink;
+import org.inria.biomaj.ant.task.test.TestBmajMove;
+import org.inria.biomaj.ant.task.test.TestBmajVersionManagement;
+import org.inria.biomaj.exe.options.test.TestChangeDbNameOption;
+import org.inria.biomaj.exe.options.test.TestImportOption;
+import org.inria.biomaj.exe.options.test.TestRemoveOption;
+import org.inria.biomaj.exe.options.test.TestUpdateOption;
+import org.inria.biomaj.internal.ant.task.net.test.TestSftpImpl;
+import org.inria.biomaj.sql.test.TestSQLConnection;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Main test class that launches the application tests classes.
+ *
+ * @author rsabas
+ *
+ */
+ at RunWith(Suite.class)
+ at SuiteClasses(value={
+// TestSQLConnection.class, // OK
+// TestBmajCopy.class, // OK
+// TestBmajDelete.class, // OK
+// TestBmajExtract.class, // OK
+// TestBmajMove.class, // OK
+// TestBmajLink.class, // OK
+// TestBmajVersionManagement.class, // OK
+// TestImportOption.class, // OK
+// TestUpdateOption.class, // OK
+// TestRemoveOption.class, // OK
+// TestChangeDbNameOption.class, // OK
+// TestSftpImpl.class // OK
+})
+public class RunTests {
+// java -cp lib/biomaj.jar org.junit.runner.JUnitCore org.inria.biomaj.exe.main.test.RunTests
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/HSQLDumpToMySQL.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/HSQLDumpToMySQL.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/HSQLDumpToMySQL.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,111 @@
+package org.inria.biomaj.exe.migration;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class HSQLDumpToMySQL {
+
+ private static String[] sqlNames = {"bank", "productionDirectory", "remoteInfo", "localInfo",
+ "updateBank", "session_has_message", "message", "sessionTask", "session_has_sessionTask",
+ "sessionTask_has_message", "metaprocess_has_message", "process_has_message", "process",
+ "sessionTask_has_file", "file"};
+
+ public static void main(String[] args) {
+ try {
+ Map<String, String> autoInc = new HashMap<String, String>();
+
+ BufferedReader br = new BufferedReader(new FileReader(args[0]));
+ PrintWriter pw = new PrintWriter(new File(args[0] + "_bis"));
+ pw.println("SET foreign_key_checks = 0;");
+
+ for (String name : sqlNames) {
+ pw.println("ALTER TABLE " + name + " MODIFY id" + name + " INTEGER NOT NULL;");
+ }
+
+
+ String line;
+ while ((line = br.readLine()) != null) {
+ if (line.startsWith("CREATE") || line.startsWith("GRANT") || line.startsWith("SET"))
+ continue;
+
+ if (line.startsWith("ALTER TABLE")) {
+ Matcher matcher = Pattern.compile("ALTER TABLE (\\S+) .* RESTART WITH (\\p{Digit}+)").matcher(line);
+ if (matcher.find()) {
+ autoInc.put(getSQLTableName(matcher.group(1)), matcher.group(2));
+ }
+ continue;
+ }
+
+
+
+ if (line.contains(" PRODUCTIONDIRECTORY "))
+ line = line.replaceFirst("\\s+PRODUCTIONDIRECTORY\\s+", " productionDirectory ");
+ else if (line.contains(" CONFIGURATION "))
+ line = line.replaceFirst("\\s+CONFIGURATION\\s+", " configuration ");
+ else if (line.contains(" LOCALINFO "))
+ line = line.replaceFirst("\\s+LOCALINFO\\s+", " localInfo ");
+ else if (line.contains(" REMOTEINFO "))
+ line = line.replaceFirst("\\s+REMOTEINFO\\s+", " remoteInfo ");
+ else if (line.contains(" UPDATEBANK "))
+ line = line.replaceFirst("\\s+UPDATEBANK\\s+", " updateBank ");
+ else if (line.contains(" SESSION "))
+ line = line.replaceFirst("\\s+SESSION\\s+", " session ");
+ else if (line.contains("SESSION_HAS_MESSAGE"))
+ line = line.replaceFirst("\\s+SESSION_HAS_MESSAGE\\s+", " session_has_message ");
+ else if (line.contains(" MESSAGE "))
+ line = line.replaceFirst("\\s+MESSAGE\\s+", " message ");
+ else if (line.contains(" SESSIONTASK "))
+ line = line.replaceFirst("\\s+SESSIONTASK\\s+", " sessionTask ");
+ else if (line.contains(" SESSION_HAS_SESSIONTASK "))
+ line = line.replaceFirst("\\s+SESSION_HAS_SESSIONTASK\\s+", " session_has_sessionTask ");
+ else if (line.contains(" SESSIONTASK_HAS_MESSAGE "))
+ line = line.replaceFirst("\\s+SESSIONTASK_HAS_MESSAGE\\s+", " sessionTask_has_message ");
+ else if (line.contains(" SESSIONTASK_HAS_FILE "))
+ line = line.replaceFirst("\\s+SESSIONTASK_HAS_FILE\\s+", " sessionTask_has_file ");
+ else if (line.contains(" FILE "))
+ line = line.replaceFirst("\\s+FILE\\s+", " file ");
+ else if (line.contains(" METAPROCESS "))
+ line = line.replaceFirst("\\s+METAPROCESS\\s+", " metaprocess ");
+ else if (line.contains(" PROCESS "))
+ line = line.replaceFirst("\\s+PROCESS\\s+", " process ");
+ else if (line.contains(" PROCESS_HAS_MESSAGE "))
+ line = line.replaceFirst("\\s+PROCESS_HAS_MESSAGE\\s+", " process_has_message ");
+ else if (line.contains(" METAPROCESS_HAS_MESSAGE "))
+ line = line.replaceFirst("\\s+METAPROCESS_HAS_MESSAGE\\s+", " metaprocess_has_message ");
+ else if (line.contains(" BANK "))
+ line = line.replaceFirst("\\s+BANK\\s+", " bank ");
+
+ pw.println(line + ";");
+ }
+ pw.println("SET foreign_key_checks = 1;");
+
+ for (String table : autoInc.keySet()) {
+ pw.println("ALTER TABLE " + table + " AUTO_INCREMENT = " + autoInc.get(table) + ";");
+ pw.println("ALTER TABLE " + table + " MODIFY id" + table + " INTEGER NOT NULL AUTO_INCREMENT;");
+ }
+
+ pw.close();
+ br.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static String getSQLTableName(String name) {
+ for (String s : sqlNames){
+ if (s.equalsIgnoreCase(name))
+ return s;
+ }
+ return null;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/Parser.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/Parser.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/migration/Parser.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,553 @@
+package org.inria.biomaj.exe.migration;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.commons.cli2.CommandLine;
+import org.apache.commons.cli2.Group;
+import org.apache.commons.cli2.Option;
+import org.apache.commons.cli2.builder.ArgumentBuilder;
+import org.apache.commons.cli2.builder.DefaultOptionBuilder;
+import org.apache.commons.cli2.builder.GroupBuilder;
+import org.apache.commons.cli2.util.HelpFormatter;
+import org.apache.log4j.Logger;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.jdom.Attribute;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.jdom.output.DOMOutputter;
+import org.jfree.util.Log;
+import org.xml.sax.SAXException;
+
+/**
+ * Executable class that parses a given list of xml statefiles
+ * into SQL queries that are inserted into the database.
+ *
+ * @author rsabas
+ *
+ */
+public class Parser {
+
+ protected static Logger logger = Logger.getLogger(Parser.class);
+
+ public static void main(String[] args) {
+ DefaultOptionBuilder oBuilder = new DefaultOptionBuilder();
+ ArgumentBuilder aBuilder = new ArgumentBuilder();
+ GroupBuilder gBuilder = new GroupBuilder();
+
+ Option dirOption = oBuilder.reset().withLongName("dir").withDescription("Directory to search the statefiles within").withArgument(
+ aBuilder.reset().withName("directory").withDescription("Directory name").withMaximum(1).create()).create();
+ Option fileOption = oBuilder.reset().withLongName("files").withDescription("List of statefiles to import").withArgument(aBuilder.reset().withName("file").withDescription("File name").withMinimum(1).create()).create();
+// Option batchOption = oBuilder.reset().withLongName("batch").withDescription("Execute the queries in batch mode (faster but no error reporting if the batch fails)").withRequired(false).create();
+
+// Group group = gBuilder.reset().withOption(dirOption).withOption(fileOption).withOption(batchOption).create();
+ Group group = gBuilder.reset().withOption(dirOption).withOption(fileOption).create();
+
+ HelpFormatter help = new HelpFormatter();
+ help.setShellCommand("<command>");
+ help.setGroup(group);
+
+ org.apache.commons.cli2.commandline.Parser parser = new org.apache.commons.cli2.commandline.Parser();
+ parser.setGroup(group);
+ parser.setHelpFormatter(help);
+ parser.setHelpTrigger("--help");
+
+ CommandLine line = parser.parseAndHelp(args);
+
+ if (line == null)
+ return;
+
+ List<String> banks = BiomajSQLQuerier.getBanks();
+
+ List<String> xmlFiles = new ArrayList<String>();
+ List<String> sqlFiles = new ArrayList<String>();
+ if (line.hasOption(dirOption)) { // Get all available statefiles in directory
+
+ String path = line.getValue(dirOption).toString();
+ File dir;
+ if (path.startsWith("/")) // absolute path
+ dir = new File(path);
+ else // relative path
+ dir = new File(System.getProperty("user.dir") + System.getProperty("file.separator") + path);
+
+ if (!dir.exists()) {
+ System.out.println("Directory does not exist : " + dir.getAbsolutePath());
+ Log.error("Directory does not exist : " + dir.getAbsolutePath());
+ return;
+ }
+
+ for (File f : dir.listFiles()) {
+ // Check that it is an XML file ant that it has a corresponding
+ // directory.
+ if (f.isFile() && f.getName().endsWith(".xml") && !f.getName().equalsIgnoreCase("index.xml")
+ && new File(f.getPath().substring(0, f.getPath().lastIndexOf('.'))).isDirectory()) {
+ if (checkExistence(f.getAbsolutePath(), banks)) {
+ System.out.println(f.getName() + " already in the database. Skipped.");
+ logger.info(f.getName() + " already in the database. Skipped.");
+ continue;
+ }
+ xmlFiles.add(f.getPath());
+ }
+ }
+ } else if (line.hasOption(fileOption)) { // Get statefiles list
+
+ List<?> filz = line.getValues(fileOption);
+ for (Object o : filz) {
+ if (!new File(o.toString()).exists()) {
+ System.out.println("File does not exists : " + o.toString() + ". Skipped.");
+ Log.warn("File does not exists : " + o.toString() + ". Skipped.");
+ continue;
+ }
+ if (checkExistence(o.toString(), banks)) {
+ System.out.println(o.toString() + " already in the database.");
+ logger.info(o.toString() + " already in the database.");
+ continue;
+ }
+ xmlFiles.add(o.toString());
+ }
+ } else {// Print help if no option was chosen
+ help.print();
+ return;
+ }
+
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setXIncludeAware(true);
+ factory.setNamespaceAware(true);
+
+ try {
+ for (String fileName : xmlFiles) {
+ System.out.println("Building queries for " + fileName + " ...");
+ logger.debug("Building queries for " + fileName + " ...");
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ Source source = new DOMSource(builder.parse(new File(fileName)));
+ Result output = new StreamResult(new File("xmlOutput.xml"));
+ Transformer trans = TransformerFactory.newInstance()
+ .newTransformer();
+ trans.transform(source, output);
+
+ Source xslSource = new StreamSource(new File(BiomajUtils.getBiomajRootDirectory() + "/xslt/xmlToSql.xsl"));
+ source = new DOMSource(fixXML("xmlOutput.xml"));
+
+ String tmpName;
+ if (fileName.contains("/"))
+ tmpName = fileName.substring(fileName.lastIndexOf('/'), fileName.lastIndexOf('.'));
+ else
+ tmpName = fileName.substring(0, fileName.lastIndexOf('.'));
+
+ String outName = BiomajUtils.getBiomajRootDirectory() + "/sql/migration" + tmpName + "_queries.sql";
+ sqlFiles.add(outName);
+
+ output = new StreamResult(new File(outName));
+ trans = TransformerFactory.newInstance().newTransformer(xslSource);
+ trans.transform(source, output);
+ }
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ } catch (TransformerFactoryConfigurationError e) {
+ e.printStackTrace();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+
+ long start = new Date().getTime();
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+
+ if (SQLConnectionFactory.getDBType().equals(SQLConnectionFactory.HSQLDB_CONNECTION)) {
+ System.out.println("Removing foreign keys...");
+ removeConstraints();
+ insertIntoBdd(sqlFiles);
+ System.out.println("Restauring foreign keys...");
+ addConstraints();
+ } else if (SQLConnectionFactory.getDBType().equals(SQLConnectionFactory.MYSQL_CONNECTION)) {
+ Statement stat = conn.getStatement();
+ conn.executeUpdate("SET foreign_key_checks = 0;", stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ insertIntoBdd(sqlFiles);
+
+ stat = conn.getStatement();
+ conn.executeUpdate("SET foreign_key_checks = 1;", stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ System.out.println("Elapsed time : " + (new Date().getTime() - start) + " ms");
+
+
+
+
+// BiomajSQLQuerier.getConnection().executeQuery("SET REFERENTIAL_INTEGRITY TRUE", false);
+
+// HSQLDBConnection.getInstance().executeQuery("SET PROPERTY \"hsqldb.cache_scale\" 14", false);
+// HSQLDBConnection.getInstance().executeQuery("CHECKPOINT", false);
+
+ System.out.println("Logs available in xmlToSql.log");
+ }
+
+ /**
+ * Formats the file to be compatible with the database structure
+ * and column types.
+ *
+ * @param path
+ * @return
+ */
+ public static org.w3c.dom.Document fixXML(String path) {
+
+ SAXBuilder builder = new SAXBuilder();
+ try {
+ Document doc = builder.build(new File(path));
+ Element elt = doc.getRootElement();
+ processNodes(elt);
+
+ DOMOutputter out = new DOMOutputter();
+ return out.output(doc);
+
+ } catch (JDOMException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+
+ }
+
+ private static void processNodes(Element elt) {
+
+ String content;
+
+ List<?> attrs = elt.getAttributes();
+ for (Object obj : attrs) {
+ Attribute attr = (Attribute) obj;
+ /*
+ * Have to escape the simple quotes for the bdd.
+ */
+ if ((content = attr.getValue()).contains("'"))
+ elt.setAttribute(attr.getName(), content.replaceAll("'", "''"));
+ /*
+ * elapsedTime tag sometimes got mispelled with ellapsedTime or
+ * elapsedtime... Have to handle that to...
+ */
+ if (attr.getName().equalsIgnoreCase("elapsedtime")
+ || attr.getName().equalsIgnoreCase("ellapsedTime")) {
+ attr.setName("elapsedTime");
+ }
+ /*
+ * Date format must be yyy-MM-dd hh:mm:ss
+ */
+ else if (attr.getName().equalsIgnoreCase("date"))
+ attr.setValue(frToEn(attr.getValue()));
+ else if (attr.getName().equalsIgnoreCase("start"))
+ attr.setValue(frToEn(attr.getValue()));
+ else if (attr.getName().equalsIgnoreCase("end"))
+ attr.setValue(frToEn(attr.getValue()));
+ else if (attr.getName().equalsIgnoreCase("creation"))
+ attr.setValue(frToEn(attr.getValue()));
+ else if (attr.getName().equalsIgnoreCase("remove"))
+ attr.setValue(frToEn(attr.getValue()));
+ }
+
+ if ((content = elt.getText()).contains("'"))
+ elt.setText(content.replaceAll("'", "''"));
+
+ List<?> children = elt.getChildren();
+ if (children.size() > 0) {
+ for (Object child : children) {
+ processNodes((Element) child);
+ }
+ }
+ }
+
+ private static String frToEn(String date) {
+ SimpleDateFormat inFormat;
+ if (date.length() == 16)
+ inFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm");
+ else
+ inFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
+ try {
+ SimpleDateFormat outFormat = new SimpleDateFormat(
+ "yyyy-MM-dd HH:mm:ss");
+ return outFormat.format(inFormat.parse(date));
+ } catch (java.text.ParseException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ }
+
+
+ private static void removeConstraints() {
+ String path = BiomajUtils.getBiomajRootDirectory() + "/sql/hsql_removeconstraints.sql";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(getQueryFromFile(path), stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ private static void addConstraints() {
+ String path = BiomajUtils.getBiomajRootDirectory() + "/sql/hsql_addconstraints.sql";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(getQueryFromFile(path), stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ private static String getQueryFromFile(String fileName) {
+ StringBuffer query = new StringBuffer(10000);
+
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(fileName));
+ String line = "";
+ while ((line = br.readLine()) != null)
+ if (!line.trim().isEmpty() && !line.startsWith("--"))
+ query.append(line);
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ return query.toString();
+ }
+
+ private static void insertIntoBdd(List<String> files) {
+
+ /*
+ * We store in this map all the 'variables' defined in the queries file
+ * with the following syntax : $<var_name>:=<sql statement>.
+ */
+ Map<String, String> vars = new HashMap<String, String>();
+
+ SQLConnection sc = SQLConnectionFactory.getConnection();
+ Statement statement = sc.getStatement();
+
+ long idSession = 1;
+ long idConfiguration = 1;
+
+ try {
+ statement.getConnection().setAutoCommit(false);
+ } catch (SQLException ex) {
+ logger.error("", ex);
+ return;
+ }
+ try {
+ // Session and configuration intialization
+ ResultSet rs = statement.executeQuery("SELECT max(idsession) FROM session;");
+ if (rs.next() && rs.getLong(1) >= idSession)
+ idSession = rs.getLong(1) + 1;
+ rs = statement.executeQuery("SELECT max(idconfiguration) FROM configuration;");
+ if (rs.next() && rs.getLong(1) >= idConfiguration)
+ idConfiguration= rs.getLong(1) + 1;
+ } catch (SQLException e1) {
+ logger.error("", e1);
+ e1.printStackTrace();
+ return;
+ }
+
+ for (String file : files) {
+ boolean broken = false;
+ System.out.println("Populating db with " + file + "...");
+ logger.debug("Populating db with " + file + "...");
+ String line = "";
+ String tmp = "";
+ Map<Long, Long> refOldSession = new HashMap<Long, Long>();
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(file));
+ while ((line = br.readLine()) != null) {
+ try {
+ if (line.startsWith("INSERT INTO") && line.endsWith(");")) {
+
+ if (line.contains("#")) { // Replace old sessionid with new in production directory
+ Matcher match = Pattern.compile("#\\p{Digit}+").matcher(line);
+ if (match.find())
+ line = line.replace(match.group(), String.valueOf(refOldSession.get(Long.valueOf(match.group().substring(1)))));
+ } else if (line.contains("$_")) {
+ Matcher match = Pattern.compile("\\$\\w+").matcher(line);
+ int startIndex = 0;
+ while (match.find(startIndex)) {
+ line = line.replace(match.group(), vars.get(match.group()).toString());
+ startIndex = match.end();
+ }
+ logger.debug("Interpreted line : " + line);
+ }
+ logger.debug("\t" + line);
+ statement.executeUpdate(line);
+ } else if (line.startsWith("$")) { // assign the result of a statement
+ String[] split = line.split(":=");
+ if (split[1].toUpperCase().startsWith("SELECT")) {
+ ResultSet res = statement.executeQuery(split[1]);
+ res.next();
+ vars.put(split[0], String.valueOf(res.getInt(1)));
+ } else if (split[1].startsWith("$")) { // METAID
+ Matcher match = Pattern.compile("\\$\\w+").matcher(split[1]);
+ if (match.find()) {
+ Random rand = new Random();
+ vars.put(split[0], vars.get(match.group()) + rand.nextLong());
+ }
+ } else if (split.length == 3) { // ID session
+ vars.put(split[0], String.valueOf(idSession));
+ refOldSession.put(Long.valueOf(split[2]), idSession);
+ idSession++;
+ } else if (split[1].equals("GENERATE")) { // ID config
+ vars.put(split[0], String.valueOf(idConfiguration++));
+ } else { // Assign a value
+ Matcher match = Pattern.compile("\\w+").matcher(split[1]);
+ if (match.find())
+ vars.put(split[0], match.group());
+ }
+ } else { // Insert statement on several lines due the presence of
+ // a \n character in one of the fields.
+
+ while (!line.endsWith(");")) {
+ tmp += line;
+ line = br.readLine();
+ }
+ tmp += line;
+ if (tmp.contains("$_")) {
+ Matcher match = Pattern.compile("\\$\\w+").matcher(tmp);
+ int startIndex = 0;
+ while (match.find(startIndex)) {
+ line = line.replace(match.group(), vars.get(match.group()).toString());
+ startIndex = match.end();
+ }
+ logger.debug("Interpreted line : " + line);
+ }
+ logger.debug("\t" + tmp);
+ line = tmp;
+ statement.executeUpdate(line);
+ tmp = "";
+ }
+ } catch (SQLException ex) {
+ logger.error("", ex);
+ System.err.println(ex.getMessage());
+
+ /*
+ * ROLLBACK
+ */
+ try {
+ statement.getConnection().rollback();
+ System.out.println("Error on bank, insertion of bank aborted...");
+ logger.debug("Rollbacked ! Bank won't be loaded into bdd...");
+ broken = true;
+ break;
+ } catch (SQLException e1) {
+ logger.error("", e1);
+ e1.printStackTrace();
+ return;
+ }
+ }
+ }
+ br.close();
+
+ // Modifying idLastSession in updateBank
+ logger.info("Updating idLastSession to new values...");
+ for (long l : refOldSession.keySet()) {
+ try {
+ String uQ = "UPDATE updateBank SET idLastSession=" + refOldSession.get(l) + " WHERE idLastSession = " + l + ";";
+ logger.debug(uQ);
+ statement.executeUpdate(uQ);
+ } catch (SQLException e) {
+ logger.error(e);
+ e.printStackTrace();
+ }
+ }
+
+
+ } catch (FileNotFoundException e) {
+ logger.error("", e);
+ e.printStackTrace();
+ return;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return;
+ }
+
+ /*
+ * COMMIT
+ */
+ if (!broken) {
+ try {
+ statement.getConnection().commit();
+ logger.debug("Commited !");
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ SQLConnectionFactory.closeConnection(statement);
+ }
+
+ private static boolean checkExistence(String file, List<String> banks) {
+ for (String s : banks) {
+
+ // First try to compare with the filename
+ if (file.substring(file.lastIndexOf('/') + 1, file.lastIndexOf('.')).equalsIgnoreCase(s))
+ return true;
+
+
+ // If file name and dbname are different, we have to read in the file
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(file));
+ String line = "";
+ while ((line = br.readLine()) != null) {
+ if (line.contains("<dbName>") &&
+ line.substring(line.indexOf("<dbName>") + 8, line.indexOf("</dbName>")).equals(s)) {
+ br.close();
+ return true;
+ }
+ }
+ br.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ return false;
+ }
+
+}
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BioMAJLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BioMAJLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BioMAJLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,1250 @@
+package org.inria.biomaj.exe.options;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.awt.event.*;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyledDocument;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.main.Biomaj;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.GeneralWorkflowTask;
+import org.inria.biomaj.session.bank.PostProcessTask;
+import org.inria.biomaj.session.bank.PreProcessTask;
+import org.inria.biomaj.session.bank.RemoveProcessTask;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+import com.jgoodies.forms.factories.*;
+import com.jgoodies.forms.layout.*;
+/*
+ * Created by JFormDesigner on Thu Mar 20 14:21:41 CET 2008
+ */
+
+
+
+/**
+ * @author Olivier Filangi
+ */
+public class BioMAJLogger extends JPanel implements WindowListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private StyledDocument sdoc;
+
+ private final int REFRESH_SCREEN = 3000 ; // 3 seconds
+ //private final int REFRESH_LIST = 8000 ; // 8 seconds
+
+ public BioMAJLogger() {
+ initComponents();
+
+ sdoc = fileLogTextArea.getStyledDocument();
+
+ Style titleStyle = sdoc.addStyle("info", null);
+ StyleConstants.setBackground(titleStyle , Color.WHITE);
+ StyleConstants.setForeground(titleStyle , Color.BLACK);
+ StyleConstants.setFontFamily(titleStyle , "dialoginput");
+ //StyleConstants.setBold(titleStyle,true);
+ StyleConstants.setFontSize(titleStyle , 12);
+
+ Style descrStyle = sdoc.addStyle("date", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.ORANGE);
+
+ descrStyle = sdoc.addStyle("task", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.BLUE);
+ //StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("unknown", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.BLUE);
+ //StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("erreur", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.RED);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("warning", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.MAGENTA);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("debug", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.GRAY);
+ StyleConstants.setBold(descrStyle, true);
+
+ descrStyle = sdoc.addStyle("verbose", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.DARK_GRAY);
+ //StyleConstants.setBold(descrStyle, true);
+ descrStyle = sdoc.addStyle("depends", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.GREEN);
+
+ descrStyle = sdoc.addStyle("depends_volatil", titleStyle);
+ StyleConstants.setForeground(descrStyle, Color.ORANGE);
+
+
+ updatingRadioButton.setSelected(true);
+ errorCycleRadioButton.setSelected(false);
+
+
+ refreshAll(null);
+ }
+
+ private void initListType() {
+ Vector<String> listType = getListTypeSql();
+ listTypeInBankLayoutComboBox.removeAllItems();
+ for (String s : listType) {
+ listTypeInBankLayoutComboBox.addItem(s);
+ }
+ try {
+ sdoc.remove(0, sdoc.getLength());
+ } catch (Exception e) {
+
+ }
+ }
+
+ //private Timer timerListBank = null ;
+ private void initListBankLayoutActionPerformed(ActionEvent e) {
+
+ /*
+ if (listeBankNameInBankLayoutComboBox.isPopupVisible()) {
+ if (timerListBank != null)
+ timerListBank.stop();
+
+ return;
+ } else {
+ if (timerListBank != null)
+ timerListBank.start();
+ }
+ */
+ String type = (String) listTypeInBankLayoutComboBox.getSelectedItem();
+ /*
+ if (( listTypeInBankLayoutComboBox.getItemCount()>listTypeInBankLayoutComboBox.getSelectedIndex()) &&
+ (listTypeInBankLayoutComboBox.getSelectedIndex()>0))
+ type = (String)listTypeInBankLayoutComboBox.getItemAt(listTypeInBankLayoutComboBox.getSelectedIndex());
+ */
+
+ Vector<String> listBankName = getListBankSql(type);
+ listeBankNameInBankLayoutComboBox.removeAllItems();
+ for (String s : listBankName)
+ {
+ if (radioButtonAll.isSelected()) {
+ listeBankNameInBankLayoutComboBox.addItem(s);
+ continue;
+ }
+// try {
+ Bank b = new Bank();// || (updatingRadioButton.isSelected()&&(!b.getStatus()))
+ Map<String, String> update = BiomajSQLQuerier.getLatestUpdate(s, false);
+ b.fill(update, true);
+// if (!BiomajQueryXmlStateFile.getLastUpdateBankWithoutConfiguration(s, b, true)) {
+ if (update == null) {
+ if (updatingRadioButton.isSelected())
+ listeBankNameInBankLayoutComboBox.addItem(s);
+
+ } else {
+ //System.out.println("getLastUpdateBankWithoutConfiguration-->true");
+ //System.out.println("STATUS:"+Boolean.valueOf(b.getStatus()));
+ if (updatingRadioButton.isSelected()&&(b.getEnd()==null) )
+ listeBankNameInBankLayoutComboBox.addItem(s);
+ else if (errorCycleRadioButton.isSelected()&& !b.getStatus() && (b.getEnd()!=null))
+ listeBankNameInBankLayoutComboBox.addItem(s);
+ }
+// } catch (BiomajException be) {
+// BiomajLogger.getInstance().log(be);
+// }
+ }
+
+ /*
+ if (timerListBank == null) {
+ timerListBank = new Timer(REFRESH_LIST,new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ initListBankLayoutActionPerformed(e);
+ }});
+
+ timerListBank.start();
+ }
+ */
+ }
+
+ private void refreshAll(ActionEvent e) {
+ if (timerCurrentfile != null) {
+ timerCurrentfile.stop();
+ timerCurrentfile = null ;
+ }
+
+ currentBank = null ;
+ map_nameFileAndCompletePathFile = new HashMap<String, String>();
+ currentFileLog = "";
+ dateCurrentFileLog = 0;
+ nbLine = 0 ;
+ timerCurrentfile = null ;
+ oldLevelSelected = -1 ;
+
+ initListType();
+ initListBankLayoutActionPerformed(null);
+ initInformationSessionAndBankActionPerformed(null);
+ listSessionsInSessionLayoutActionPerformed(null);
+ listFileLogInLogLayoutActionPerformed(null);
+ }
+
+ private void radioButtonBankLayoutActionPerformed(ActionEvent e) {
+ refreshAll(null);
+ }
+
+ private void emptyBankFill() {
+ descriptionField.setText("");
+ urlField.setText("");
+ remoteFilesExcludedField.setText("");
+ remoteFilesField.setText("");
+ versionDirectoryField.setText("");
+ offlineDirectoryField.setText("");
+
+ listVersionInSessionLayoutComboBox.removeAllItems();
+ listFileLogInLogLayoutComboBox.removeAllItems();
+ try {
+ sdoc.remove(0, sdoc.getLength());
+ } catch (BadLocationException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ }
+
+ private Bank currentBank = null ;
+
+ private void initInformationSessionAndBankActionPerformed(ActionEvent e) {
+ String bankName = (String) listeBankNameInBankLayoutComboBox.getSelectedItem();
+
+ if (bankName == null)
+ {
+ // emptyBankFill();
+ return ;
+ }
+
+ if (currentBank!=null && bankName.compareTo(currentBank.getConfig().getName())==0)
+ {
+ //on verifie que le panel Session a ete initialise
+ if ((descriptionField.getText()!=null) && (descriptionField.getText().compareTo("")!=0))
+ return ;
+ }
+
+ currentBank = new Bank();
+// try {
+ /*
+ if (!BiomajQueryXmlStateFile.getFuturReleaseBankWithConfiguration(bankName,currentBank,true)) {
+ if (!BiomajQueryXmlStateFile.getLastUpdateBankWithNewReleaseWithConfiguration(bankName, currentBank, true)) {
+ emptyBankFill();
+ return ;
+ }
+ }
+ */
+
+ Map<String, String> update = BiomajSQLQuerier.getLatestUpdate(bankName, true);
+ if (update != null) {
+ int id = Integer.parseInt(update.get(BiomajSQLQuerier.UPDATE_ID));
+ Map<String, String> info = BiomajSQLQuerier.getBankInfoForUpdate(id);
+ Configuration config = new Configuration(info);
+ currentBank.setConfig(config);
+ currentBank.fill(update, true);
+ } else
+ emptyBankFill();
+
+// BiomajQueryXmlStateFile.getLastUpdateBankWithConfiguration(bankName, currentBank, true);
+ /*
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ emptyBankFill();
+ return ;
+ }*/
+ Bank b = currentBank ;
+
+ descriptionField.setText(b.getConfig().getFullName());
+ urlField.setText(b.getConfig().getProtocol()+"://"+b.getConfig().getUrl()+"/"+b.getConfig().getRemoteDirectory());
+ remoteFilesExcludedField.setText(b.getConfig().getRemoteExcludedFiles());
+ remoteFilesField.setText(b.getConfig().getRemoteFilesRegexp());
+ versionDirectoryField.setText(b.getConfig().getVersionDirectory());
+ offlineDirectoryField.setText(b.getConfig().getOfflineDirectory());
+
+ listVersionInSessionLayoutComboBox.removeAllItems();
+
+ for (Session s : b.getListOldSession()) {
+ listVersionInSessionLayoutComboBox.addItem(BiomajUtils.dateToString(s.getStart(), Locale.US));
+ }
+
+ if (listVersionInSessionLayoutComboBox.getItemCount()>0)
+ listVersionInSessionLayoutComboBox.setSelectedIndex(listVersionInSessionLayoutComboBox.getItemCount()-1);
+
+
+ BankFactory bf = new BankFactory();
+ try {
+ BiomajBank bb = bf.createBank(b.getConfig().getName(), false);
+ String level = bb.getPropertiesFromBankFile().getProperty(BiomajConst.levelMaskProperty) ;
+ if (level != null) {
+ if (level.compareTo("VERBOSE")==0) {
+ debugRadioButton.setEnabled(false);
+ } else if (level.compareTo("INFO")==0) {
+ debugRadioButton.setEnabled(false);
+ verboseRadioButton.setEnabled(false);
+ } else if (level.compareTo("WARNING")==0) {
+ debugRadioButton.setEnabled(false);
+ verboseRadioButton.setEnabled(false);
+ infoRadioButton.setEnabled(false);
+ } else if (level.compareTo("ERROR")==0) {
+ debugRadioButton.setEnabled(false);
+ verboseRadioButton.setEnabled(false);
+ infoRadioButton.setEnabled(false);
+ warningRadioButton.setEnabled(false);
+ }
+ }
+
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ }
+ infoRadioButton.setSelected(true);
+ }
+
+ private HashMap<String, String> map_nameFileAndCompletePathFile = new HashMap<String, String>();
+
+ //private Timer timerFileLog = null;
+
+ private void listSessionsInSessionLayoutActionPerformed(ActionEvent e) {
+ if (currentBank == null)
+ return ;
+ /*
+ if (listFileLogInLogLayoutComboBox.isPopupVisible()) {
+ if (timerFileLog != null)
+ timerFileLog.stop();
+
+ return;
+ } else {
+ if (timerFileLog != null)
+ timerFileLog.start();
+ }
+ */
+ Date start = null ;
+
+ try {
+ start = BiomajUtils.stringToDate((String) listVersionInSessionLayoutComboBox.getSelectedItem());
+
+
+
+ Session find = null ;
+ for (Session s : currentBank.getListOldSession()) {
+ if (s.getStart().getTime() == start.getTime()) {
+ find = s ;
+ break ;
+ }
+ }
+
+ if (find == null)
+ return ;
+
+ //int valueDefault = listFileLogInLogLayoutComboBox.getSelectedIndex();
+ listFileLogInLogLayoutComboBox.removeAllItems();
+ //System.out.println("session id:"+find.getId()+" log:"+find.getLogfile());
+ String baseName = "Main activity report";
+ listFileLogInLogLayoutComboBox.addItem(baseName);
+ map_nameFileAndCompletePathFile.put(baseName, find.getLogfile());
+
+ GeneralWorkflowTask gPre = find.getWorkflowTask(Session.PREPROCESS);
+ if (gPre != null) {
+ PreProcessTask pPre = (PreProcessTask)gPre;
+ Vector<MetaProcess> mlPre = pPre.getMetaProcess(null);
+ for (MetaProcess mp : mlPre) {
+ baseName = "Processing activity report ["+mp.getBlock()+":"+mp.getName()+"]";
+ listFileLogInLogLayoutComboBox.addItem(baseName);
+ map_nameFileAndCompletePathFile.put(baseName, mp.getLogFile());
+ }
+ }
+
+ GeneralWorkflowTask g = find.getWorkflowTask(Session.POSTPROCESS);
+ if (g != null) {
+ PostProcessTask p = (PostProcessTask)g ;
+ Vector<MetaProcess> ml = p.getMetaProcess(null);
+ for (MetaProcess mp : ml) {
+ baseName = "Processing activity report ["+mp.getBlock()+":"+mp.getName()+"]";
+ listFileLogInLogLayoutComboBox.addItem(baseName);
+ map_nameFileAndCompletePathFile.put(baseName, mp.getLogFile());
+ }
+ }
+
+ GeneralWorkflowTask gR = find.getWorkflowTask(Session.REMOVEPROCESS);
+ if (gR != null) {
+ RemoveProcessTask pR = (RemoveProcessTask)gR;
+ Vector<MetaProcess> mlR = pR.getMetaProcess(null);
+ for (MetaProcess mp : mlR) {
+ baseName = "Processing activity report ["+mp.getBlock()+":"+mp.getName()+"]";
+ listFileLogInLogLayoutComboBox.addItem(baseName);
+ map_nameFileAndCompletePathFile.put(baseName, mp.getLogFile());
+ }
+ }
+
+ String dir = BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR)+"/"+listeBankNameInBankLayoutComboBox.getSelectedItem()+"/runtime/";
+
+ String nameFile = currentBank.getConfig().getName()+".remote.filelist";
+ String label = "Complete remote files list (match with remote.files property)";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+
+ nameFile = currentBank.getConfig().getName()+".diff.filelist";
+ label = "Downloadable remote files list";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+
+ nameFile = currentBank.getConfig().getName()+".copy.filelist";
+ label = "Production files already downloaded";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+ nameFile = currentBank.getConfig().getName()+".keep.offline.filelist";
+ label = "Non production files already downloaded";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+ nameFile = currentBank.getConfig().getName()+".extract.filelist";
+ label = "Extractable files list";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+ /*
+ nameFile = currentBank.getConfig().getName()+".release";
+ label = "Release information (1)";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+ */
+
+ nameFile = currentBank.getConfig().getName()+".update.properties";
+ label = "Release information";
+ if (new File(dir+nameFile).exists()) {
+ listFileLogInLogLayoutComboBox.addItem(label);
+ map_nameFileAndCompletePathFile.put(label, dir+nameFile);
+ }
+
+ int i = 1 ;
+ nameFile = currentBank.getConfig().getName()+".wget.log"+Integer.toString(i++);
+ while (new File(dir+nameFile).exists()) {
+ label = "Wget output ("+Integer.toString(i)+")";
+ listFileLogInLogLayoutComboBox.addItem(nameFile);
+ map_nameFileAndCompletePathFile.put(nameFile, dir+nameFile);
+ nameFile = currentBank.getConfig().getName()+".wget.log"+Integer.toString(i++);
+ }
+
+ //On doit rafraichir si des fichiers apparaissent...
+ /*
+ if (timerFileLog == null) {
+ timerFileLog = new Timer(REFRESH_LIST,new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listSessionsInSessionLayoutActionPerformed(e);
+ }});
+
+ timerFileLog.start();
+ }
+ */
+ // listFileLogInLogLayoutActionPerformed(null);
+
+ } catch (Exception pe) {
+ BiomajLogger.getInstance().log(pe);
+ //System.out.println(pe.getLocalizedMessage());
+ return ;
+ }
+
+ }
+
+
+ private int getLevelSelected() {
+ if (debugRadioButton.isSelected())
+ return Project.MSG_DEBUG;
+ if (verboseRadioButton.isSelected())
+ return Project.MSG_VERBOSE;
+ if (infoRadioButton.isSelected())
+ return Project.MSG_INFO;
+ if (warningRadioButton.isSelected())
+ return Project.MSG_WARN;
+ if (errorRadioButton.isSelected())
+ return Project.MSG_ERR;
+
+ return Project.MSG_INFO;
+ }
+ /*
+ private String getLevelStyle() {
+ if (debugRadioButton.isSelected())
+ return "debug";
+ if (verboseRadioButton.isSelected())
+ return "verbose";
+ if (infoRadioButton.isSelected())
+ return "info";
+ if (warningRadioButton.isSelected())
+ return "warning";
+ if (errorRadioButton.isSelected())
+ return "erreur";
+
+ return "info";
+ }
+ */
+ public static String getLevel(int l) {
+ if (l == Project.MSG_DEBUG)
+ return "debug";
+ if (l == Project.MSG_VERBOSE)
+ return "verbose";
+ if (l == Project.MSG_INFO)
+ return "info";
+ if (l == Project.MSG_WARN)
+ return "warning";
+ if (l == Project.MSG_ERR)
+ return "erreur";
+
+ return "info";
+ }
+
+ private void handleScrollLock() {
+ if (pbm!=null) {
+ pbm.setActiveScrollLock(checkBox1.isSelected());
+ }
+ }
+
+ private String currentFileLog = "";
+ private long dateCurrentFileLog = 0;
+ private int nbLine = 0 ;
+ private Timer timerCurrentfile = null ;
+ private int oldLevelSelected = -1 ;
+
+ private PrintLogInBioMAJLogger pbm = null ;
+
+ private void listFileLogInLogLayoutActionPerformed(ActionEvent e) {
+ if (listFileLogInLogLayoutComboBox.getItemCount()<=0)
+ return ;
+
+ String fileLog = (String) listFileLogInLogLayoutComboBox.getSelectedItem() ;
+
+ if (fileLog == null)
+ return ;
+
+ int levelSelected = getLevelSelected();
+ File f = null ;
+
+ if (map_nameFileAndCompletePathFile.get(fileLog) != null)
+ f = new File(map_nameFileAndCompletePathFile.get(fileLog)) ;
+ else
+ return ;
+
+ boolean isTheCurrentFile = ((currentFileLog.compareTo(f.getAbsolutePath()) == 0)&&(oldLevelSelected == levelSelected));
+
+ //Si un nouveau fichier doit etre charge
+ if (!isTheCurrentFile) {
+ /**
+ * FICHIEr DIFFERENT OU LEVEL DIFF
+ */
+
+ if (timerCurrentfile != null) {
+ timerCurrentfile.stop();
+ timerCurrentfile = null ;
+ }
+
+ currentFileLog = f.getAbsolutePath() ;
+ //currentNameIndexLog = fileLog ;
+ oldLevelSelected = levelSelected;
+ nbLine = 0;
+ dateCurrentFileLog = f.lastModified() ;
+
+ if ((pbm != null) && (pbm.isAlive())) {
+ pbm.setStopTraitement();
+ while (pbm.isAlive()) {} ;
+ }
+
+ } else {
+ /**
+ * MEME FICHIER - MEME LEVEL
+ */
+
+ if (dateCurrentFileLog == f.lastModified()) {
+ return ;
+ }
+
+
+ if (pbm.isAlive()) {
+ //On attend que la premiere passe soit passe avant de reecrire quelquechose
+ return ;
+ }
+
+ if (timerCurrentfile != null)
+ timerCurrentfile.stop();
+
+ nbLine = pbm.getNbLineResult();
+ }
+
+ pbm = new PrintLogInBioMAJLogger(f.getAbsolutePath(),fileLogTextArea,sdoc,nbLine,levelSelected);
+ handleScrollLock();
+ pbm.start();
+
+
+
+ timerCurrentfile = new Timer(REFRESH_SCREEN,new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }});
+ timerCurrentfile.start();
+
+ }
+
+ private void initComponents() {
+ // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
+ // Generated using JFormDesigner Evaluation license - Olivier Filangi
+ panel1 = new JPanel();
+ label13 = new JLabel();
+ listTypeInBankLayoutComboBox = new JComboBox();
+ updatingRadioButton = new JRadioButton();
+ errorCycleRadioButton = new JRadioButton();
+ radioButtonAll = new JRadioButton();
+ label1 = new JLabel();
+ listeBankNameInBankLayoutComboBox = new JComboBox();
+ panel2 = new JPanel();
+ label6 = new JLabel();
+ descriptionField = new JTextField();
+ descriptionField.setEditable(false);
+ label4 = new JLabel();
+ urlField = new JTextField();
+ urlField.setEditable(false);
+ label7 = new JLabel();
+ remoteFilesField = new JTextField();
+ remoteFilesField.setEditable(false);
+ label8 = new JLabel();
+ remoteFilesExcludedField = new JTextField();
+ remoteFilesExcludedField.setEditable(false);
+ label9 = new JLabel();
+ versionDirectoryField = new JTextField();
+ versionDirectoryField.setEditable(false);
+ label10 = new JLabel();
+ offlineDirectoryField = new JTextField();
+ offlineDirectoryField.setEditable(false);
+ label11 = new JLabel();
+ listVersionInSessionLayoutComboBox = new JComboBox();
+ panel3 = new JPanel();
+ label12 = new JLabel();
+ checkBox1 = new JCheckBox();
+ refreshButton = new JButton();
+
+ listFileLogInLogLayoutComboBox = new JComboBox();
+ debugRadioButton = new JRadioButton();
+ debugRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+ verboseRadioButton = new JRadioButton();
+ verboseRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+
+ infoRadioButton = new JRadioButton();
+ infoRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+
+ warningRadioButton = new JRadioButton();
+ warningRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+
+ errorRadioButton = new JRadioButton();
+ errorRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+
+ panel4 = new JPanel();
+
+ scrollPane1 = new JScrollPane();
+ fileLogTextArea = new JTextPane();
+ fileLogTextArea.setEditable(false);
+ CellConstraints cc = new CellConstraints();
+
+ //======== this ========
+
+ // JFormDesigner evaluation mark
+ setBorder(new javax.swing.border.CompoundBorder(
+ new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
+ "", javax.swing.border.TitledBorder.CENTER,
+ javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
+ java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener(){public void propertyChange(java.beans.PropertyChangeEvent e){if("border".equals(e.getPropertyName()))throw new RuntimeException();}});
+
+ setLayout(new FormLayout(
+ ColumnSpec.decodeSpecs("default:grow"),
+ new RowSpec[] {
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ new RowSpec(RowSpec.CENTER, Sizes.dluY(171), FormSpec.DEFAULT_GROW)
+ }));
+
+
+ //======== panel1 ========
+ {
+ panel1.setBorder(new CompoundBorder(
+ new TitledBorder("Bank"),
+ Borders.DLU2_BORDER));
+ panel1.setLayout(new FormLayout(
+ new ColumnSpec[] {
+ new ColumnSpec(Sizes.dluX(64)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(203)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(19)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(44)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(75)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(57)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(87))
+ },
+ new RowSpec[] {
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ FormFactory.DEFAULT_ROWSPEC
+ }));
+
+ //---- label13 ----
+ label13.setText("Type");
+ panel1.add(label13, cc.xy(1, 1));
+
+ //---- listTypeInBankLayoutComboBox ----
+ listTypeInBankLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ initListBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(listTypeInBankLayoutComboBox, cc.xy(3, 1));
+
+ //---- updatingRadioButton ----
+ updatingRadioButton.setText("Updating");
+ updatingRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ radioButtonBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(updatingRadioButton, cc.xy(7, 1));
+
+ //---- onlineRadioButton ----
+ errorCycleRadioButton.setText("ErrorOnLastCycle");
+ errorCycleRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ radioButtonBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(errorCycleRadioButton, cc.xy(9, 1));
+
+ //---- radioButton1 ----
+ radioButtonAll.setText("All");
+ radioButtonAll.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ radioButtonBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(radioButtonAll, cc.xy(11, 1));
+
+ //---- label1 ----
+ label1.setText("Bank Name");
+
+ panel1.add(label1, cc.xy(1, 3));
+
+ //---- listeBankNameInBankLayoutComboBox ----
+ listeBankNameInBankLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ initInformationSessionAndBankActionPerformed(e);
+ }
+ });
+ panel1.add(listeBankNameInBankLayoutComboBox, cc.xy(3, 3));
+
+ //---- refreshButton ----
+ refreshButton.setText("refresh");
+ refreshButton.setBackground(Color.lightGray);
+ refreshButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ refreshAll(e);
+ }
+ });
+ panel1.add(refreshButton, cc.xy(9, 5));
+
+// *********************************************************************************************
+ /* panel1.setBorder(new CompoundBorder(
+ new TitledBorder("Bank"),
+ Borders.DLU2_BORDER));
+ panel1.setLayout(new FormLayout(
+ new ColumnSpec[] {
+ new ColumnSpec(Sizes.dluX(64)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(203)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(19)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(44)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(40)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(20)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(87))
+ },
+ new RowSpec[] {
+ FormFactory.DEFAULT_ROWSPEC,
+ FormFactory.LINE_GAP_ROWSPEC,
+ FormFactory.DEFAULT_ROWSPEC
+ }));
+
+ //---- label13 ----
+ label13.setText("Type");
+ panel1.add(label13, cc.xy(1, 1));
+
+ //---- listTypeInBankLayoutComboBox ----
+ listTypeInBankLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ initListBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(listTypeInBankLayoutComboBox, cc.xy(3, 1));
+
+ //---- updatingRadioButton ----
+ updatingRadioButton.setText("Updating");
+ updatingRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ radioButtonUpdatingInBankLayoutActionPerformed(e);
+ }
+ });
+ panel1.add(updatingRadioButton, cc.xy(7, 1));
+
+ //---- onlineRadioButton ----
+ onlineRadioButton.setText("Online");
+ onlineRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ radioButtonOnlineInBankLayoutActionPerformed(e);
+
+ }
+ });
+ panel1.add(onlineRadioButton, cc.xy(9, 1));
+
+ //---- refreshButton ----
+ refreshButton.setText("refresh");
+ refreshButton.setBackground(Color.lightGray);
+ refreshButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ refreshAll(e);
+ }
+ });
+
+
+ panel1.add(refreshButton, cc.xy(13, 1));
+
+ //---- label1 ----
+ label1.setText("Bank Name");
+ panel1.add(label1, cc.xy(1, 3));
+
+ //---- listeBankNameInBankLayoutComboBox ----
+ listeBankNameInBankLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ initInformationSessionAndBankActionPerformed(e);
+ }
+ });
+ panel1.add(listeBankNameInBankLayoutComboBox, cc.xy(3, 3));
+
+ //---- label2 ----
+ label2.setText("filter");
+ panel1.add(label2, cc.xy(7, 3));
+ panel1.add(filterBankName, cc.xywh(9, 3, 5, 1));
+ */
+ }
+ add(panel1, cc.xy(1, 1));
+
+ //======== panel2 ========
+ {
+ panel2.setBorder(new CompoundBorder(
+ new TitledBorder("Session"),
+ new EmptyBorder(5, 5, 5, 5)));
+ panel2.setLayout(new FormLayout(
+ new ColumnSpec[] {
+ new ColumnSpec(Sizes.dluX(64)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(198)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ FormFactory.DEFAULT_COLSPEC,
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(195))
+ },
+ RowSpec.decodeSpecs("default, default, default, default, default")));
+
+ //---- label6 ----
+ label6.setText("Description");
+ panel2.add(label6, cc.xy(1, 1));
+ panel2.add(descriptionField, cc.xy(3, 1));
+
+ //---- label4 ----
+ label4.setText("Url");
+ panel2.add(label4, cc.xy(1, 2));
+
+ //---- urlField ----
+ urlField.setText("default");
+ panel2.add(urlField, cc.xy(3, 2));
+
+ //---- label7 ----
+ label7.setText("Remote files");
+ panel2.add(label7, cc.xy(1, 3));
+ panel2.add(remoteFilesField, cc.xy(3, 3));
+
+ //---- label8 ----
+ label8.setText("Remote files excluded");
+ panel2.add(label8, cc.xy(5, 3));
+ panel2.add(remoteFilesExcludedField, cc.xy(7, 3));
+
+ //---- label9 ----
+ label9.setText("Version directory");
+ panel2.add(label9, cc.xy(1, 4));
+ panel2.add(versionDirectoryField, cc.xy(3, 4));
+
+ //---- label10 ----
+ label10.setText("Offline directory");
+ panel2.add(label10, cc.xy(5, 4));
+ panel2.add(offlineDirectoryField, cc.xy(7, 4));
+
+ //---- label11 ----
+ label11.setText("Session");
+ panel2.add(label11, cc.xy(1, 5));
+
+ //---- listVersionInSessionLayoutComboBox ----
+ listVersionInSessionLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listSessionsInSessionLayoutActionPerformed(e);
+ }
+ });
+ panel2.add(listVersionInSessionLayoutComboBox, cc.xy(3, 5));
+ }
+ add(panel2, cc.xy(1, 3));
+
+ //======== panel3 ========
+ {
+ panel3.setBorder(new CompoundBorder(
+ new TitledBorder("Log"),
+ Borders.DLU2_BORDER));
+ panel3.setLayout(new FormLayout(
+ new ColumnSpec[] {
+ new ColumnSpec(Sizes.dluX(66)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(197)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(50)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(34)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(44)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(30)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(42)),
+ FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
+ new ColumnSpec(Sizes.dluX(43))
+ },
+ RowSpec.decodeSpecs("default")));
+
+ //---- label12 ----
+ label12.setText("file");
+ panel3.add(label12, cc.xy(1, 1));
+
+ //---- listFileLogInLogLayoutComboBox ----
+ listFileLogInLogLayoutComboBox.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ listFileLogInLogLayoutActionPerformed(e);
+ }
+ });
+ panel3.add(listFileLogInLogLayoutComboBox, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
+
+ //---- checkBox1 ----
+ checkBox1.setText("scroll lock");
+ checkBox1.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ handleScrollLock();
+ }
+ });
+
+ panel3.add(checkBox1, cc.xy(5, 1));
+
+ //---- debugRadioButton ----
+ debugRadioButton.setText("DEBUG");
+ panel3.add(debugRadioButton, cc.xy(7, 1));
+
+ //---- verboseRadioButton ----
+ verboseRadioButton.setText("VERBOSE");
+ panel3.add(verboseRadioButton, cc.xy(9, 1));
+
+ //---- infoRadioButton ----
+ infoRadioButton.setText("INFO");
+ panel3.add(infoRadioButton, cc.xy(11, 1));
+
+ //---- warningRadioButton ----
+ warningRadioButton.setText("WARNING");
+ panel3.add(warningRadioButton, cc.xy(13, 1));
+
+ //---- errorRadioButton ----
+ errorRadioButton.setText("ERROR");
+ panel3.add(errorRadioButton, cc.xy(15, 1));
+ }
+ add(panel3, cc.xy(1, 5));
+
+ //======== panel4 ========
+ {
+ panel4.setBorder(new TitledBorder("Log"));
+ panel4.setLayout(new FormLayout(
+ "pref:grow",
+ "fill:185dlu:grow"));
+
+ //======== scrollPane1 ========
+ {
+ scrollPane1.setViewportView(fileLogTextArea);
+ }
+ panel4.add(scrollPane1, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL));
+ }
+ add(panel4, cc.xywh(1, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL));
+ //---- buttonGroup2 ----
+ ButtonGroup buttonGroup2 = new ButtonGroup();
+ buttonGroup2.add(updatingRadioButton);
+ buttonGroup2.add(errorCycleRadioButton);
+ buttonGroup2.add(radioButtonAll);
+
+ //---- buttonGroup1 ----
+ ButtonGroup buttonGroup1 = new ButtonGroup();
+ buttonGroup1.add(debugRadioButton);
+ buttonGroup1.add(verboseRadioButton);
+ buttonGroup1.add(infoRadioButton);
+ buttonGroup1.add(warningRadioButton);
+ buttonGroup1.add(errorRadioButton);
+ // JFormDesigner - End of component initialization //GEN-END:initComponents
+ }
+
+ // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
+ // Generated using JFormDesigner Evaluation license - Olivier Filangi
+ private JPanel panel1;
+ private JLabel label13;
+ private JButton refreshButton;
+ private JComboBox listTypeInBankLayoutComboBox;
+ private JRadioButton updatingRadioButton;
+ private JRadioButton errorCycleRadioButton;
+ private JRadioButton radioButtonAll;
+ private JLabel label1;
+ private JComboBox listeBankNameInBankLayoutComboBox;
+ private JPanel panel2;
+ private JLabel label6;
+ private JTextField descriptionField;
+ private JLabel label4;
+ private JTextField urlField;
+ private JLabel label7;
+ private JTextField remoteFilesField;
+ private JLabel label8;
+ private JTextField remoteFilesExcludedField;
+ private JLabel label9;
+ private JTextField versionDirectoryField;
+ private JLabel label10;
+ private JTextField offlineDirectoryField;
+ private JLabel label11;
+ private JComboBox listVersionInSessionLayoutComboBox;
+ private JPanel panel3;
+ private JLabel label12;
+ private JComboBox listFileLogInLogLayoutComboBox;
+ private JRadioButton debugRadioButton;
+ private JRadioButton verboseRadioButton;
+ private JRadioButton infoRadioButton;
+ private JRadioButton warningRadioButton;
+ private JRadioButton errorRadioButton;
+ private JScrollPane scrollPane1;
+ private JTextPane fileLogTextArea;
+ private JPanel panel4;
+ private JCheckBox checkBox1;
+
+ // JFormDesigner - End of variables declaration //GEN-END:variables
+
+ public void windowActivated(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+ public void windowClosed(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+ public void windowClosing(WindowEvent e) {
+ fenetre.dispose();
+ this.removeAll();
+
+ }
+
+
+
+ public void windowDeactivated(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+ public void windowDeiconified(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+ public void windowIconified(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+ public void windowOpened(WindowEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ private static JFrame fenetre = null ;
+
+ public void execute() {
+
+ fenetre = new JFrame("View logs-BioMaj-"+Biomaj.VERSION);
+ fenetre.setSize(400,400);
+ fenetre.setVisible(true);
+
+ ImageIcon icon = new ImageIcon(BiomajUtils.getBiomajRootDirectory()+"/xslt/images/icon_cycle_biomaj.png","BioMAJ - cycle update");
+ fenetre.setIconImage(icon.getImage());
+
+ Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension ScreenSize=new Dimension((screenSize.width/2),(screenSize.height/2));
+ Dimension frameSize=new Dimension(1200,800);
+ int x=(ScreenSize.width/2);
+ int y=(ScreenSize.height/2);
+ fenetre.setBounds(x,y,frameSize.width,frameSize.height);
+
+
+ fenetre.getContentPane().setLayout(new BorderLayout());
+ fenetre.getContentPane().add(this,BorderLayout.CENTER);
+
+ //fenetre.getContentPane().add(new JScrollPane(debug_text),BorderLayout.CENTER);
+ fenetre.setVisible(true);
+
+ fenetre.addWindowListener(this);
+ }
+
+ //private TreeMap<String,Vector<String>> listIndexTypeWithBanks = null ;
+
+ public Vector<String> getListType() {
+ Vector<String> res = new Vector<String>();
+ res.add("all");
+ try {
+ TreeMap<String,Vector<String>> listIndexTypeWithBanks = BiomajUtils.getListBankFindInStatefile();
+ for (String k : listIndexTypeWithBanks.keySet()) {
+ res.add(k);
+ }
+
+ } catch (BiomajException e) {
+ System.err.println(e.getMessage());
+ return res;
+ }
+
+
+ return res;
+ }
+
+ public Vector<String> getListTypeSql() {
+ Vector<String> res = new Vector<String>();
+ res.add("all");
+ List<String> types = BiomajSQLQuerier.getBankTypes();
+ if (types != null)
+ res.addAll(types);
+
+ return res;
+ }
+
+ public Vector<String> getListBanks(String type) {
+ Vector<String> res = new Vector<String>();
+ try {
+ TreeMap<String,Vector<String>> listIndexTypeWithBanks = BiomajUtils.getListBankFindInStatefile();
+ for (String k : listIndexTypeWithBanks.keySet()) {
+ if ( ( type == null || "all".compareTo(type)==0) || (type.compareTo(k)==0) )
+ res.addAll(listIndexTypeWithBanks.get(k));
+ }
+
+ } catch (BiomajException e) {
+ System.err.println(e.getMessage());
+ return res;
+ }
+
+ Collections.sort(res);
+
+ return res;
+ }
+
+
+ public Vector<String> getListBankSql(String type) {
+ List<String> banks = BiomajSQLQuerier.getBanks();
+ Vector<String> res = new Vector<String>();
+ for (String bank : banks) {
+ Map<String, String> info = BiomajSQLQuerier.getBankInfo(bank);
+ if (type == null || info.get(BiomajSQLQuerier.DB_TYPE).equals(type) || type.equals("all"))
+ res.add(bank);
+ }
+
+ return res;
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajCleanDB.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajCleanDB.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajCleanDB.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,133 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+
+public class BiomajCleanDB {
+
+
+ private static void deleteFromDbIfFileNotExist(ResultSet rs) {
+ SQLConnection c2 = SQLConnectionFactory.getConnection();
+ Statement s2 = c2.getStatement();
+ try {
+
+ while (rs.next()) {
+ String location = rs.getString(BiomajSQLQuerier.FILE_LOCATION);
+ if (!new File(location).exists()) {
+ // Delete from file table
+ String query = "DELETE FROM file WHERE idfile=" + rs.getInt(BiomajSQLQuerier.FILE_ID);
+ c2.executeUpdate(query, s2);
+ // Delete from sessionTask_has_file table
+ query = "DELETE FROM sessionTask_has_file WHERE ref_idfile=" + rs.getInt(BiomajSQLQuerier.FILE_ID);
+ c2.executeUpdate(query, s2);
+ }
+ }
+ } catch (SQLException e1) {
+ e1.printStackTrace();
+ } finally {
+ SQLConnectionFactory.closeConnection(s2);
+ }
+ }
+
+ public static void clean() {
+
+ SQLConnection connection = SQLConnectionFactory.getConnection();
+ Statement stat = connection.getStatement();
+
+ /*
+ * Delete downloaded files that no longer exist
+ */
+ String query = "SELECT idfile,location FROM file WHERE idfile IN (" +
+ "SELECT ref_idfile FROM sessionTask_has_file WHERE ref_idsessionTask IN (" +
+ "SELECT idsessionTask FROM sessionTask WHERE taskType='download'))";
+ ResultSet rs = connection.executeQuery(query, stat);
+ deleteFromDbIfFileNotExist(rs);
+
+ /*
+ * Delete extracted files that no long exist
+ */
+
+// query = "SELECT idfile,location FROM file WHERE idfile IN (" +
+// "SELECT ref_idfile FROM sessionTask_has_file WHERE ref_idsessionTask IN (" +
+// "SELECT idsessionTask FROM sessionTask WHERE taskType='extract'))";
+// rs = connection.executeQuery(query, stat);
+// deleteFromDbIfFileNotExist(rs);
+
+ SQLConnectionFactory.closeConnection(stat);
+
+ /*
+ // Deletion of session with no error and no update.
+
+ query = "SELECT idsession,logfile FROM session WHERE status=true AND idsession NOT IN " +
+ "(SELECT session FROM productionDirectory)";
+
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while(result.next()) {
+ BiomajSQLQuerier.deleteSession(result.getLong(1), result.getString(2));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ // Deletion of updates with no session with error and with no update.
+ query = "DELETE FROM updateBank WHERE isUpdated=false " +
+ "AND idupdateBank NOT IN (SELECT ref_idupdateBank FROM session)";
+
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ */
+
+ // Suppression des fichiers obsoletes
+// BiomajSQLQuerier.deleteObsoleteFiles();
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajImport.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajImport.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajImport.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,117 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+
+import org.inria.biomaj.ant.logger.DBWriter;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajImport {
+
+
+ public static void importIntoDB(String bankName) {
+
+ if (bankName == null)
+ {
+ BiomajLogger.getInstance().log("[Internal Error] : [bankName=null]");
+ return;
+ }
+
+
+ if (BiomajSQLQuerier.getBanks().contains(bankName)) {
+ System.out.println("Bank '" + bankName + "' already exists in the database.");
+ } else {
+ try {
+ BankFactory bf = new BankFactory();
+ // Permet de tester si la bank est valide
+ bf.createBank(bankName,true);
+
+ if (BiomajSQLQuerier.getBanks().contains(bankName)) {
+ System.out.println("Bank '" + bankName + "' already exists in the database !");
+ return;
+ }
+
+ Configuration config = new Configuration();
+ BiomajUtils.fillConfig(bankName, config);
+
+ File current = new File(config.getVersionDirectory() + "/current");
+
+ if (!current.exists()) {
+ System.out.println("No production directory ["
+ + current.getAbsolutePath() + "] exist.");
+ return;
+ }
+
+ Bank xbd = new Bank();
+ xbd.setConfig(config);
+
+ xbd.fillWithDirectoryVersion(current.getAbsolutePath());
+ DBWriter.createContentConfig(config, DBWriter.getBankId(config.getName()));
+ DBWriter.createUpdateBank(xbd, config.getId(),-1);
+ // DBWriter.updateStateSession(xbd, true, true);
+ DBWriter.updateStateSessionWithProductionDir(xbd);
+ System.out.println("[" + bankName + "]");
+
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ System.err.println("\n" + be.getMessage());
+ return;
+ }
+ }
+ }
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajMoveProductionDirectories.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajMoveProductionDirectories.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajMoveProductionDirectories.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,184 @@
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * This class handle the move-production-directories option.
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajMoveProductionDirectories {
+
+ private BiomajBank biomajBank = null ;
+ private Vector<ProductionDirectory> lpd = null ;
+ private File newProdDir = null ;
+
+
+ public void moveProductionDirectories(String dbName) {
+ try {
+ biomajBank = new BankFactory().createBank(dbName,true);
+ lpd = new Vector<ProductionDirectory>();
+ List<Map<String, String>> dirs = BiomajSQLQuerier.getProductionDirectories(dbName);
+ for (Map<String, String> dir : dirs)
+ lpd.add(new ProductionDirectory(dir));
+
+ newProdDir = new File(getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.dataDirProperty) +"/"+
+ getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.versionDirProperty));
+
+ for (ProductionDirectory pd : lpd)
+ if (pd.getState()==ProductionDirectory.AVAILABLE)
+ System.out.println("["+pd.getPath()+"] ");
+
+ Configuration config = new Configuration(BiomajSQLQuerier.getBankInfo(dbName));
+ String lastVersionDirectory = config.getVersionDirectory();
+
+ if (!checkIfNeed(lastVersionDirectory)) {
+ System.out.println(dbName+" no need to change production version.");
+ return;
+ }
+
+ //Verifie qu il n y a pas de version en construction
+ if (new File(lastVersionDirectory+"/"+BiomajConst.futureReleaseLink).exists()) {
+ System.err.println("A future version was detected. Please stabilize your version to execute the export of the repository.");
+ return;
+ }
+
+ if (!newProdDir.exists())
+ BiomajUtils.createSubDirectories(newProdDir.getAbsolutePath());
+
+ if (!checkSizeAvailable()) {
+ return;
+ }
+
+ System.out.println("Are you sure to perform this operation?[y/n]");
+
+ int c = System.in.read();
+ if (c != 'y')
+ return ;
+
+ // System.out.print("\rCompteur: " + i++);
+ //System.exit(0);
+
+ for (ProductionDirectory pd : lpd) {
+ if (pd.getState() == ProductionDirectory.REMOVE)
+ continue;
+ String version = pd.getPath().replaceFirst(lastVersionDirectory, "");
+ File newVersion = new File(newProdDir.getAbsolutePath()+"/"+version);
+ System.out.println("move ["+pd.getPath()+"]-->["+newVersion.getAbsolutePath()+"]");
+ BiomajUtils.deleteAll(newVersion);
+ boolean b = move(pd.getPath(),newProdDir.getAbsolutePath()+"/"+version);
+ System.out.println(pd.getPath());
+ if (b) {
+ String oldPath = pd.getPath();
+
+ pd.setPath(newVersion.getAbsolutePath());
+ BiomajSQLQuerier.updateProductionDirectory(dbName, oldPath, pd);
+ BiomajSQLQuerier.updateVersionDirectory(dbName, config.getVersionDirectory(), newProdDir.getAbsolutePath());
+ BiomajSQLQuerier.moveFiles(oldPath, pd.getPath());
+ }
+ }
+
+ lpd = new Vector<ProductionDirectory>();
+ lpd.addAll(BiomajSQLQuerier.getAvailableProductionDirectories(dbName));
+
+ //Creer le lien current
+ if (lpd.size()>0) {
+
+ File oldCurrent = new File(lastVersionDirectory+"/"+BiomajConst.currentLink);
+ oldCurrent.delete();
+
+ BiomajUtils.createLinkOnFileSystem(new File(lpd.get(lpd.size()-1).getPath()), BiomajConst.currentLink);
+ }
+
+ } catch (Exception e) {
+ System.err.println(e.getLocalizedMessage());
+ return;
+ }
+ }
+
+
+ /**
+ *
+ * @return true if the version directory need to be changed.
+ * @throws BiomajException
+ */
+ private boolean checkIfNeed(String lastDir) throws BiomajException {
+ return new File(lastDir).getAbsolutePath().compareTo(newProdDir.getAbsolutePath())!=0;
+ }
+
+
+ private boolean checkSizeAvailable() throws BiomajException {
+
+ if (newProdDir.getTotalSpace() == 0) {
+ System.out.println("Unable to determine the space available memory for ["+newProdDir.getAbsolutePath()+"]");
+ System.out.println("Would you continue the operation?[y/n]");
+ try {
+ int c = System.in.read();
+ if (c == 'y')
+ return true;
+
+ return false;
+
+ } catch (IOException e) {
+ System.err.println(e.getLocalizedMessage());
+ return false;
+ }
+ }
+
+ int totalSize = 0;
+ for (ProductionDirectory pd : lpd)
+ totalSize += pd.getSize();
+
+ if (totalSize >= newProdDir.getFreeSpace())
+ {
+ System.err.println("["+newProdDir.getAbsolutePath()+"] production directory does not have enough free space.");
+ return false;
+ }
+
+ return true;
+ }
+
+ private boolean move(String in,String out) throws IOException {
+ File inF = new File(in);
+ if (!inF.exists()) {
+ System.err.println("["+in+"] does not exist.");
+ return false;
+ }
+
+ File outF = new File(out);
+
+ if (!outF.exists())
+ BiomajUtils.createSubDirectories(outF.getAbsolutePath());
+
+
+ //boolean moveIsOk = inF.renameTo(outF);
+ boolean moveIsOk = false ;
+ if (!moveIsOk) {
+
+ return BiomajUtils.moveAllFilesToDirectory(inF, outF);
+ }
+
+ return true;
+ }
+
+ public BiomajBank getBiomajBank() {
+ return biomajBank;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajRemoveBank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajRemoveBank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/BiomajRemoveBank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,463 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.logger.DBWriter;
+import org.inria.biomaj.ant.task.BmajVersionManagement;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * <p>Remove a bank from biomaj database.</p>
+ *
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9.1.2
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajRemoveBank {
+
+ /**
+ * Keep production directory. default is false
+ * @uml.property name="keepProductionDirectory"
+ */
+ private boolean keepProductionDirectory = false;
+
+ /**
+ * Show console. default is false
+ * @uml.property name="showConsole"
+ */
+ private boolean showConsole = false;
+
+ /**
+ * Console mode. Default is MSG_INFO
+ * @uml.property name="consoleMode"
+ */
+ private int consoleMode = Project.MSG_INFO;
+
+ /**
+ * Name bank to deleted
+ * @uml.property name="bankName"
+ */
+ private String bankName = "";
+
+ public BiomajRemoveBank() {
+
+ }
+
+ public boolean isKeepProductionDirectory() {
+ return keepProductionDirectory;
+ }
+
+ /**
+ * @param keepProductionDirectory the keepProductionDirectory to set
+ * @uml.property name="keepProductionDirectory"
+ */
+ public void setKeepProductionDirectory(boolean keepProductionDirectory) {
+ this.keepProductionDirectory = keepProductionDirectory;
+ }
+
+ public boolean isShowConsole() {
+ return this.showConsole;
+ }
+
+ public int getConsoleMode() {
+ return this.consoleMode;
+ }
+
+ /**
+ * @param showConsole the showConsole to set
+ * @uml.property name="showConsole"
+ */
+ public void setShowConsole(boolean showConsole, int mode) {
+ this.showConsole = showConsole;
+ this.consoleMode = mode;
+ }
+
+ /**
+ * @return the bankName
+ * @uml.property name="bankName"
+ */
+ public String getBankName() {
+ return bankName;
+ }
+
+ /**
+ * @param bankName the bankName to set
+ * @uml.property name="bankName"
+ */
+ public void setBankName(String nameBank) {
+ this.bankName = nameBank;
+ }
+
+
+ public void execute () {
+
+ if (bankName.compareTo("") == 0) {
+ BiomajLogger.getInstance().log("dbname is empty. can't remove bank!");
+ return;
+ }
+
+ /** Verification si le fichier properties exist */
+ try {
+ BankFactory bf = new BankFactory();
+ BiomajBank bProperties = bf.createBank(getBankName(),false);
+
+ Vector<ProductionDirectory> lpd = new Vector<ProductionDirectory>();
+ lpd.addAll(BiomajSQLQuerier.getAllProductionDirectories(getBankName()));
+
+ Vector<ProductionDirectory> available = new Vector<ProductionDirectory>();
+ System.out.println("delete mode");
+ int i=0;
+ for (ProductionDirectory pd : lpd) {
+ if (pd.getState()==ProductionDirectory.AVAILABLE) {
+ available.add(pd);
+ System.out.println("["+Integer.toString(i++)+"]:"+pd.getPath()+" ("+BiomajUtils.dateToString(pd.getCreationDate(), Locale.US)+")");
+ }
+ }
+ System.out.println("["+Integer.toString(i)+"]:all");
+
+ try {
+ BufferedReader entreeClavier = new BufferedReader(new InputStreamReader(System.in));
+ String saisie = entreeClavier.readLine();
+ int code = -1;
+ try {
+ code = new Integer(saisie).intValue();
+ }
+ catch(NumberFormatException e) {
+ return;
+ }
+
+ Vector<String> versions = new Vector<String>();
+ if (code == i) // remove all
+ {
+ if (confirmeDeletion()) {
+ removeAllProductionDirectory(bProperties);
+
+ for (ProductionDirectory pd : available) {
+ versions.add(BmajVersionManagement.getRelease(pd.getPath()));
+ }
+ runRemoveProcess(bProperties, versions);// Launch remove process workflow
+ }
+ } else if ((code>=0)&&(code<=i)) { // remove given version
+ if (confirmeDeletion()) {
+ removeProductionDirectory(bProperties.getPropertiesFromBankFile(),available.get(code),lpd);
+ versions.add(BmajVersionManagement.getRelease(available.get(code).getPath()));
+ runRemoveProcess(bProperties, versions);// Launch remove process workflow
+ }
+ }
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ return;
+ }
+
+ } catch (BiomajException be) {
+ return;
+ }
+
+ }
+
+ public WorkflowEngine executeWithoutUserInteraction(List<String> dirs, boolean deleteAll) {
+
+// Verification si le fichier properties existe
+ try {
+ BankFactory bf = new BankFactory();
+ BiomajBank bProperties = bf.createBank(getBankName(),false);
+
+ File f = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.TMPDIR) + "/" + getBankName() + WorkflowEngine.extensionLock);
+ if (!f.exists()) {
+ // If lock file does not exist, create it during database access.
+ try {
+ f.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ Vector<ProductionDirectory> lpd = new Vector<ProductionDirectory>();
+ lpd.addAll(BiomajSQLQuerier.getAllProductionDirectories(getBankName()));
+
+ if (deleteAll) {
+ List<ProductionDirectory> tmp = BiomajSQLQuerier.getAvailableProductionDirectories(getBankName());
+ dirs = new ArrayList<String>();
+ for (ProductionDirectory pd : tmp)
+ dirs.add(BmajVersionManagement.getRelease(pd.getPath()));
+ }
+
+ Vector<String> versions = new Vector<String>();
+ if (deleteAll) { // remove all
+ removeAllProductionDirectory(bProperties);
+ versions.addAll(dirs);
+
+ // for (ProductionDirectory pd : dirs) {
+ // versions.add(BmajVersionManagement.getRelease(pd.getPath()));
+ // }
+ } else {
+ for (String dir : dirs) {
+ ProductionDirectory pd = new ProductionDirectory();
+ pd.setPath(dir);
+ pd.setState(ProductionDirectory.AVAILABLE);
+ removeProductionDirectory(bProperties.getPropertiesFromBankFile(), lpd.get(lpd.indexOf(pd)), lpd);
+ versions.add(BmajVersionManagement.getRelease(dir));
+ }
+ }
+
+ // Remove lock file as it will be created during the workflow execution
+ f.delete();
+
+ return runRemoveProcess(bProperties, versions);// Launch remove process workflow
+ } else {
+ System.err.println("A BioMAJ session seems to be already running for " + getBankName() + ". If that's not the case " +
+ "remove " + f.getAbsolutePath());
+ return null;
+ }
+ } catch (BiomajException be) {
+ return null;
+ }
+ }
+
+ /**
+ * Launches the remove process workflow
+ * @param bank A BiomajBank object
+ * @param version
+ */
+ public WorkflowEngine runRemoveProcess(BiomajBank bank, Vector<String> version) {
+
+ try {
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bank);
+
+ we.setModeConsole(isShowConsole(), getConsoleMode());
+ we.setVersionsToRemove(version);
+
+ we.setCommand(WorkflowEngine.TARGET_REMOVEPROCESS);
+ we.start();
+
+ return we;
+
+ } catch (BiomajException e) {
+ // Une biomajException est affichée sur la sortie erreur par defaut!
+ System.err.println("Biomaj has detected an error! for bank ["+ bank.getDbName()+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err
+ .println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bank.getDbName());
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+
+ return null;
+ }
+
+ private boolean confirmeDeletion() {
+ System.out.println("Press Yes to confirme the deletion (y/n)");
+ try {
+ BufferedReader entreeClavier = new BufferedReader(new InputStreamReader(System.in));
+ String response = entreeClavier.readLine();
+
+ // System.out.println("commande:"+response+"$");
+
+ if ((response.compareTo("yes")==0)||(response.compareTo("y")==0)||(response.compareTo("Y")==0))
+ return true;
+
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ return false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Delete a production directory and change statefile
+ * @param props
+ * @param lpd
+ * @param index
+ */
+ private void removeProductionDirectory(Properties props,ProductionDirectory toerase, Vector<ProductionDirectory> all) {
+
+ File current = new File(props.getProperty(BiomajConst.dataDirProperty)+"/"+props.getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.currentLink);
+ File prodDir = new File(toerase.getPath());
+ boolean changeCurrent = false ;
+ try {
+ if (current.exists()&&(prodDir.getAbsolutePath().compareTo(current.getCanonicalPath())==0)) {
+ if (!current.delete()) {
+ BiomajLogger.getInstance().log("Can't delete path:"+current.getAbsolutePath());
+ return;
+ }
+ changeCurrent = true;
+ System.out.println("delete:"+current.getAbsolutePath());
+ }
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ return;
+ }
+
+ if (!isKeepProductionDirectory()) {
+ System.out.println("delete:"+prodDir.getAbsolutePath());
+ BiomajUtils.deleteAll(prodDir);
+ }
+
+ toerase.setRemoveDate(new Date());
+ toerase.setState(ProductionDirectory.REMOVE);
+ try {
+ DBWriter.reWriteWithProductionDir(props.getProperty(BiomajConst.dbNameProperty), toerase);
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ }
+
+ if (changeCurrent)
+ changeCurrentLinkProductionDirectory(props,all);
+ }
+
+
+ private void removeAllProductionDirectory(BiomajBank b) throws BiomajException {
+
+ /************************
+ * Bank production
+ */
+ if (!isKeepProductionDirectory()) {
+
+ String dataDir =(String) b.getPropertiesFromBankFile().get(BiomajConst.dataDirProperty);
+ String versionDir =(String) b.getPropertiesFromBankFile().get(BiomajConst.versionDirProperty);
+
+ File dirToDel = new File (dataDir+"/"+versionDir);
+ System.out.println("delete directory:"+dirToDel.getAbsolutePath());
+ BiomajUtils.deleteAll(dirToDel);
+
+ }
+
+ /****************************
+ * log
+ */
+
+ File f = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR) + "/" + getBankName());
+
+
+ if (f.exists()) {
+ System.out.println("delete directory:"+f.getAbsolutePath());
+ BiomajUtils.deleteAll(f);
+ }
+
+
+ /****************************
+ * lock
+ */
+
+ f = new File(BiomajUtils.getBiomajRootDirectory() + "/"
+ + BiomajConst.tmpLockDirectory + "/" + getBankName()+WorkflowEngine.extensionLock);
+
+ if (f.exists()) {
+ System.out.println("delete directory:"+f.getAbsolutePath());
+ f.delete();
+ }
+
+ /*
+ * Suppression de la banque dans la base de données
+ */
+ DBWriter.deleteBank(bankName);
+
+
+ }
+
+ /**
+ * if current link not exist, find the last production directory to apply a new link
+ * @param props
+ * @param lpd
+ * @param index
+ */
+
+ private void changeCurrentLinkProductionDirectory(Properties props,Vector<ProductionDirectory> lpd) {
+
+ File current = new File(props.getProperty(BiomajConst.dataDirProperty)+"/"+props.getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.currentLink);
+
+ if (current.exists()) {
+ System.out.println("no needs to create a current link.");
+ return;
+ }
+
+ ProductionDirectory candidat = null ;
+ for (ProductionDirectory dir : lpd) {
+ if (dir.getState()!=ProductionDirectory.AVAILABLE)
+ continue;
+ if ((candidat == null)&&(dir.getRemoveDate() == null))
+ candidat = dir;
+ else if ((candidat != null)&&(dir.getRemoveDate() == null)&&(dir.getCreationDate().getTime()>candidat.getCreationDate().getTime()))
+ candidat = dir ;
+ }
+
+ try {
+ if (candidat != null ) {
+ File path = new File(candidat.getPath());
+ BiomajUtils.createLinkOnFileSystem(path, BiomajConst.currentLink);
+ }
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log(e);
+ return;
+ }
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ChangeDbName.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ChangeDbName.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ChangeDbName.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class ChangeDbName {
+
+ public static void changeDbName(String dbNameIn,String dbNameOut) throws BiomajException {
+
+ File property = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+dbNameIn+".properties");
+ File log = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR)+"/"+dbNameIn);
+
+ File newProperty = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+dbNameOut+".properties");
+ File newLog = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR)+"/"+dbNameOut);
+
+ newProperty.delete();
+ BiomajUtils.deleteAll(newLog);
+
+ try {
+ BiomajUtils.copy(property, newProperty);
+ BiomajUtils.changeKey(newProperty, BiomajConst.dbNameProperty, dbNameOut);
+
+ log.renameTo(newLog);
+
+ File runtimeDir = new File(newLog.getAbsolutePath()+"/runtime");
+ if (runtimeDir.exists()) {
+ for (File f : runtimeDir.listFiles()) {
+ if (f.getName().contains(dbNameIn)) {
+ f.renameTo(new File(f.getAbsolutePath().replaceFirst(dbNameIn+"\\.", dbNameOut+".")));
+ }
+ }
+ }
+ property.delete();
+
+ BiomajSQLQuerier.renameBank(dbNameIn, dbNameOut);
+
+ System.out.println(dbNameIn+" --> "+dbNameOut +" : ok");
+
+ } catch (BiomajException e) {
+ newProperty.delete();
+ throw e;
+ } catch (Exception e) {
+ newProperty.delete();
+ throw new BiomajException(e);
+ }
+
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/GenStatistiquesChart.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/GenStatistiquesChart.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/GenStatistiquesChart.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,110 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class GenStatistiquesChart {
+
+ public static Vector<ObjectStat> getStatVectorSize(String bankName) throws BiomajException {
+
+ Vector<ObjectStat> result = new Vector<ObjectStat>();
+
+ List<Map<String, String>> updates = BiomajSQLQuerier.getBankUpdates(bankName, false);
+
+ for (Map<String, String> update : updates) {
+ Bank bank = new Bank();
+ bank.setLoadMessages(false);
+ bank.fill(update,true);
+
+ if (!bank.getWorkflowInfoIsDeployed())
+ continue;
+
+ ObjectStat os = new ObjectStat();
+
+ float bandwidth = bank.getBandWidth() ;
+ os.setBandWidth(bandwidth);
+
+ if ((bank.getEnd()!=null)&&(bank.getStart()!=null))
+ os.setGlobalTime(bank.getEnd().getTime()-bank.getStart().getTime());
+ else {
+ //version verrole, on passe
+ continue;
+ }
+ os.setNbFileDownload(bank.getNbFilesDownloaded());
+ //os.setNbFileFlat(bank.getNbFilesMoves());
+ os.setNbSession(bank.getListOldSession().size());
+ os.setRelease(bank.getWorkflowInfoRelease());
+ os.setSize(bank.getWorkflowInfoSizeRelease());
+ os.setTime(bank.getEnd());
+ os.setSizeCompressed(bank.getWorkflowInfoSizeDownload());
+ long t = 0;
+ //System.out.println(bankName + " nbSession:"+bank.getListSession().size());
+ for (Session s:bank.getListOldSession()) {
+ //System.out.println(bankName + " id:"+s.getId());
+ //System.out.println(bankName + " start:"+BiomajUtils.dateToString(s.getStart()));
+ //System.out.println(bankName + " end:"+BiomajUtils.dateToString(s.getEnd()));
+ if (s.getEnd()!=null)
+ t += (s.getEnd().getTime()-s.getStart().getTime());
+ }
+ os.setTrueTime(t);
+
+ result.add(os);
+ }
+ /*
+ if (result.size()==1)
+ result.remove(0);
+ */
+ return result;
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/IndexXmlDescription.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/IndexXmlDescription.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/IndexXmlDescription.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,364 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.jdom.Comment;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
+
+public class IndexXmlDescription {
+
+ protected class DbTypeTree {
+ //Nom du type
+ public String name;
+ //List des banks associees à ce type
+ public Vector<String> listBankName = new Vector<String>();
+// List des size associees a la liste listBankName
+ public Vector<Long> listSizeBank = new Vector<Long>();
+ //list des type fils
+ public Vector<DbTypeTree> listType = new Vector<DbTypeTree>();
+ //size of type sub-set
+ public long size=0;
+ }
+
+
+ private static String nameXmlFile = "index.xml";
+ //nickname for the key
+ private HashMap<String,Bank> listBank;
+
+ /**
+ * @uml.property name="treeType"
+ * @uml.associationEnd multiplicity="(1 1)" inverse="this$0:org.inria.biomaj.exe.generation.infos.IndexXmlDescription$DbTypeTree"
+ */
+ private DbTypeTree treeType = new DbTypeTree();
+
+ public IndexXmlDescription() {
+ listBank = new HashMap<String,Bank> ();
+ }
+
+
+ /**
+ * IMPORTANT: we erase and write the file in a same time because some biomaj application
+ * write and read this file!!there can have a problem of synchronization!
+ * @param p
+ */
+ protected void updateXmlFile() {
+ Element root = new Element("biomaj");
+
+ root.addContent(getElementListBanks());
+ root.addContent(getTreeType(treeType));
+
+ Document document = root.getDocument();
+
+ if (document==null)
+ document=new Document(root);
+
+ XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
+
+ try {
+
+ String sFile= BiomajUtils.getStateFileDirectory()+"/"+nameXmlFile;
+
+ // An other application can read this file !!!!!
+ File f = new File(sFile);
+ if (f.exists())
+ f.delete();
+ BiomajUtils.createSubDirectories(BiomajUtils.getRelativeDirectory(sFile));
+ out.output(document, new FileOutputStream(sFile,false));
+ } catch (Exception ex) {
+ throw new BuildException(ex);
+ }
+ }
+
+ protected Element getElementListBanks() {
+ Element banks = new Element("banks");
+ long sizeTotal = 0;
+
+ for (Bank b : listBank.values()) {
+ sizeTotal += b.getWorkflowInfoSizeRelease();
+ }
+
+ banks.setAttribute("creation",BiomajUtils.dateToString(new Date(), Locale.US));
+ banks.setAttribute("totalSize",BiomajUtils.sizeToString(sizeTotal));
+
+ Set<String> vs = listBank.keySet();
+ for (String s : vs) {
+ banks.addContent(getBank(s));
+ }
+
+ return banks;
+ }
+
+ protected Element getBank(String nickName) {
+ Bank bd = listBank.get(nickName);
+ Element bank = new Element("bank");
+ bank.setAttribute("dbname",nickName);
+ bank.setAttribute("fullname",bd.getConfig().getFullName());
+ bank.setAttribute("lastUpdate",BiomajUtils.dateToString(bd.getEnd(), Locale.US));
+
+ if ((bd.getEnd())!=null && (bd.getStart()!=null))
+ bank.setAttribute("time",BiomajUtils.timeToString(bd.getEnd().getTime() - bd.getStart().getTime()));
+ else
+ bank.setAttribute("time","0");
+
+ Element release = new Element("release");
+ release.setAttribute("value",bd.getWorkflowInfoRelease());
+ bank.addContent(release);
+
+ Element d = new Element("download");
+ d.setAttribute("nbfiles",Integer.toString(bd.getNbFilesDownloaded()));
+ Comment comm = new Comment("band width in Ko/s");
+ d.addContent(comm);
+ d.setAttribute("bandwidth",Float.toString(bd.getBandWidth()));
+ bank.addContent(d);
+
+
+ Element proddir = new Element("productionDirectory");
+ proddir.setAttribute("value",bd.getWorkflowInfoProductionDir());
+ //proddir.setAttribute("nbfilesInFlat",Integer.toString(bd.getNbFilesMoves()));
+ proddir.setAttribute("size",BiomajUtils.sizeToString(bd.getWorkflowInfoSizeRelease()));
+ bank.addContent(proddir);
+
+ Element formats = new Element("formats");
+ for (String f : bd.getConfig().getFormats()) {
+ Element format = new Element ( "format" ) ;
+ format.setAttribute("name", f);
+ formats.addContent(format);
+ }
+ bank.addContent(formats);
+
+ try {
+ Element futur = new Element("nextReleaseInDay");
+ futur.addContent(new Comment("time day:hour:min:sec"));
+ //futur.addContent(new Comment("Ecart type en jours"));
+ futur.setAttribute("moy",BiomajUtils.timeToString(BiomajSQLQuerier.getStatMoyenneUpdate(nickName)));
+ //futur.setAttribute("ecartType",Double.toString(BiomajQueryXmlStateFile.getEcartTypeUpdate(knickName)));
+ bank.addContent(futur);
+ } catch (Exception be) {
+ BiomajLogger.getInstance().log(nickName+":"+be.getMessage());
+ }
+
+ bd.getWorkflowInfoSizeRelease();
+
+ return bank;
+ }
+
+
+ public boolean initListBank() {
+
+ List<String> banks = BiomajSQLQuerier.getBanks();
+ for (String bank : banks) {
+
+ Configuration config = new Configuration();
+ if (!BiomajUtils.fillConfig(bank, config))
+ continue;
+
+ if (listBank.containsKey(bank))
+ continue;
+
+ Bank b = new Bank();
+ Map<String, String> info = BiomajSQLQuerier.getLatestUpdateWithProductionDirectory(bank);
+ if (info == null)
+ continue;
+
+ b.fill(info, false);
+ b.setConfig(config);
+
+ listBank.put(bank, b);
+ }
+
+ return true;
+ }
+
+
+ public void createXmlGeneralFile(String file) throws BiomajException {
+
+ if ((file!=null)&&file.compareTo("")!=0)
+ nameXmlFile = file;
+
+ if (!initListBank())
+ return;
+
+ File general = new File(BiomajUtils.getStateFileDirectory()+"/"+nameXmlFile);
+
+ if (general.exists())
+ general.delete();
+
+ File parentDir = new File(general.getAbsolutePath().substring(0, general.getAbsolutePath().lastIndexOf('/')));
+ if (!parentDir.exists()) {
+ System.err.println(parentDir.getAbsolutePath() + " does not exist.");
+ } else {
+ constructDbType();
+ updateXmlFile();
+ }
+ }
+
+
+ public DbTypeTree constructDbType() {
+ //System.out.println("generate a tree type");
+ treeType.name="all";
+
+ for (Bank b : listBank.values()) {
+ if ((b.getConfig().getTypeBank()==null)||(b.getConfig().getTypeBank().trim().compareTo("")==0)) {
+ treeType.listBankName.add(b.getConfig().getName());
+ continue;
+ }
+ String type = b.getConfig().getTypeBank();
+
+ while (type.contains("//"))
+ type=type.replace("//", "/");
+
+ if (type.endsWith("/"))
+ type = type.replaceAll("/$", "");
+
+ if (type.startsWith("/"))
+ type = type.replaceFirst("/", "");
+
+ constructRec(treeType,type, b.getConfig().getName());
+ }
+
+ for (DbTypeTree t : treeType.listType)
+ treeType.size+=t.size;
+
+ for (String b: treeType.listBankName)
+ treeType.size+=listBank.get(b).getWorkflowInfoSizeRelease();
+
+ return treeType;
+ }
+
+
+ private void constructRec(DbTypeTree tt,String type,String nameBank) {
+ if (!type.contains("/")) {
+ boolean isNew = true;
+
+ DbTypeTree t2 = null;
+
+ for (DbTypeTree t : tt.listType) {
+ if (t.name.compareTo(type.trim())==0) {
+ isNew = false;
+ t2 = t;
+ break;
+ }
+ }
+
+ if (isNew)
+ {
+ t2 = new DbTypeTree();
+ t2.name = type.trim();
+ tt.listType.add(t2);
+ }
+
+ t2.listBankName.add(nameBank);
+ //System.out.print("size ["+nameBank+"]:");
+ //long size = BiomajUtils.computeDirectorySize(listBank.get(nameBank).getWorkflowInfoProductionDir());
+ long size = listBank.get(nameBank).getWorkflowInfoSizeRelease();
+ //System.out.println(BiomajUtils.sizeToString(size));
+ t2.listSizeBank.add(size);
+ t2.size += size;
+
+ return;
+ }
+
+ //Sinon il reste a traiter...
+ String newType = type.split("/")[0];
+ boolean isNew = true;
+
+ DbTypeTree t2 = null;
+
+ for (DbTypeTree t : tt.listType) {
+ if (t.name.compareTo(newType.trim())==0) {
+ isNew = false;
+ t2 = t;
+ break;
+ }
+ }
+
+ if (isNew)
+ {
+ t2 = new DbTypeTree();
+ t2.name = newType.trim();
+ tt.listType.add(t2);
+ }
+
+ constructRec(t2,type.replace(newType+"/", ""),nameBank);
+ t2.size += listBank.get(nameBank).getWorkflowInfoSizeRelease();
+
+ }
+
+
+
+ private Element getTreeType(DbTypeTree t) {
+
+ Element tree = new Element("type");
+ tree.setAttribute("value",t.name);
+ for (String bank : t.listBankName){
+ Element l = new Element("bank");
+ l.setAttribute("name",bank);
+ tree.addContent(l);
+ }
+
+ for (DbTypeTree d : t.listType) {
+ tree.addContent(getTreeType(d));
+ }
+
+ return tree;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ObjectStat.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ObjectStat.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/ObjectStat.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,231 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.util.Date;
+
+public class ObjectStat {
+
+ /**
+ * @uml.property name="release"
+ */
+ private String release="";
+ /**
+ * @uml.property name="size"
+ */
+ private long size =0;
+ /**
+ * @uml.property name="sizeCompressed"
+ */
+ private long sizeCompressed=0;
+ /**
+ * @uml.property name="bandWidth"
+ */
+ private double bandWidth=0.0;
+ /**
+ * @uml.property name="globalTime"
+ */
+ private long globalTime=0;
+
+ /**
+ * @uml.property name="nbSession"
+ */
+ private int nbSession=0;
+ /**
+ * @uml.property name="trueTime"
+ */
+ private long trueTime=0; // aggregation du temps des sessions
+ /**
+ * @uml.property name="nbFileDownload"
+ */
+ private int nbFileDownload=0;
+ /**
+ * @uml.property name="nbFileFlat"
+ */
+ private int nbFileFlat=0;
+
+ /**
+ * @uml.property name="time"
+ */
+ private Date time = new Date();
+
+ /**
+ * @return the bandWidth
+ * @uml.property name="bandWidth"
+ */
+ public double getBandWidth() {
+ return bandWidth;
+ }
+ /**
+ * @param bandWidth the bandWidth to set
+ * @uml.property name="bandWidth"
+ */
+ public void setBandWidth(double bandWidth) {
+ this.bandWidth = bandWidth;
+ }
+ /**
+ * @return the globalTime
+ * @uml.property name="globalTime"
+ */
+ public long getGlobalTime() {
+ return globalTime;
+ }
+ /**
+ * @param globalTime the globalTime to set
+ * @uml.property name="globalTime"
+ */
+ public void setGlobalTime(long globalTime) {
+ this.globalTime = globalTime;
+ }
+ /**
+ * @return the nbFileDownload
+ * @uml.property name="nbFileDownload"
+ */
+ public int getNbFileDownload() {
+ return nbFileDownload;
+ }
+ /**
+ * @param nbFileDownload the nbFileDownload to set
+ * @uml.property name="nbFileDownload"
+ */
+ public void setNbFileDownload(int nbFileDownload) {
+ this.nbFileDownload = nbFileDownload;
+ }
+ /**
+ * @return the nbFileFlat
+ * @uml.property name="nbFileFlat"
+ */
+ public int getNbFileFlat() {
+ return nbFileFlat;
+ }
+ /**
+ * @param nbFileFlat the nbFileFlat to set
+ * @uml.property name="nbFileFlat"
+ */
+ public void setNbFileFlat(int nbFileFlat) {
+ this.nbFileFlat = nbFileFlat;
+ }
+ /**
+ * @return the nbSession
+ * @uml.property name="nbSession"
+ */
+ public int getNbSession() {
+ return nbSession;
+ }
+ /**
+ * @param nbSession the nbSession to set
+ * @uml.property name="nbSession"
+ */
+ public void setNbSession(int nbSession) {
+ this.nbSession = nbSession;
+ }
+ /**
+ * @return the release
+ * @uml.property name="release"
+ */
+ public String getRelease() {
+ return release;
+ }
+ /**
+ * @param release the release to set
+ * @uml.property name="release"
+ */
+ public void setRelease(String release) {
+ this.release = release;
+ }
+ /**
+ * @return the size
+ * @uml.property name="size"
+ */
+ public long getSize() {
+ return size;
+ }
+ /**
+ * @param size the size to set
+ * @uml.property name="size"
+ */
+ public void setSize(long size) {
+ this.size = size;
+ }
+ /**
+ * @return the sizeCompressed
+ * @uml.property name="sizeCompressed"
+ */
+ public long getSizeCompressed() {
+ return sizeCompressed;
+ }
+ /**
+ * @param sizeCompressed the sizeCompressed to set
+ * @uml.property name="sizeCompressed"
+ */
+ public void setSizeCompressed(long sizeCompressed) {
+ this.sizeCompressed = sizeCompressed;
+ }
+ /**
+ * @return the trueTime
+ * @uml.property name="trueTime"
+ */
+ public long getTrueTime() {
+ return trueTime;
+ }
+ /**
+ * @param trueTime the trueTime to set
+ * @uml.property name="trueTime"
+ */
+ public void setTrueTime(long trueTime) {
+ this.trueTime = trueTime;
+ }
+ /**
+ * @return the time
+ * @uml.property name="time"
+ */
+ public Date getTime() {
+ return time;
+ }
+ /**
+ * @param time the time to set
+ * @uml.property name="time"
+ */
+ public void setTime(Date time) {
+ this.time = time;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/PrintLogInBioMAJLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/PrintLogInBioMAJLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/PrintLogInBioMAJLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,153 @@
+package org.inria.biomaj.exe.options;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JTextPane;
+import javax.swing.text.StyledDocument;
+
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class PrintLogInBioMAJLogger extends Thread {
+
+ private StyledDocument sdoc;
+ private String fileLog ;
+ private int lineStart = 0;
+ private int levelSelected ;
+ private JTextPane fileLogTextArea ;
+ private boolean stop = false ;
+ private boolean activeScrollLock = false ;
+
+
+ private int nbLineResult = 0;
+
+ public PrintLogInBioMAJLogger(String fileLog,JTextPane fileLogTextArea,StyledDocument sdoc,int lineStart,int levelSelected) {
+ this.fileLog = fileLog;
+ this.sdoc = sdoc ;
+ this.lineStart = lineStart ;
+ this.levelSelected = levelSelected ;
+ this.fileLogTextArea=fileLogTextArea;
+ }
+
+ private Pattern patternLog = Pattern.compile("\\[(\\d{2}-\\d{2}-\\d{4}\\s\\d{2}:\\d{2}:\\d{2})\\]\\[(\\d+/\\d+)\\]\\[(\\d)\\]\\[([\\w_-]*)\\](.*)");
+ private Pattern patternAffectation = Pattern.compile("(\\S+)=(\\S+)");
+
+ @Override
+ public void run() {
+ String line = null ;
+ String prec= "" ;
+ try {
+ if (lineStart ==0)
+ sdoc.remove(0, sdoc.getLength());
+
+ BufferedReader log = new BufferedReader( new FileReader(new File(fileLog)));
+
+ for (int i=0;i<lineStart;i++)
+ {
+ nbLineResult++;
+ log.readLine();
+ }
+
+ while ((line = log.readLine()) != null) {
+ if (stop) {
+ nbLineResult = 0;
+ log.close();
+ return ;
+ }
+ nbLineResult++;
+ //fileLogTextArea.notifyAll();
+ line = line.replaceFirst(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE, "");
+ Matcher m = patternLog.matcher(line);
+ if (m.matches()) {
+ int level = Integer.valueOf(m.group(3));
+ if (level > levelSelected)
+ continue;
+
+ if (m.groupCount()<5)
+ sdoc.insertString(sdoc.getLength(),m.group(4)+"\n",sdoc.getStyle(BioMAJLogger.getLevel(level)));
+ else {
+ if (prec.compareTo(m.group(1)+m.group(4))!=0) {
+ prec = m.group(1)+m.group(4);
+
+ sdoc.insertString(sdoc.getLength(),"\n\n\t["+m.group(1)+"]",sdoc.getStyle("date"));
+ sdoc.insertString(sdoc.getLength()," * "+m.group(4)+" * \n\n",sdoc.getStyle("task"));
+ }
+
+ sdoc.insertString(sdoc.getLength(),m.group(5)+"\n",sdoc.getStyle(BioMAJLogger.getLevel(level)));
+ }
+ } else {
+
+ m = RemoteFile.patRemoteFile.matcher(line);
+ if (m.find()) {
+
+ RemoteFile rf = new RemoteFile(line);
+
+ if ((rf.getBase()!=null)&&rf.getBase().length()>0)
+ sdoc.insertString(sdoc.getLength(),"\t\t"+rf.getBase()+"/"+rf.getName(),sdoc.getStyle("task"));
+ else
+ sdoc.insertString(sdoc.getLength(),"\t\t"+rf.getName(),sdoc.getStyle("task"));
+
+ sdoc.insertString(sdoc.getLength(),"\ttime=",sdoc.getStyle("debug"));
+ sdoc.insertString(sdoc.getLength(),BiomajUtils.dateToString(rf.getDate(), Locale.US),sdoc.getStyle("task"));
+
+ sdoc.insertString(sdoc.getLength(),"\ttimestamp=",sdoc.getStyle("debug"));
+ sdoc.insertString(sdoc.getLength(),Long.toString(rf.getDate().getTime()),sdoc.getStyle("task"));
+
+ sdoc.insertString(sdoc.getLength(),"\tsize=",sdoc.getStyle("debug"));
+ sdoc.insertString(sdoc.getLength(),Long.toString(rf.getSize())+"\n",sdoc.getStyle("task"));
+ continue;
+ }
+
+ m = patternAffectation.matcher(line);
+ if (m.matches()) {
+ sdoc.insertString(sdoc.getLength(),"\t\t"+m.group(1),sdoc.getStyle("task"));
+ sdoc.insertString(sdoc.getLength(),"=",sdoc.getStyle("debug"));
+ sdoc.insertString(sdoc.getLength(),m.group(2)+"\n",sdoc.getStyle("erreur"));
+ continue ;
+ }
+
+ if (line.compareTo("#PLACE_HOLDER_TO_PREVENT_EMPTY_FILE")==0)
+ continue;
+
+ sdoc.insertString(sdoc.getLength(),line+"\n",sdoc.getStyle("unknown"));
+ BiomajLogger.getInstance().log(line+" : no match with :"+patternLog.pattern());
+ }
+ if (activeScrollLock&&(sdoc.getLength()>0))
+ fileLogTextArea.setCaretPosition(sdoc.getLength()-1);
+ }
+ log.close();
+ } catch (Exception ee) {
+ BiomajLogger.getInstance().log(ee);
+ // ee.printStackTrace();
+ }
+ }
+
+
+ public int getNbLineResult() {
+ return nbLineResult ;
+ }
+
+ public void setStopTraitement() {
+ stop = true;
+ }
+
+
+ public boolean isActiveScrollLock() {
+ return activeScrollLock;
+ }
+
+
+ public void setActiveScrollLock(boolean activeScrollLock) {
+ this.activeScrollLock = activeScrollLock;
+ if (activeScrollLock&&(sdoc.getLength()>0)&&(fileLogTextArea!=null))
+ fileLogTextArea.setCaretPosition(sdoc.getLength()-1);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/StatusInformation.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/StatusInformation.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/StatusInformation.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,366 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.options;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class StatusInformation {
+
+ public static void getStatus(String bank) throws BiomajException {
+
+ Map<String, String> info = BiomajSQLQuerier.getBankInfo(bank);
+ if (info == null) {
+ System.out.println("No update available for this bank.");
+ return;
+ }
+
+ Configuration config = new Configuration(info);
+
+ System.out.println("#----------------");
+ System.out.println("# Properties used For the last session");
+ System.out.println("#----------------");
+ System.out.println("Keyname :"+config.getName());
+ System.out.println("Description :"+config.getFullName());
+
+ System.out.println("#----------------");
+ System.out.println();
+ System.out.println("First utilisation :"+config.getDate());
+ System.out.println("Url :"+config.getProtocol()+
+ "://"+config.getUrl()+"/"+config.getRemoteDirectory());
+ System.out.println("Remote regular expression :"+config.getRemoteFilesRegexp());
+ System.out.println("Remote excluded regular expression:"+config.getRemoteExcludedFiles());
+ System.out.println("Local regular expression :"+config.getLocalFilesRegexp());
+ System.out.println("Version directory :"+config.getVersionDirectory());
+ System.out.println("Offline directory :"+config.getOfflineDirectory());
+ System.out.println("Log files on state file :"+config.getLogFiles());
+
+ List<ProductionDirectory> lPd = BiomajSQLQuerier.getAvailableProductionDirectories(bank);
+
+ if (lPd.size() == 0)
+ return ;
+
+ long goodSession = 0 ;
+ Date t = null;
+ for (ProductionDirectory pd : lPd) {
+ if (t == null)
+ goodSession = pd.getSession();
+ else if (t.getTime()<pd.getCreationDate().getTime())
+ goodSession = pd.getSession();
+ }
+
+ Bank b = new Bank();
+
+ if (BiomajSQLQuerier.getUpdateBank(bank,goodSession,b,true)) {
+ b.setConfig(config);
+ System.out.println();
+ System.out.println("#----------------");
+ System.out.println("# Current Release");
+ System.out.println("#----------------");
+ printBank(b);
+ }
+
+ b = new Bank();
+ if (BiomajSQLQuerier.getFuturReleaseBankWithoutConfiguration(bank,b,true) && b.getEnd()==null) {
+ b.setConfig(config);
+ System.out.println();
+ System.out.println("#----------------");
+ System.out.println("# Future Release");
+ System.out.println("#----------------");
+ printBank(b);
+ }
+
+ if (lPd.size()>0) {
+ System.out.println("-----------------------------------");
+ System.out.println("List production directories ");
+ Collections.sort(lPd);
+ for (ProductionDirectory pd : lPd) {
+ System.out.println(BiomajUtils.dateToString(pd.getCreationDate(), Locale.US)+ " " + pd.getPath() + " ("+BiomajUtils.sizeToString(pd.getSize())+")");
+
+ }
+ System.out.println();
+ System.out.println();
+ System.out.println();
+ }
+ }
+
+ public static void printBank(Bank b) throws BiomajException {
+
+
+ System.out.println("Release :"+b.getWorkflowInfoRelease());
+ System.out.println("Number of session :"+Integer.toString(b.getListOldSession().size()));
+ if (b.getEnd()!=null) {
+ System.out.println("Session date :"+BiomajUtils.dateToString(b.getEnd(), Locale.US));
+ System.out.println("Duration :"+BiomajUtils.timeToString(b.getEnd().getTime()-b.getStart().getTime()));
+ }
+ if (b.getWorkflowInfoProductionDir() != null)
+ System.out.println("Production directory :"+b.getWorkflowInfoProductionDir());
+
+ System.out.println("Num files downloaded :"+b.getNbFilesDownloaded());
+ System.out.println("Bandwidth (Mo/s) :"+Float.toString(b.getBandWidth()));
+ System.out.println("Download size :"+BiomajUtils.sizeToString(b.getWorkflowInfoSizeDownload()));
+ System.out.println("Bank size :"+BiomajUtils.sizeToString(b.getWorkflowInfoSizeRelease()));
+ //System.out.println("Release files Nb :"+b.getNbFilesMoves());
+ System.out.println();
+
+ if (b.getListOldSession().size()>0)
+ System.out.println("View Last log :"+b.getListOldSession().get(b.getListOldSession().size()-1).getLogfile());
+
+
+ System.out.println();
+ System.out.println("--------------");
+ Collection<MetaProcess> lMpPre = b.getAvailableMetaProcessSql(Session.PREPROCESS);
+ System.out.println("Pre processes by metaproc:");
+ System.out.println();
+ for (MetaProcess mpPre : lMpPre) {
+ System.out.println("Metaproc:["+ mpPre.getName() +"] log:["+mpPre.getLogFile()+"]");
+ for (BiomajProcess bp : mpPre.getListProcess()) {
+ System.out.println("-->"+bp.getNameProcess()+"("+bp.getDescription()+") ");
+ }
+
+ System.out.println();
+ }
+
+
+ System.out.println();
+ System.out.println("--------------");
+ Collection<MetaProcess> lMp = b.getAvailableMetaProcessSql(Session.POSTPROCESS);
+ System.out.println("Post processes by metaproc:");
+ System.out.println();
+ for (MetaProcess mp : lMp) {
+ //System.out.println(" **************[block:"+mp.getBlock()+" metaprocess:"+mp.getName()+"]***************");
+ System.out.println("Metaproc:["+ mp.getName() +"] log:["+mp.getLogFile()+"]");
+ for (BiomajProcess bp : mp.getListProcess()) {
+ System.out.println("-->"+bp.getNameProcess()+"("+bp.getDescription()+") ");
+ /*
+ System.out.println("-------------------");
+ System.out.println(" -name :"+bp.getNameProcess());
+ System.out.println(" -exe :"+bp.getExe());
+ System.out.println(" -args :"+bp.getArgs());
+ System.out.println(" -desc :"+bp.getDescription());
+ System.out.println(" -files :"+bp.getDependancesOutput().size());
+ System.out.println(" -time :"+BiomajUtils.timeToString(bp.getEnd().getTime()-bp.getStart().getTime()));
+ System.out.println(" -log :"+mp.getLogFile());
+ */
+ }
+
+ System.out.println();
+ }
+ System.out.println();
+ }
+
+ public static void getStatus(String typeFilter, boolean updating, boolean online) throws BiomajException {
+
+ final String unknown = " ??";
+ String rowDbType = "DbType ";
+ String rowDbName = "DbName";
+
+ while (rowDbName.length()<40) rowDbName+=" ";
+
+ String rowLastRelease = "Last release ";
+ String rowSession = "Date Session ";
+ String rowStatus = "Status ";
+
+ String sep = "-";
+ String lineTitle = rowDbType+rowDbName+rowLastRelease+rowSession+rowStatus;//+rowDatadir;
+
+ while (sep.length()<lineTitle.length()) sep+="-";
+
+ System.out.println(lineTitle);
+ System.out.println(sep);
+
+ List<String> bankNames = BiomajSQLQuerier.getBanks();
+ Collections.sort(bankNames);
+ for (String bankName : bankNames) {
+ boolean init = true;
+ Map<String, String> info = BiomajSQLQuerier.getBankInfo(bankName);
+ if (info == null) {
+ System.err.println("*** Error. Could not retrieve information on bank '" + bankName + "'");
+ continue;
+ }
+
+ String type = info.get(BiomajSQLQuerier.DB_TYPE);
+ if (typeFilter != null && !typeFilter.trim().isEmpty() && !type.startsWith(typeFilter))
+ continue;
+
+
+ String lastSession = unknown;
+ String release = unknown;
+ String status = "updating";
+
+ Map<String, String> update = BiomajSQLQuerier.getLatestUpdate(bankName, true);
+
+ if (update == null)
+ continue;
+
+ List<Map<String, String>> pds = BiomajSQLQuerier.getProductionDirectories(bankName);
+ boolean available = false;
+ for (Map<String, String> pd : pds) {
+ if ((available = pd.get(BiomajSQLQuerier.DIR_STATE).equals(ProductionDirectory.AVAILABLE_STR)) == true)
+ break;
+ }
+
+ if (available) { // If there are online directories (in case of remove session)
+ String end = update.get(BiomajSQLQuerier.UPDATE_END);
+ if (Boolean.valueOf(update.get(BiomajSQLQuerier.PRODUCTION_DIR_DEPLOYED))) {
+ release = update.get(BiomajSQLQuerier.UPDATE_RELEASE);//.substring(0, 10);
+ if (end != null) {
+ if (updating)
+ continue;
+ lastSession = end.substring(0, 10);
+ status = "online";
+ } else {
+ if (online)
+ continue;
+ status = "updating";
+ }
+ }
+ }
+
+ /*
+ * Formatage
+ */
+ if (init) {
+ while(type.length()<rowDbType.length()) type+=" ";
+ init = false;
+ } else {
+ type = "";
+ while(type.length()<rowDbType.length()) type+=" ";
+ }
+ while(bankName.length()<rowDbName.length()) bankName +=" ";
+
+ if (bankName.length()>40)
+ bankName = bankName.substring(0,40);
+
+ while (release.length() < rowLastRelease.length()) release += " ";
+ while (lastSession.length() < rowSession.length()) lastSession += " ";
+ while (status.length() < rowStatus.length()) status += " ";
+
+ System.out.println(type + bankName + release + lastSession + status);
+
+ }
+
+ System.out.println();
+ System.out.println("infos : --status [dbname] ==> gives more details about releases located in local repository.");
+ System.out.println();
+ }
+
+ /**
+ * En dev, pour logger l'appli via une commande à la tail -f
+ * @param bank
+ */
+ public static void getLog(String bank) throws BiomajException {
+
+ class DirFilter implements FileFilter {
+ public boolean accept(File pathname) {
+ return pathname.isDirectory();
+ }
+ }
+
+ String log = BiomajInformation.getInstance().getProperty(BiomajInformation.WEBREPORTDIR)+"/"+bank;
+ File dirLog = new File(log);
+
+ if (! dirLog.exists()) {
+ BiomajLogger.getInstance().log("Log directory not find ["+log+"]");
+ return;
+ }
+
+ File[] lDir = dirLog.listFiles(new DirFilter());
+ File lastLogDir = null ;
+
+ for (File d : lDir) {
+ if (d.getName().contains("runtime"))
+ continue;
+ if (lastLogDir==null) {
+ lastLogDir = d;
+ continue;
+ }
+ if (lastLogDir.lastModified()<d.lastModified()) {
+ lastLogDir = d;
+ }
+ }
+
+ if (lastLogDir==null) {
+ BiomajLogger.getInstance().log("No log directory for ["+bank+"]");
+ return;
+ }
+
+ /**
+ * Faire un choix a l utilisateur du fichier à logger....
+ */
+
+ try {
+ FileInputStream fis = new FileInputStream(lastLogDir.getAbsolutePath()+"/mirror.log");
+ byte[] buf = new byte[1024];
+ int i = 0;
+ while((i=fis.read(buf))!=-1) {
+ System.out.write(buf, 0, i);
+ }
+ fis.close();
+ } catch (Exception ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ return;
+ } finally {
+
+ }
+
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/org.inria.biomaj.exe.options.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/org.inria.biomaj.exe.options.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/org.inria.biomaj.exe.options.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.exe.options" metadata="uml2-1.0" initialized="true" scrolledX="69" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="PrintLogInBioMAJLogger" location="1840,850" size="689,198" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger" runTimeClassModel="setActiveScrollLock(Z),isActiveScrollLock(),getNbLineResult(),setStopTraitement(),PrintLogInBioMAJLogger(Ljava.lang.String;Ljavax.swing.JTextPane;Ljavax.swing.text.StyledDocument;II),run()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="151,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="666,114">
+ <children xsi:type="editmodel:MethodEditModel" name="PrintLogInBioMAJLogger" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#PrintLogInBioMAJLogger(Ljava.lang.String;Ljavax.swing.JTextPane;Ljavax.swing.text.StyledDocument;II)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="run" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#run()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbLineResult" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#getNbLineResult()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStopTraitement" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#setStopTraitement()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isActiveScrollLock" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#isActiveScrollLock()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setActiveScrollLock" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger#setActiveScrollLock(Z)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/PrintLogInBioMAJLogger->org.inria.biomaj.exe.options/BioMAJLogger" source="//@children.0" target="//@children.6" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,198" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="274,10"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajRemoveBank" location="863,480" size="358,236" id="org.inria.biomaj.exe.options/BiomajRemoveBank" runTimeClassModel="setKeepProductionDirectory(Z),setBankName(Ljava.lang.String;),getBankName(),keepProductionDirectory,execute(),isKeepProductionDirectory(),bankName,BiomajRemoveBank()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="180,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="keepProductionDirectory" id="org.inria.biomaj.exe.options/BiomajRemoveBank#keepProductionDirectory"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="bankName" id="org.inria.biomaj.exe.options/BiomajRemoveBank#bankName"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="335,190">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajRemoveBank" id="org.inria.biomaj.exe.options/BiomajRemoveBank#BiomajRemoveBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isKeepProductionDirectory" id="org.inria.biomaj.exe.options/BiomajRemoveBank#isKeepProductionDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setKeepProductionDirectory" id="org.inria.biomaj.exe.options/BiomajRemoveBank#setKeepProductionDirectory(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBankName" id="org.inria.biomaj.exe.options/BiomajRemoveBank#getBankName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankName" id="org.inria.biomaj.exe.options/BiomajRemoveBank#setBankName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="execute" id="org.inria.biomaj.exe.options/BiomajRemoveBank#execute()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajRemoveBank->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.1" target="//@children.12" targetEnd="//@children.1/@sourceConnections.0/@children.2" label="//@children.1/@sourceConnections.0/@children.0" sourceEnd="//@children.1/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,226" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="633,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajRemoveBank->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.1" target="//@children.13" targetEnd="//@children.1/@sourceConnections.1/@children.2" label="//@children.1/@sourceConnections.1/@children.0" sourceEnd="//@children.1/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="291,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="66,350"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.1" target="//@children.16" targetEnd="//@children.1/@sourceConnections.2/@children.1" sourceEnd="//@children.1/@sourceConnections.2/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="358,204" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="59,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.1 //@children.15/@sourceConnections.0" name="IndexXmlDescription" location="662,134" size="355,171" id="org.inria.biomaj.exe.options/IndexXmlDescription" runTimeClassModel="initListBank(),createXmlGeneralFile(Ljava.lang.String;),constructDbType(),IndexXmlDescription()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="129,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="349,171">
+ <children xsi:type="editmodel:MethodEditModel" name="IndexXmlDescription" id="org.inria.biomaj.exe.options/IndexXmlDescription#IndexXmlDescription()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initListBank" id="org.inria.biomaj.exe.options/IndexXmlDescription#initListBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createXmlGeneralFile" id="org.inria.biomaj.exe.options/IndexXmlDescription#createXmlGeneralFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="constructDbType" id="org.inria.biomaj.exe.options/IndexXmlDescription#constructDbType()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="117,114"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/IndexXmlDescription->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.2" target="//@children.12" targetEnd="//@children.2/@sourceConnections.0/@children.2" label="//@children.2/@sourceConnections.0/@children.0" sourceEnd="//@children.2/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="30,171" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="612,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.18/@sourceConnections.0" name="StatusInformation" location="1480,1320" size="378,160" id="org.inria.biomaj.exe.options/StatusInformation" runTimeClassModel="getStatus(Ljava.lang.String;),printBank(Lorg.inria.biomaj.session.bank.Bank;),getLog(Ljava.lang.String;),getStatus(Ljava.lang.String;ZZ)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="355,76">
+ <children xsi:type="editmodel:MethodEditModel" name="getLog" id="org.inria.biomaj.exe.options/StatusInformation#getLog(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.exe.options/StatusInformation#getStatus(Ljava.lang.String;ZZ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.exe.options/StatusInformation#getStatus(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="printBank" id="org.inria.biomaj.exe.options/StatusInformation#printBank(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/StatusInformation->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.3" target="//@children.12" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,72" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="643,392"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0" name="ObjectStat" location="929,1100" size="264,654" id="org.inria.biomaj.exe.options/ObjectStat" runTimeClassModel="nbSession,getTrueTime(),time,getSize(),trueTime,setNbSession(I),setBandWidth(D),setRelease(Ljava.lang.String;),setSizeCompressed(J),getBandWidth(),setNbFileDownload(I),size,setTime(Ljava.util.Date;),getNbSession(),nbFileDownload,setNbFileFlat(I),getNbFileFlat(),setSize(J),release,getNbFileDownload(),getSizeCompressed(),nbFileFlat,sizeCompressed,bandWidth,setTrueTime(J),setGlobalTime(J),getRelease(),getGlobalTime(),getTime(),globalTime">
+ <children xsi:type="editmodel:CompartmentEditModel" size="124,190">
+ <children xsi:type="editmodel:AttributeEditModel" name="bandWidth" id="org.inria.biomaj.exe.options/ObjectStat#bandWidth"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="globalTime" id="org.inria.biomaj.exe.options/ObjectStat#globalTime"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nbFileDownload" id="org.inria.biomaj.exe.options/ObjectStat#nbFileDownload"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nbFileFlat" id="org.inria.biomaj.exe.options/ObjectStat#nbFileFlat"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="nbSession" id="org.inria.biomaj.exe.options/ObjectStat#nbSession"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="release" id="org.inria.biomaj.exe.options/ObjectStat#release"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="size" id="org.inria.biomaj.exe.options/ObjectStat#size"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sizeCompressed" id="org.inria.biomaj.exe.options/ObjectStat#sizeCompressed"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="time" id="org.inria.biomaj.exe.options/ObjectStat#time"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="trueTime" id="org.inria.biomaj.exe.options/ObjectStat#trueTime"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="241,380">
+ <children xsi:type="editmodel:MethodEditModel" name="getBandWidth" id="org.inria.biomaj.exe.options/ObjectStat#getBandWidth()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getGlobalTime" id="org.inria.biomaj.exe.options/ObjectStat#getGlobalTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFileDownload" id="org.inria.biomaj.exe.options/ObjectStat#getNbFileDownload()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFileFlat" id="org.inria.biomaj.exe.options/ObjectStat#getNbFileFlat()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbSession" id="org.inria.biomaj.exe.options/ObjectStat#getNbSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRelease" id="org.inria.biomaj.exe.options/ObjectStat#getRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSize" id="org.inria.biomaj.exe.options/ObjectStat#getSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSizeCompressed" id="org.inria.biomaj.exe.options/ObjectStat#getSizeCompressed()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTime" id="org.inria.biomaj.exe.options/ObjectStat#getTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTrueTime" id="org.inria.biomaj.exe.options/ObjectStat#getTrueTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBandWidth" id="org.inria.biomaj.exe.options/ObjectStat#setBandWidth(D)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setGlobalTime" id="org.inria.biomaj.exe.options/ObjectStat#setGlobalTime(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFileDownload" id="org.inria.biomaj.exe.options/ObjectStat#setNbFileDownload(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFileFlat" id="org.inria.biomaj.exe.options/ObjectStat#setNbFileFlat(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbSession" id="org.inria.biomaj.exe.options/ObjectStat#setNbSession(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRelease" id="org.inria.biomaj.exe.options/ObjectStat#setRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSize" id="org.inria.biomaj.exe.options/ObjectStat#setSize(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSizeCompressed" id="org.inria.biomaj.exe.options/ObjectStat#setSizeCompressed(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTime" id="org.inria.biomaj.exe.options/ObjectStat#setTime(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTrueTime" id="org.inria.biomaj.exe.options/ObjectStat#setTrueTime(J)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.23/@sourceConnections.0" name="GenStatistiquesChart" location="863,890" size="341,103" id="org.inria.biomaj.exe.options/GenStatistiquesChart" runTimeClassModel="computeAllStatisticsChart()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="471,399">
+ <children xsi:type="editmodel:MethodEditModel" name="computeAllStatisticsChart" id="org.inria.biomaj.exe.options/GenStatistiquesChart#computeAllStatisticsChart()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/GenStatistiquesChart->org.inria.biomaj.exe.options/ObjectStat" source="//@children.5" target="//@children.4" targetEnd="//@children.5/@sourceConnections.0/@children.2" label="//@children.5/@sourceConnections.0/@children.0" sourceEnd="//@children.5/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="197,103" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="131,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/GenStatistiquesChart->org.inria.biomaj.exe.options/IndexXmlDescription" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.1/@children.2" label="//@children.5/@sourceConnections.1/@children.0" sourceEnd="//@children.5/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="76,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="277,171"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/GenStatistiquesChart->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.5" target="//@children.12" targetEnd="//@children.5/@sourceConnections.2/@children.2" label="//@children.5/@sourceConnections.2/@children.0" sourceEnd="//@children.5/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,103" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="643,10"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showStaticAttributes="true" showPublicMethods="true" showStaticMethods="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0 //@children.21/@sourceConnections.0" name="BioMAJLogger" location="1440,1080" size="274,293" id="org.inria.biomaj.exe.options/BioMAJLogger" runTimeClassModel="windowClosed(Ljava.awt.event.WindowEvent;),windowDeactivated(Ljava.awt.event.WindowEvent;),windowOpened(Ljava.awt.event.WindowEvent;),windowClosing(Ljava.awt.event.WindowEvent;),getLevel(I),execute(),getListBanks(Ljava.lang.String;),windowDeiconified(Ljava.awt.event.WindowEvent;),BioMAJLogger(),windowIconified(Ljava.awt.event.WindowEvent;),windowActivated(Ljava.awt.event.WindowEvent;),getListType()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="272,893"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="336,437">
+ <children xsi:type="editmodel:MethodEditModel" name="BioMAJLogger" id="org.inria.biomaj.exe.options/BioMAJLogger#BioMAJLogger()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowActivated" id="org.inria.biomaj.exe.options/BioMAJLogger#windowActivated(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowClosed" id="org.inria.biomaj.exe.options/BioMAJLogger#windowClosed(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowClosing" id="org.inria.biomaj.exe.options/BioMAJLogger#windowClosing(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowDeactivated" id="org.inria.biomaj.exe.options/BioMAJLogger#windowDeactivated(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowDeiconified" id="org.inria.biomaj.exe.options/BioMAJLogger#windowDeiconified(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowIconified" id="org.inria.biomaj.exe.options/BioMAJLogger#windowIconified(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="windowOpened" id="org.inria.biomaj.exe.options/BioMAJLogger#windowOpened(Ljava.awt.event.WindowEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="execute" id="org.inria.biomaj.exe.options/BioMAJLogger#execute()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListType" id="org.inria.biomaj.exe.options/BioMAJLogger#getListType()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListBanks" id="org.inria.biomaj.exe.options/BioMAJLogger#getListBanks(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BioMAJLogger->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.6" target="//@children.12" targetEnd="//@children.6/@sourceConnections.0/@children.2" label="//@children.6/@sourceConnections.0/@children.0" sourceEnd="//@children.6/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,146" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="643,226"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="javax.swing/JPanel<-org.inria.biomaj.exe.options/BioMAJLogger" source="//@children.6" target="//@children.19" targetEnd="//@children.6/@sourceConnections.1/@children.1" sourceEnd="//@children.6/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="56,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="102,63"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="java.awt.event/WindowListener<-org.inria.biomaj.exe.options/BioMAJLogger" source="//@children.6" target="//@children.20" targetEnd="//@children.6/@sourceConnections.2/@children.1" sourceEnd="//@children.6/@sourceConnections.2/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="181,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="91,81"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPublicMethods="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.11/@sourceConnections.0" name="BiomajCleanStatefile" location="100,490" size="395,141" id="org.inria.biomaj.exe.options/BiomajCleanStatefile" runTimeClassModel="corrigeCompatibiliteVersion(Ljava.lang.String;),clean(Ljava.lang.String;),changePathMetaprocess(Lorg.jdom.Element;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="372,152">
+ <children xsi:type="editmodel:MethodEditModel" name="clean" id="org.inria.biomaj.exe.options/BiomajCleanStatefile#clean(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="corrigeCompatibiliteVersion" id="org.inria.biomaj.exe.options/BiomajCleanStatefile#corrigeCompatibiliteVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="changePathMetaprocess" id="org.inria.biomaj.exe.options/BiomajCleanStatefile#changePathMetaprocess(Lorg.jdom.Element;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajCleanStatefile->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.7" target="//@children.12" targetEnd="//@children.7/@sourceConnections.0/@children.2" label="//@children.7/@sourceConnections.0/@children.0" sourceEnd="//@children.7/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="197,141" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="217,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajCleanStatefile->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.7" target="//@children.13" targetEnd="//@children.7/@sourceConnections.1/@children.2" label="//@children.7/@sourceConnections.1/@children.0" sourceEnd="//@children.7/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="385,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,340"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ChangeDbName" location="1270,490" size="421,122" id="org.inria.biomaj.exe.options/ChangeDbName" runTimeClassModel="changeIncludePath(Lorg.jdom.Element;Ljava.lang.String;Ljava.lang.String;),changeDbName(Ljava.lang.String;Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="398,38">
+ <children xsi:type="editmodel:MethodEditModel" name="changeDbName" id="org.inria.biomaj.exe.options/ChangeDbName#changeDbName(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="changeIncludePath" id="org.inria.biomaj.exe.options/ChangeDbName#changeIncludePath(Lorg.jdom.Element;Ljava.lang.String;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/ChangeDbName->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.8" target="//@children.13" targetEnd="//@children.8/@sourceConnections.0/@children.2" label="//@children.8/@sourceConnections.0/@children.0" sourceEnd="//@children.8/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="210,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="392,350"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.8" target="//@children.17" targetEnd="//@children.8/@sourceConnections.1/@children.1" sourceEnd="//@children.8/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="405,122" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="15,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.22/@sourceConnections.0" name="BiomajMoveProductionDirectories" location="1760,480" size="441,191" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories" runTimeClassModel="lpd,moveProductionDirectories(Ljava.lang.String;),getBiomajBank(),newProdDir,biomajBank">
+ <children xsi:type="editmodel:CompartmentEditModel" size="136,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="biomajBank" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories#biomajBank"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lpd" id="org.inria.biomaj.session.bank/ProductionDirectory at lpd+org.inria.biomaj.exe.options/BiomajMoveProductionDirectories@|org.inria.biomaj.session.bank/ProductionDirectory#lpd"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="newProdDir" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories#newProdDir"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="407,171">
+ <children xsi:type="editmodel:MethodEditModel" name="moveProductionDirectories" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories#moveProductionDirectories(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBiomajBank" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories#getBiomajBank()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories->org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" source="//@children.9" target="//@children.12" targetEnd="//@children.9/@sourceConnections.0/@children.2" label="//@children.9/@sourceConnections.0/@children.0" sourceEnd="//@children.9/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,191" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="643,10"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajMoveProductionDirectories->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.9" target="//@children.13" targetEnd="//@children.9/@sourceConnections.1/@children.2" label="//@children.9/@sourceConnections.1/@children.0" sourceEnd="//@children.9/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="653,340"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.14/@sourceConnections.0" name="BiomajImport" location="560,480" size="240,103" id="org.inria.biomaj.exe.options/BiomajImport" runTimeClassModel="createXmlStateFile(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="217,19">
+ <children xsi:type="editmodel:MethodEditModel" name="createXmlStateFile" id="org.inria.biomaj.exe.options/BiomajImport#createXmlStateFile(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.options/BiomajImport->org.inria.biomaj.ant.logger/XmlWriterAndReader" source="//@children.10" target="//@children.13" targetEnd="//@children.10/@sourceConnections.0/@children.2" label="//@children.10/@sourceConnections.0/@children.0" sourceEnd="//@children.10/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="230,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,340"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="30,690" size="568,129" fontInfo="Arial-8-0" note="BiomajCleanStatefile
-------------------------------
Option --clean-statefile :
Cette classe nettoie le fichier d etat pour optimiser les sessions futures.
A noter, qu'une methode "corrigeCompatibiliteVersion" transforme l'ancien format 
(le fichier d etat comprenait le contenu des sessions 0.9.2.0) au nouveau (les fichiers de sessions sont sauvegarder
autre part, ce qui evite de recopier les ancienne sessions constamment 0.9.3.1) ">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.11" target="//@children.7" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="267,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="197,141"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.2/@sourceConnections.0 //@children.5/@sourceConnections.2 //@children.3/@sourceConnections.0 //@children.6/@sourceConnections.0 //@children.9/@sourceConnections.0" name="BiomajQueryXmlStateFile" location="80,1000" size="643,464" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" runTimeClassModel="getLastUpdateBankWithNewReleaseWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getLastUpdateBankWithNewRelease(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getStatMoyenneUpdate(Ljava.lang.String;),getUncompressedFilesWithArchive(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getLastMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Z),getUpdateBank(Ljava.lang.String;JLorg.inria.biomaj.session.bank.Bank;Z),getUpdateBank(Ljava.lang.String;Ljava.util.Date;Lorg.inria.biomaj.session.bank.Bank;Z),getAvailableDirectoriesProduction(Ljava.lang.String;),getFuturReleaseBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getLastOnlineDirectory(Ljava.lang.String;),getLastUpdateBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getAllUpdateBankStartDateHeader(Ljava.lang.String;),getLastConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Configuration;),getAllDirectoriesProduction(Ljava.lang.String;),getEcartTypeUpdate(Ljava.lang.String;),getAllMetaProcess(Ljava.lang.String;Ljava.util.Vector;),getLastUpdateBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getFuturReleaseBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),setSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;),getStatVectorSize(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="620,418">
+ <children xsi:type="editmodel:MethodEditModel" name="getFuturReleaseBankWithoutConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getFuturReleaseBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFuturReleaseBankWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getFuturReleaseBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithoutConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithNewRelease" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithNewRelease(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithNewReleaseWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithNewReleaseWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdateBank" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUpdateBank(Ljava.lang.String;JLorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdateBank" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUpdateBank(Ljava.lang.String;Ljava.util.Date;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllUpdateBankStartDateHeader" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllUpdateBankStartDateHeader(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUncompressedFilesWithArchive" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUncompressedFilesWithArchive(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Configuration;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastOnlineDirectory" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastOnlineDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllDirectoriesProduction" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllDirectoriesProduction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastMetaProcess" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSession" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#setSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatMoyenneUpdate" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getStatMoyenneUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcess" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllMetaProcess(Ljava.lang.String;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableDirectoriesProduction" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAvailableDirectoriesProduction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEcartTypeUpdate" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getEcartTypeUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatVectorSize" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getStatVectorSize(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="266,143"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showStaticMethods="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.7/@sourceConnections.1 //@children.10/@sourceConnections.0 //@children.1/@sourceConnections.1 //@children.8/@sourceConnections.0 //@children.9/@sourceConnections.1" name="XmlWriterAndReader" location="1088,34" size="653,350" id="org.inria.biomaj.ant.logger/XmlWriterAndReader" runTimeClassModel="getNodeFromAbsolPathFile(Ljava.lang.String;),writeXmlFileBank(Lorg.inria.biomaj.session.bank.Bank;),createContentConfig(Lorg.inria.biomaj.session.bank.Configuration;Lorg.jdom.Element;),createUpdateBankElement(Lorg.inria.biomaj.session.bank.Bank;),writeElementWithAbsolPathFile(Lorg.jdom.Element;Ljava.lang.String;),writeSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;),thereAreANewConfig(Lorg.inria.biomaj.session.bank.Bank;),writeBank(Lorg.jdom.Element;Ljava.lang.String;),createBackup(Ljava.lang.String;),createProcessFile(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;Ljava.lang.String;Lorg.inria.biomaj.session.process.MetaProcess;),configsIsEqual(Lorg.jdom.Element;Lorg.jdom.Element;),reWriteWithProductionDir(Ljava.lang.String;Ljava.util.Vector;),updateStateSession(Lorg.inria.biomaj.session.bank.Bank;ZZ),updateStateSessionWithProductionDir(Lorg.inria.biomaj.session.bank.Bank;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="89,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="630,551">
+ <children xsi:type="editmodel:MethodEditModel" name="thereAreANewConfig" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#thereAreANewConfig(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="updateStateSession" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#updateStateSession(Lorg.inria.biomaj.session.bank.Bank;ZZ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createUpdateBankElement" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#createUpdateBankElement(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeSession" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#writeSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="updateStateSessionWithProductionDir" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#updateStateSessionWithProductionDir(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="reWriteWithProductionDir" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#reWriteWithProductionDir(Ljava.lang.String;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createProcessFile" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#createProcessFile(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;Ljava.lang.String;Lorg.inria.biomaj.session.process.MetaProcess;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createBackup" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#createBackup(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeBank" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#writeBank(Lorg.jdom.Element;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createContentConfig" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#createContentConfig(Lorg.inria.biomaj.session.bank.Configuration;Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="configsIsEqual" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#configsIsEqual(Lorg.jdom.Element;Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeElementWithAbsolPathFile" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#writeElementWithAbsolPathFile(Lorg.jdom.Element;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNodeFromAbsolPathFile" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#getNodeFromAbsolPathFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeXmlFileBank" id="org.inria.biomaj.ant.logger/XmlWriterAndReader#writeXmlFileBank(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="150,280" size="369,95" fontInfo="Arial-8-0" note="BiomajImport
--------------------
option : --import
Importation d'un repertoire de production. Si un fichier d'etat est verrole, 
on doit utiliser cette option pour recreer un fichier d'etat.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.14" target="//@children.10" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="265,95" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="34,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="120,90" size="413,95" fontInfo="Arial-8-0" note="IndexXmlDescription
------------------------------
option --index
Cette option permet de creer un index au format xml de l'ensemble du repository. 
Cet index est indispensable à la generation du rapport html ">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.15" target="//@children.2" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="413,69" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,25"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.1/@sourceConnections.2" location="1280,741" size="281,78" fontInfo="Arial-8-0" note="BiomajRemoveBank
-----------------------------
option : --remove
Permet d'effacer/d'enlever une banque en production."/>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.8/@sourceConnections.1" location="1660,707" size="459,95" fontInfo="Arial-8-0" note="ChangeDbName
------------------------
option : --change-dbname
Permet de modifier le nom d'une banque en production sans modifier le fichier de propriete.
Cela impacte les fichier d'etat associe au workflow."/>
+ <children xsi:type="editmodel:NotepadEditModel" location="2000,1320" size="379,78" fontInfo="Arial-8-0" note="StatusInformation
--------------------------
option : --status
affiche les banques en production ou les information locale sur une banque">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.18" target="//@children.3" targetEnd="//@children.18/@sourceConnections.0/@children.1" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,39" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="378,39"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.6/@sourceConnections.1" name="JPanel" location="1280,885" size="233,64" id="javax.swing/JPanel">
+ <children xsi:type="editmodel:CompartmentEditModel" size="98,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="325,209"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="216,124"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.6/@sourceConnections.2" name="WindowListener" location="1530,885" size="246,81" id="java.awt.event/WindowListener">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="210,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1920,1120" size="406,95" fontInfo="Arial-8-0" note="BioMAJLogger
---------------------
option : --view-log
Affiche les informations de logs sur les banques en production dans une console.
">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.21" target="//@children.6" targetEnd="//@children.21/@sourceConnections.0/@children.1" sourceEnd="//@children.21/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,47" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="274,87"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="2260,360" size="708,112" fontInfo="Arial-8-0" note="BiomajMoveProductionDirectories
-------------------------------------------------
option : --move-production-directories
Apres modification du repertoire de production dans le fichier de propriete (description du worklow)
(modification de data.dir ou version.dir ou db.name si version.dir n est pas definit). Les repertoires courants en production doivent etre transferer
a l aide de cette commande.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.22" target="//@children.9" targetEnd="//@children.22/@sourceConnections.0/@children.1" sourceEnd="//@children.22/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="131,112" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="441,40"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="980,750" size="319,78" fontInfo="Arial-8-0" note="GenStatistiquesChart
-------------------------------
option : --stats
Generation des statistiques pour la generation du rapport html">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.23" target="//@children.5" targetEnd="//@children.23/@sourceConnections.0/@children.1" sourceEnd="//@children.23/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="111,78" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="228,0"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Options classes : status, index, clean-statefiles, view-log, import, move-production.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestChangeDbNameOption.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestChangeDbNameOption.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestChangeDbNameOption.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,128 @@
+package org.inria.biomaj.exe.options.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.options.BiomajRemoveBank;
+import org.inria.biomaj.exe.options.ChangeDbName;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Runs an update process then a changedbname process.
+ * A remove process is launched at the end to clean up the
+ * created files.
+ * Therefore, update and remove options should be tested beforehand.
+ *
+ * @author rsabas
+ *
+ */
+public class TestChangeDbNameOption {
+
+ private static Configuration config = new Configuration();
+ private static String bankName = "testbank";
+ private static String newName = "testbankbis";
+
+ @BeforeClass
+ public static void setup() {
+ TestUpdateOption.createTestFiles();
+ SQLConnectionFactory.setTestMode(true);
+ System.out.println("Running update of testbank...");
+ BankFactory bf = new BankFactory();
+
+ try {
+ WorkflowEngine.initWorkflowEngine();
+ BiomajUtils.fillConfig(bankName, config);
+ BiomajBank bb = bf.createBank(bankName,true);
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bb);
+ we.setModeConsole(false, Project.MSG_INFO);
+ we.setWorkWithCurrentDirectory(false);
+ we.setForceForANewUpdate(false);
+ we.setFromScratch(false);
+ we.setCommand(WorkflowEngine.TARGET_ALL);
+ we.start();
+
+ we.join(); // wait for thread to end
+
+ } catch (BiomajException e) {
+ System.err.println("Biomaj has detected an error! for bank ["+ bankName+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err.println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bankName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * 1 - Execute changedbname option
+ * 2 - Checks that the name has been modified in the db and that
+ * queries can be made with this name
+ * 3 - Check that properties file has been renamed
+ * 4 - Check that log directory has been renamed
+ */
+ @Test
+ public void runTest() {
+ try {
+ ChangeDbName.changeDbName(bankName, newName);
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ }
+
+
+ assertTrue(BiomajSQLQuerier.getBankInfo(newName) != null);
+
+ try {
+ File newProperty = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR) + "/" + newName + ".properties");
+ File newLog = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.LOGDIR) + "/" + newName);
+ assertTrue(newProperty.exists());
+ assertTrue(newLog.exists());
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void remove() {
+ // Remove created files
+ WorkflowEngine.initWorkflowEngine();
+ BiomajRemoveBank brb = new BiomajRemoveBank();
+ brb.setBankName(newName);
+ try {
+ brb.executeWithoutUserInteraction(null, true).join();
+ } catch (InterruptedException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+
+ @AfterClass
+ public static void cleanup() {
+ BiomajUtils.deleteAll(new File(System.getProperty("user.home") + "/testbanks"));
+ remove();
+ // Changes the name back
+ try {
+ ChangeDbName.changeDbName(newName, bankName);
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ }
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestImportOption.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestImportOption.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestImportOption.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,112 @@
+package org.inria.biomaj.exe.options.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.options.BiomajImport;
+import org.inria.biomaj.exe.options.BiomajRemoveBank;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Runs an update process to have online production directories,
+ * removes the records related to the bank from the database so
+ * that import command can be tested.
+ * Remove process is launched afterwards to clean up the files.
+ * update and remove options should be tested beforehand.
+ *
+ * @author rsabas
+ *
+ */
+public class TestImportOption {
+
+ private static Configuration config = new Configuration();
+ private static String bankName = "testbank";
+
+ @BeforeClass
+ public static void setup() {
+ TestUpdateOption.createTestFiles();
+ SQLConnectionFactory.setTestMode(true);
+ System.out.println("Running update of testbank...");
+ BankFactory bf = new BankFactory();
+
+ try {
+ WorkflowEngine.initWorkflowEngine();
+ BiomajUtils.fillConfig(bankName, config);
+ BiomajBank bb = bf.createBank(bankName,true);
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bb);
+ we.setModeConsole(false, Project.MSG_INFO);
+ we.setWorkWithCurrentDirectory(false);
+ we.setForceForANewUpdate(false);
+ we.setFromScratch(false);
+ we.setCommand(WorkflowEngine.TARGET_ALL);
+ we.start();
+
+ we.join(); // wait for thread to end
+
+ } catch (BiomajException e) {
+ System.err.println("Biomaj has detected an error! for bank ["+ bankName+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err.println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bankName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * 1 - Test that the database does not contain information about the bank
+ * that we want to import
+ * 2 - Launches the import
+ * 3 - Checks that bank general information has been inserted into the db
+ * 4 - Checks that a record for the production directory has been created
+ */
+ @Test
+ public void runTest() {
+ SQLConnectionFactory.getConnection().createDB();
+ assertTrue(BiomajSQLQuerier.getBankInfo(bankName) == null);
+ BiomajImport.importIntoDB(bankName);
+ assertTrue(BiomajSQLQuerier.getBankInfo(bankName) != null);
+ assertTrue(BiomajSQLQuerier.getProductionDirectories(bankName).size() > 0);
+ }
+
+ /**
+ * Launches remove process to delete the created files.
+ */
+ private static void remove() {
+ WorkflowEngine.initWorkflowEngine();
+ BiomajRemoveBank brb = new BiomajRemoveBank();
+ brb.setBankName(bankName);
+ try {
+ brb.executeWithoutUserInteraction(null, true).join();
+ } catch (InterruptedException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+
+ @AfterClass
+ public static void cleanup() {
+ remove();
+ BiomajUtils.deleteAll(new File(System.getProperty("user.home") + "/testbanks"));
+// BiomajSQLQuerier.closeTestModeConnection();
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestRemoveOption.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestRemoveOption.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestRemoveOption.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,142 @@
+package org.inria.biomaj.exe.options.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.options.BiomajRemoveBank;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Runs an update process then a remove process
+ * and checks that all the related stuff in the bdd
+ * and the file system has been removed.
+ * Therefore, update option should tested beforehand.
+ *
+ * @author rsabas
+ *
+ */
+public class TestRemoveOption {
+
+ private static Configuration config = new Configuration();
+ private static String bankName = "testbank";
+
+ @BeforeClass
+ public static void setup() {
+ TestUpdateOption.createTestFiles();
+
+ SQLConnectionFactory.setTestMode(true);
+ System.out.println("Running update of testbank...");
+ BankFactory bf = new BankFactory();
+
+ try {
+ WorkflowEngine.initWorkflowEngine();
+ BiomajUtils.fillConfig(bankName, config);
+ BiomajBank bb = bf.createBank(bankName,true);
+
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bb);
+ we.setModeConsole(false, Project.MSG_INFO);
+ we.setWorkWithCurrentDirectory(false);
+ we.setForceForANewUpdate(false);
+ we.setFromScratch(false);
+ we.setCommand(WorkflowEngine.TARGET_ALL);
+ we.start();
+
+ we.join(); // wait for thread to end
+
+ } catch (BiomajException e) {
+ System.err.println("Biomaj has detected an error! for bank ["+ bankName+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err.println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bankName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * 1 - Run remove process
+ * 2 - Check that production directories in file system are deleted
+ * 3 - Check that the only update record remaining refers to a remove task
+ * 4 - Check that the productiondirectory record status is set to 'remove'
+ */
+ @Test
+ public void runTest() {
+ // Make sure that we won't handle an existing workflow
+ // to avoid IllegalThreadStateException
+ WorkflowEngine.initWorkflowEngine();
+ BiomajRemoveBank brb = new BiomajRemoveBank();
+ brb.setBankName(bankName);
+ try {
+ brb.executeWithoutUserInteraction(null, true).join();
+ } catch (InterruptedException e1) {
+ e1.printStackTrace();
+ }
+
+ try {
+ BiomajBank b = new BankFactory().createBank(bankName, false);
+ String dataDir = (String) b.getPropertiesFromBankFile().get(BiomajConst.dataDirProperty);
+ String versionDir = (String) b.getPropertiesFromBankFile().get(BiomajConst.versionDirProperty);
+
+ // Production dirs are deleted
+ assertTrue(new File(dataDir + "/" + versionDir).exists() == false);
+ // Can't test whether log files are deleted as the remove process itself
+ // generates logs...
+
+ // updates are deleted, except for the removeprocess
+ assertTrue(BiomajSQLQuerier.getBankUpdates(bankName, false).size() == 1);
+
+ try {
+ // the remaining update is for the remove process
+ String query ="SELECT count(idsessiontask) FROM sessionTask WHERE " +
+ "taskType='removeprocess' AND idsessionTask IN (" +
+ "SELECT ref_idsessionTask FROM session_has_sessionTask WHERE ref_idsession IN " +
+ "(SELECT idLastSession FROM updateBank WHERE ref_idconfiguration=(" +
+ "SELECT idconfiguration FROM configuration WHERE ref_idbank=(" +
+ "SELECT idbank FROM bank WHERE name='" + bankName + "'))))";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ ResultSet rs = conn.executeQuery(query, stat);
+ assertTrue(rs.next());
+ assertTrue("The remove task has not been executed", rs.getInt(1) == 1);
+ SQLConnectionFactory.closeConnection(stat);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ assertTrue(BiomajSQLQuerier.getAvailableProductionDirectories(bankName).size() == 0);
+
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AfterClass
+ public static void cleanup() {
+ BiomajUtils.deleteAll(new File(System.getProperty("user.home") + "/testbanks"));
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestUpdateOption.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestUpdateOption.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/options/test/TestUpdateOption.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,141 @@
+package org.inria.biomaj.exe.options.test;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.util.Map;
+
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.workflow.WorkflowEngine;
+import org.inria.biomaj.exe.workflow.WorkflowEngineFactory;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ *
+ * Runs a biomaj update process for a specific test bank
+ * and checks that :
+ * - required records have been inserted in the db
+ * - required files have been downloaded
+ *
+ * @author rsabas
+ *
+ */
+public class TestUpdateOption {
+
+ private static Configuration config = new Configuration();
+ private static final String FILE_SEP = System.getProperty("file.separator");
+ private static final String DIR = System.getProperty("user.home") + "/testbanks";
+ private static String bankName = "testbank";
+ private static BiomajBank bb;
+
+ public static void createTestFiles() {
+ File dir = new File(DIR);
+ BiomajUtils.deleteAll(dir);
+ dir.mkdir();
+
+ try {
+ PrintWriter pw = new PrintWriter(new File(DIR + "/test1.txt"));
+ pw.println("blabliblo");
+ pw.close();
+
+ pw = new PrintWriter(new File(DIR + "/test2.txt"));
+ pw.print("plapliplo");
+ pw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @BeforeClass
+ public static void setup() {
+ SQLConnectionFactory.setTestMode(true);
+ createTestFiles();
+ System.out.println("Running update of testbank...");
+ BankFactory bf = new BankFactory();
+
+ try {
+ WorkflowEngine.initWorkflowEngine();
+ BiomajUtils.fillConfig(bankName, config);
+ bb = bf.createBank(bankName,true);
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+ WorkflowEngine we ;
+ we = wef.createWorkflow(bb);
+ we.setModeConsole(false, Project.MSG_INFO);
+ we.setWorkWithCurrentDirectory(false);
+ we.setForceForANewUpdate(false);
+ we.setFromScratch(false);
+ we.setCommand(WorkflowEngine.TARGET_ALL);
+ we.start();
+
+ we.join(); // wait for thread to end
+
+ } catch (BiomajException e) {
+ System.err.println("Biomaj has detected an error! for bank ["+ bankName+"]");
+ System.err.println(e.getLocalizedMessage());
+
+ } catch (BiomajBuildException bbe) {
+ System.err.println("Biomaj has detected an error during the execution of workflow for the bank :"
+ + bankName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * 1 - Check that general info have been created in the db
+ * 2 - Check that an update record have been inserted
+ * 3 - Check that session records have been inserted
+ * 4 - Check production directory (see method for test detail)
+ */
+ @Test
+ public void runTest() {
+ assertTrue(BiomajSQLQuerier.getBankInfo(bankName) != null);
+ Map<String, String> info = BiomajSQLQuerier.getLatestUpdate(bankName, false);
+ assertTrue(info != null);
+ assertTrue(BiomajSQLQuerier.getUpdateSessions(Integer.valueOf(info.get(BiomajSQLQuerier.UPDATE_ID))).size() > 0);
+ checkProductionDirectory();
+ }
+
+ @AfterClass
+ public static void cleanup() {
+
+ String dataDir = (String) bb.getPropertiesFromBankFile().get(BiomajConst.dataDirProperty);
+ String versionDir = (String) bb.getPropertiesFromBankFile().get(BiomajConst.versionDirProperty);
+
+ File dirToDel = new File(dataDir + "/" + versionDir);
+ BiomajUtils.deleteAll(dirToDel);
+ BiomajUtils.deleteAll(new File(DIR));
+
+ }
+
+ /**
+ * 1 - Check that current link has been created
+ * 2 - Check that flat directory has been created
+ * 3 - Check that the 2 files have been downloaded
+ */
+ private void checkProductionDirectory() {
+ String datadir = config.getVersionDirectory();
+ File current = new File(datadir + FILE_SEP + "current");
+ assertTrue(current.exists());
+ File flat = new File(current.getPath() + FILE_SEP + "flat");
+ assertTrue(flat.exists());
+ File[] files = flat.listFiles();
+ assertTrue(files.length == 2);
+ assertTrue(files[0].getName().equals("test1.txt") && files[1].getName().equals("test2.txt"));
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BankSetWorkflowEngine.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BankSetWorkflowEngine.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BankSetWorkflowEngine.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,292 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.util.Collections;
+import java.util.Vector;
+import org.inria.biomaj.exe.bank.BankSet;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public abstract class BankSetWorkflowEngine extends WorkflowEngine {
+
+ // Les sous workflows executes!
+ /**
+ * @uml.property name="lThread"
+ * @uml.associationEnd multiplicity="(0 -1)"
+ */
+ private WorkflowEngine[] lThread = new WorkflowEngine[0];
+ /**
+ * @uml.property name="withConsole"
+ */
+ private boolean withConsole = true;
+ /**
+ * @uml.property name="mode"
+ */
+ private int mode ;
+
+ public BankSetWorkflowEngine(BiomajBank bank) {
+ super(bank);
+ }
+
+ @Override
+ public void setModeConsole(boolean withConsole, int mode) {
+ this.withConsole = withConsole;
+ this.mode = mode;
+ }
+
+ protected void initListFils() throws BiomajException{
+ WorkflowEngineFactory wef = new WorkflowEngineFactory();
+
+ BankSet bs = (BankSet)getBiomajBank();
+ lThread = new WorkflowEngine[bs.getListBanks().size()];
+ int i = 0;
+ for (BiomajBank b : bs.getListBanks()) {
+ WorkflowEngine we ;
+
+ we = wef.createWorkflow(b);
+ we.setModeConsole(withConsole, mode);
+
+ lThread[i++] = we;
+ }
+ }
+
+ synchronized protected void startTargetFils(int target) throws BiomajException {
+ initListFils();
+ for (int i=0;i<lThread.length;i++) {
+ if ((!lThread[i].isAlive())&&(lThread[i].getState()==State.NEW)) {
+ lThread[i].setCommand(target);
+ lThread[i].start();
+ }
+ }
+ }
+
+ protected void synchronizeFils() throws BiomajException {
+ for (int i=0;i<lThread.length;i++) {
+ lThread[i].synchr();
+ }
+
+ for (int i=0;i<lThread.length;i++) {
+ while (lThread[i].isErrorOnWorkflow()==null) {} // Wait for this to return something (false or true)
+ if (lThread[i].isErrorOnWorkflow())
+ throw new BiomajException("kill.application.withoutlog");
+ }
+
+ for (int i=0;i<lThread.length;i++) {
+ WorkflowEngine.removeWE(lThread[i].getBiomajBank().getDbName());
+ }
+ }
+
+ /**
+ * Synchronisation sur un block de bank....
+ * @param bank
+ * @param block
+ * @throws BiomajException
+ */
+ protected void synchronizeFils(String bank,String block) throws BiomajException {
+
+ WorkflowEngine we = null ;
+ for (WorkflowEngine w : lThread) {
+ if (w.getBiomajBank().getDbName().compareTo(bank)==0) {
+ we = w;
+ break;
+ }
+ }
+
+ if (we == null)
+ throw new BiomajException("bankset.workflow.error.name.bank.synchro",bank,block);
+
+ if (!we.blockExist(block))
+ throw new BiomajException("bankset.workflow.error.name.block.synchro",bank,block);
+
+ we.synchr(block);
+
+ for (int i=0;i<lThread.length;i++) {
+ if ((lThread[i].isErrorOnWorkflow()!=null)&&(lThread[i].isErrorOnWorkflow()))
+ throw new BiomajException("kill.application");
+ }
+ }
+
+ @Override
+ protected void endWithErrorWorkflow(Exception e) throws BiomajException {
+ super.endWithErrorWorkflow(e);
+ /*for (int i=0;i<lThread.length;i++) {
+ lThread[i].endWithErrorWorkflow(e);
+ }*/
+ }
+
+
+
+ @Override
+ public void log(String message, int priority) {
+ if (lThread == null) {
+ System.out.println(message);
+ return;
+ }
+
+ for (int i=0;i<lThread.length;i++) {
+ lThread[i].log(message,priority);
+ }
+
+ }
+
+
+ protected String getBlockBeforeAll() {
+
+ String lBlocks = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty);
+
+ if ((lBlocks == null) || (lBlocks.trim().compareTo("")==0) ) {
+ return "";
+ }
+
+ String[] llB = lBlocks.split(",");
+ String result = "";
+ boolean stop = true ;
+ for (String b : llB) {
+ stop = true ;
+ if (getBiomajBank().getPropertiesFromBankFile().containsKey(b+".dep")) {
+ String dep = getBiomajBank().getPropertiesFromBankFile().getProperty(b+".dep");
+ if (dep.trim().compareTo("before.all")==0)
+ {
+ result=result+b+",";
+ stop = false ;
+ }
+ }
+ if (stop) {
+ if (result.compareTo("")!=0)
+ return result.substring(0, result.length()-1);
+
+ return result;
+ }
+
+ }
+ return result;
+ }
+
+ protected String getBlockAfterAll() {
+
+ String lBlocks = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty);
+
+ if ((lBlocks == null) || (lBlocks.trim().compareTo("")==0) ) {
+ return "";
+ }
+
+ String[] llB = lBlocks.split(",");
+ String result = "";
+ boolean afterAll = false;
+ for (String b : llB) {
+ if (afterAll||((!getBiomajBank().getPropertiesFromBankFile().containsKey(b+".dep"))
+ ||(getBiomajBank().getPropertiesFromBankFile().getProperty(b+".dep").trim().compareTo("after.all")==0))) {
+ afterAll = true;
+ result=result+b+",";
+ }
+ }
+
+ if (result.compareTo("")!=0)
+ return result.substring(0, result.length()-1);
+
+ return result;
+ }
+
+
+ protected String getBankAndBlockChild(int index) {
+
+ String lBlocks = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty);
+
+ if ((lBlocks == null) || (lBlocks.trim().compareTo("")==0) ) {
+ return null;
+ }
+
+ String[] llB = lBlocks.split(",");
+ int compteur = 0;
+ for (String b : llB) {
+ if (getBiomajBank().getPropertiesFromBankFile().containsKey(b+".dep")) {
+ String dep = getBiomajBank().getPropertiesFromBankFile().getProperty(b+".dep");
+ if (dep.trim().compareTo("before.all")==0)
+ continue;
+ if (dep.trim().compareTo("after.all")==0)
+ return null;
+ if (compteur == index)
+ return dep.trim();
+ compteur++;
+ } else
+ return null; // pas de dependance donc after.all
+ }
+ return null;
+ }
+
+ protected String getBlockDependsChild(int index) {
+
+ String lBlocks = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty);
+
+ if ((lBlocks == null) || (lBlocks.trim().compareTo("")==0) ) {
+ return "";
+ }
+
+ String[] llB = lBlocks.split(",");
+ int compteur = 0;
+ for (String b : llB) {
+ if (getBiomajBank().getPropertiesFromBankFile().containsKey(b+".dep")) {
+ String dep = getBiomajBank().getPropertiesFromBankFile().getProperty(b+".dep");
+ if (dep.trim().compareTo("before.all")==0)
+ continue;
+ if (dep.trim().compareTo("after.all")==0)
+ return null;
+ if (compteur == index)
+ return b;
+ compteur++;
+ } else
+ return null; // pas de dependnace donc after.all
+ }
+ return null;
+ }
+
+ @Override
+ public Vector<WorkflowEngine> getChild() {
+ Vector<WorkflowEngine> we = new Vector<WorkflowEngine>();
+ Collections.addAll(we, lThread);
+ return we;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajAntProject.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajAntProject.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajAntProject.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,150 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Properties;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectHelper;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+
+public class BiomajAntProject {
+
+ /**
+ * @uml.property name="project"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Project project = null;
+ /**
+ * @uml.property name="build"
+ */
+ private File build ;
+
+ public BiomajAntProject() {
+
+ }
+
+
+ protected void set(Properties props) throws BiomajException {
+
+ if (project == null) {
+ BiomajLogger.getInstance().log("Error DEV : project not instanciate :["+build.getAbsolutePath()+"]");
+ throw new BiomajException("ERREURDEV");
+ }
+
+ Enumeration<?> keys = props.keys();
+
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ project.setProperty(key,props.getProperty(key));
+ }
+ }
+
+ /**
+ *
+ * @param descWorkflowXml : fichier xml decrivant le workflow
+ */
+ public void init(String descWorkflowXml,Properties props) throws BiomajException {
+ project = new Project();
+ build = new File(BiomajUtils.getBiomajRootDirectory()+BiomajConst.workflowXmlDirectory+"/"+descWorkflowXml);
+ if (!build.exists()) {
+ BiomajLogger.getInstance().log("Error DEV : xml file (workflow description) not find:["+build.getAbsolutePath()+"]");
+ throw new BiomajException("ERREURDEV");
+ }
+
+ project.setUserProperty("ant.file", build.getAbsolutePath());
+ set(props);
+ }
+
+ public void start () {
+ project.init();
+ ProjectHelper helper = ProjectHelper.getProjectHelper();
+ project.addReference("ant.projectHelper", helper);
+ helper.parse(project, build);
+ project.fireBuildStarted();
+ }
+
+ public void updateProperties(Properties props) {
+ Enumeration<?> keys = props.keys();
+
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ if ((project.getProperty(key)==null)||(project.getProperty(key).compareTo(props.getProperty(key))!=0)) {
+ project.log("update property ["+key+":"+props.getProperty(key)+"]");
+ project.setProperty(key,props.getProperty(key));
+ }
+ }
+ }
+
+ public void addBuildListener(BuildListener bl) {
+ if (project != null)
+ project.addBuildListener(bl);
+ }
+
+
+ public String getProperty(String key) {
+ if (project!=null)
+ return project.getProperty(key);
+ else
+ return null;
+ }
+
+ public void setProperty(String key,String value) {
+ if (project!=null)
+ project.setProperty(key,value);
+ }
+
+ /**
+ * @return the project
+ * @uml.property name="project"
+ */
+ public Project getProject() {
+ return project;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajThread.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajThread.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/BiomajThread.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,111 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.util.concurrent.Semaphore;
+import org.inria.biomaj.singleton.BiomajLogger;
+
+
+public class BiomajThread extends Thread {
+ /**
+ * The workflow is lock by default!
+ * @uml.property name="lockWorkflow"
+ */
+ private Semaphore lockWorkflow = new Semaphore(0);
+
+ /**
+ * @uml.property name="threadName"
+ */
+ private String threadName;
+
+ /**
+ * @uml.property name="errorOnWorkflow"
+ */
+ private Boolean errorOnWorkflow = null;
+
+ public BiomajThread(String threadName) {
+ setThreadName(threadName);
+ }
+
+ protected void synchr() {
+ try {
+ //System.out.println("--------------------->acquire:"+getThreadName()+" nb semaphore:"+lockWorkflow.availablePermits());
+ lockWorkflow.acquire();
+ //System.out.println("<--------------------acquire ok:"+getThreadName()+" nb semaphore:"+lockWorkflow.availablePermits());
+ } catch (InterruptedException ex) {
+ BiomajLogger.getInstance().log(ex);
+
+ /* ________PAS NORMAL -> A VOIR ______**/
+ System.exit(-1);
+ }
+ }
+
+ protected synchronized void release() {
+ // System.out.println("------>release:"+getThreadName()+"["+WorkflowEngine.getReference(getThreadName())+"]<----------");
+ lockWorkflow.release(WorkflowEngine.getReference(getThreadName())+1);
+ }
+
+ /**
+ * @return the threadName
+ * @uml.property name="threadName"
+ */
+ public String getThreadName() {
+ return threadName;
+ }
+
+ /**
+ * @param threadName the threadName to set
+ * @uml.property name="threadName"
+ */
+ public void setThreadName(String threadName) {
+ this.threadName = threadName;
+ }
+
+ public Boolean isErrorOnWorkflow() {
+ return errorOnWorkflow;
+ }
+
+ public void setErrorOnWorkflow(boolean errorOnWorkflow) {
+ this.errorOnWorkflow = new Boolean(errorOnWorkflow);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ComputedBankWorkflowEngine.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ComputedBankWorkflowEngine.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ComputedBankWorkflowEngine.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,411 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BankSet;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+public class ComputedBankWorkflowEngine extends BankSetWorkflowEngine {
+
+
+ public ComputedBankWorkflowEngine(BiomajBank bank) throws BiomajException {
+ super(bank);
+ /*
+ * Attention, une instance de workflow engine est deja reference
+ * avec super (bank)
+ * Ce qui signifie que la la ligne qui suit :
+ * remoteBankWorkflowEngine = new RemoteBankWorkflowEngine(bank);
+ * ne s'enregistre pas au pres la liste static des workflow exécuter à cette session
+ *
+ * voir le constructeur de WorkflowEngine()
+ */
+ remoteBankWorkflowEngine = new RemoteBankWorkflowEngine(bank);
+ }
+
+
+
+ @Override
+ public void setCommand(int command) {
+ super.setCommand(command);
+ remoteBankWorkflowEngine.setCommand(command);
+ }
+
+ private RemoteBankWorkflowEngine remoteBankWorkflowEngine = null;
+
+ /**
+ * Getter of the property <tt>remoteBankWorkflowEngine</tt>
+ * @return Returns the remoteBankWorkflowEngine.
+ * @uml.property name="remoteBankWorkflowEngine"
+ */
+ public RemoteBankWorkflowEngine getRemoteBankWorkflowEngine() {
+ return remoteBankWorkflowEngine;
+ }
+
+ /**
+ * Setter of the property <tt>remoteBankWorkflowEngine</tt>
+ * @param remoteBankWorkflowEngine The remoteBankWorkflowEngine to set.
+ * @uml.property name="remoteBankWorkflowEngine"
+ */
+ public void setRemoteBankWorkflowEngine(RemoteBankWorkflowEngine remoteBankWorkflowEngine) {
+ this.remoteBankWorkflowEngine = remoteBankWorkflowEngine;
+ }
+
+
+ @Override
+ public void setModeConsole(boolean withConsole, int mode) {
+ super.setModeConsole(withConsole, mode);
+ if (remoteBankWorkflowEngine != null)
+ remoteBankWorkflowEngine.setModeConsole(withConsole, mode);
+ else {
+ BiomajLogger.getInstance().log("mode console can't be initialized for:"+getBiomajBank().getDbName());
+ }
+ }
+
+
+
+ /**
+ * Tant qu on ne met pas en production la banque dependante, on peut effectuer le reste du workflow
+ */
+ @Override
+ protected void runUntilMirror() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ //2) on execute la banque courante
+ computeRemoteDirectory();//calcul remote.dir
+ remoteBankWorkflowEngine.runUntilMirror();
+ }
+
+
+
+ @Override
+ protected void runUntilMakeProduction() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ //2) on execute la banque courante
+ computeRemoteDirectory();//calcul remote.dir
+ remoteBankWorkflowEngine.runUntilMakeProduction();
+ }
+
+
+
+ @Override
+ protected void runUntilPostProcess() throws BiomajException {
+ //1) On lance les fils........
+ //----------------------------
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ //2) on execute la banque courante
+ computeRemoteDirectory();//calcul remote.dir
+ remoteBankWorkflowEngine.runUntilPostProcess();
+
+ /*
+ if (remoteBankWorkflowEngine.linkFuturReleaseExist()) {
+ //3) on execute les post_process before.all
+ String listBlock = getBlockBeforeAll();
+ remoteBankWorkflowEngine.log("List Block - post.process [before.all] :"+listBlock, Project.MSG_INFO);
+
+ //4) On lance le telechargement de la banque courante
+ if ((listBlock != null) && (listBlock.trim().compareTo("")!=0))
+ remoteBankWorkflowEngine.runPostProcess(listBlock);
+ }
+
+
+ //5) Post process fils :
+ startTargetFils(WorkflowEngine.TARGET_POSTPROCESS);
+ synchronizeFils();
+
+
+ if (remoteBankWorkflowEngine.linkFuturReleaseExist()) {
+ String listBlock = getBlockAfterAll();
+ remoteBankWorkflowEngine.log("List Block - post.process [after.all] :"+listBlock, Project.MSG_INFO);
+ if ((listBlock != null) && (listBlock.trim().compareTo("")!=0))
+ remoteBankWorkflowEngine.runPostProcess(listBlock);
+ }
+ */
+ }
+
+
+
+ @Override
+ protected void runUntilPreProcess() throws BiomajException {
+// 1) On lance les fils........
+ //----------------------------
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ //2) on execute la banque courante
+ computeRemoteDirectory();//calcul remote.dir
+ remoteBankWorkflowEngine.runUntilPreProcess();
+ }
+
+
+ @Override
+ protected void runUntilDeployment() throws BiomajException {
+ runAll();
+ }
+
+ @Override
+ protected void runAll() throws BiomajException {
+ //1) Launch children banks
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ //2) Execute current bank
+ computeRemoteDirectory(); // calculate remote.dir
+ remoteBankWorkflowEngine.runAll();
+ //3) Deploy current bank
+ startTargetFils(WorkflowEngine.TARGET_DEPLOY);
+ }
+
+
+
+ @Override
+ protected void runRebuild() throws BiomajException {
+ remoteBankWorkflowEngine.setListBlockProcessToRebuild(getListBlockProcessToRebuild());
+ remoteBankWorkflowEngine.setListMetaProcessToRebuild(getListMetaProcessToRebuild());
+ remoteBankWorkflowEngine.setListProcessToRebuild(getListProcessToRebuild());
+ remoteBankWorkflowEngine.runRebuild();
+ }
+
+
+
+ @Override
+ protected void runDeployment() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_DEPLOY);
+ remoteBankWorkflowEngine.runDeployment();
+ }
+
+
+
+ @Override
+ protected void runMakeProduction() throws BiomajException {
+ computeRemoteDirectory();//calcul remote.dir
+ remoteBankWorkflowEngine.runMakeProduction();
+ }
+
+
+
+ @Override
+ protected void runMirror() throws BiomajException {
+ computeRemoteDirectory();//calcul remote.dir
+// 3) On lance le telechargement de la banque courante
+ remoteBankWorkflowEngine.runMirror();
+ }
+
+ protected void runPostProcessBeforeAll() throws BuildException, BiomajException {
+// EXECUTION DES BLOCKS BEFORE.ALL
+ //-------------------------------
+ String listBlock = getBlockBeforeAll();
+
+ if ((listBlock == null) || (listBlock.trim().compareTo("")==0) )
+ return ;
+
+ if (remoteBankWorkflowEngine.linkFuturReleaseExist()) {
+ //3) on execute les post_process before.all
+
+ remoteBankWorkflowEngine.log("List Block - post.process [before.all] :"+listBlock, Project.MSG_INFO);
+
+ //4) On lance le telechargement de la banque courante
+ if ((listBlock != null) && (listBlock.trim().compareTo("")!=0))
+ remoteBankWorkflowEngine.runPostProcess(listBlock);
+ }
+
+ }
+
+
+ protected void runPostProcessFils() throws BuildException, BiomajException {
+
+ }
+
+ @Override
+ protected void runPostProcess() throws BiomajException {
+ runPostProcessBeforeAll() ;
+ //5) Post process fils :
+ startTargetFils(WorkflowEngine.TARGET_POSTPROCESS);
+
+ // EXECUTION DES BLOCKS SYNCHRONISE SUR BLOCK FILS
+ // -------------------------------
+
+ if (remoteBankWorkflowEngine.linkFuturReleaseExist()) {
+ int i=0;
+ String dep = null;
+ while ((dep = getBankAndBlockChild(i))!=null) {
+ String[] deps = dep.split("\\.");
+
+ if (deps.length!=2) {
+ throw new BiomajException("computedbank.workflow.error.internal.deps",deps);
+ }
+ remoteBankWorkflowEngine.log(getBiomajBank().getDbName()+" : attendre :"+deps[0]+"-"+ deps[1],Project.MSG_DEBUG);
+ synchronizeFils(deps[0], deps[1]);
+ remoteBankWorkflowEngine.runPostProcess(getBlockDependsChild(i));
+ i++;
+ }
+ }
+ synchronizeFils();
+
+ //EXECUTION DES BLOCKS AFTER.ALL
+ //-------------------------------
+
+ if (remoteBankWorkflowEngine.linkFuturReleaseExist()) {
+ String listBlock = getBlockAfterAll();
+ remoteBankWorkflowEngine.log("List Block - post.process [after.all] :"+listBlock, Project.MSG_INFO);
+ if ((listBlock != null) && (listBlock.trim().compareTo("")!=0))
+ remoteBankWorkflowEngine.runPostProcess(listBlock);
+ }
+
+ }
+
+
+
+ @Override
+ protected void runPreProcess() throws BiomajException {
+ remoteBankWorkflowEngine.runPreProcess();
+
+ }
+
+ @Override
+ public void runOnlyRemoveProcess() throws BiomajException {
+ Vector<String> versions = getVersionToRemove();
+ for (String version : versions) {
+ runRemoveProcess(version);
+ }
+ }
+
+ @Override
+ public void runRemoveProcess(String version) throws BiomajException {
+ remoteBankWorkflowEngine.runRemoveProcess(version);
+ }
+
+
+
+ @Override
+ protected void endWorkflow() throws BiomajException {
+ super.endWorkflow();
+ remoteBankWorkflowEngine.endWorkflow();
+ }
+
+ @Override
+ protected void initWorkflow() throws BiomajException {
+ super.initWorkflow();
+ remoteBankWorkflowEngine.initWorkflow();
+ }
+
+ @Override
+ protected void endWithErrorWorkflow(Exception e) throws BiomajException {
+ super.endWithErrorWorkflow(e);
+ remoteBankWorkflowEngine.endWithErrorWorkflow(e);
+ }
+
+
+
+ @Override
+ public void log(String message, int priority) {
+ super.log(message,priority);
+ remoteBankWorkflowEngine.log(message, priority);
+ }
+
+
+ protected void computeRemoteDirectory() throws BiomajBuildException {
+ BankSet bs = (BankSet)getBiomajBank();
+
+ if (bs.getListBanks().size() != 1) {
+ remoteBankWorkflowEngine.log("Only one dependency allowed! Found ["+bs.getListBanks().size()+"]", Project.MSG_WARN);
+ }
+
+ if (bs.getListBanks().size() == 0)
+ return;
+
+ BiomajBank bb = bs.getListBanks().get(0);
+
+ String path = bb.getPropertiesFromBankFile().getProperty(BiomajConst.dataDirProperty)+"/"+bb.getPropertiesFromBankFile().getProperty(BiomajConst.versionDirProperty);
+
+ File future_release = new File(path+"/"+BiomajConst.futureReleaseLink);
+
+ String valueVersion = "";
+
+ if (future_release.exists()) {
+ try {
+ remoteBankWorkflowEngine.log(BiomajConst.futureReleaseLink+" directory found!", Project.MSG_INFO);
+ valueVersion = future_release.getCanonicalPath();
+
+ } catch (IOException ioe) {
+ remoteBankWorkflowEngine.log(ioe.getMessage(), Project.MSG_ERR);
+ throw new BiomajBuildException(remoteBankWorkflowEngine.getProject(),"MESSAGE_ERRUEUR_DEPENDS",ioe);
+ }
+ } else {
+ remoteBankWorkflowEngine.log("no detect futur release", Project.MSG_INFO);
+ File current_release = new File(path+"/"+BiomajConst.currentLink);
+
+ if (current_release.exists()) {
+ try {
+ remoteBankWorkflowEngine.log(BiomajConst.currentLink+" directory found!", Project.MSG_INFO);
+ valueVersion = current_release.getCanonicalPath();
+ } catch (IOException ioe) {
+ remoteBankWorkflowEngine.log(ioe.getMessage(), Project.MSG_ERR);
+ throw new BiomajBuildException(remoteBankWorkflowEngine.getProject(),"MESSAGE_ERREUR_DEPENDS",ioe);
+ }
+ } else
+ throw new BiomajBuildException(remoteBankWorkflowEngine.getProject(),"MESSAGE_ERRUEUR_DEPENDS_CANT_COMPUT_REMOTEDIR",null);
+ }
+
+ valueVersion = valueVersion+"/"+remoteBankWorkflowEngine.getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.flatRepositoryProperty);
+ File file = new File (valueVersion);
+
+ if (file.exists()) {
+ remoteBankWorkflowEngine.getBiomajBank().getPropertiesFromBankFile().setProperty(BiomajConst.remoteDirProperty, valueVersion);
+ remoteBankWorkflowEngine.updateProperties();
+ remoteBankWorkflowEngine.log("value remote.dir:["+valueVersion+"]", Project.MSG_INFO);
+ } else
+ throw new BiomajBuildException(remoteBankWorkflowEngine.getProject(),"computedbank.workflow.error.datalocation",valueVersion,null);
+
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ProcessSequentielHandler.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ProcessSequentielHandler.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/ProcessSequentielHandler.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,530 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.logger.BiomajProcessListenerHandler;
+import org.inria.biomaj.ant.logger.SimpleLoggerHistoric;
+import org.inria.biomaj.ant.task.BmajExecute;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+public class ProcessSequentielHandler extends BiomajThread {
+
+
+ /**
+ * @uml.property name="bProject"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private BiomajAntProject bProject = null;
+ /**
+ * Data process
+ * @uml.property name="biomajBank"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+
+ private BiomajBank biomajBank;
+
+ /**
+ * @uml.property name="xmlBank"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Bank xmlBank;
+
+ /**
+ * @uml.property name="typeProcessName"
+ */
+ private String typeProcessName;
+
+ /**
+ * @uml.property name="metaProc"
+ * @uml.associationEnd
+ */
+ private MetaProcess metaProc = null;
+
+ /**
+ * @uml.property name="block"
+ */
+ private String block="";
+
+ /**
+ * @uml.property name="listProcessToLaunched"
+ */
+ private String listProcessToLaunched = "";
+
+ /**
+ * @uml.property name="listenerHandler"
+ * @uml.associationEnd
+ */
+ BiomajProcessListenerHandler listenerHandler;
+
+ /**
+ * Others
+ * @uml.property name="withConsole"
+ */
+
+ private boolean withConsole = true;
+
+ /** End Data */
+
+ /** Constructor */
+ public ProcessSequentielHandler(BiomajBank biomajBank, Bank xmlBank,
+ String typeProcessName) throws BiomajException {
+ super(biomajBank.getDbName());
+ this.biomajBank = biomajBank;
+ this.xmlBank = xmlBank;
+ this.typeProcessName = typeProcessName;
+ bProject = new BiomajAntProject();
+ }
+
+ @Override
+ public void interrupt() {
+ super.interrupt();
+ }
+
+ @Override
+ public boolean isInterrupted() {
+ return super.isInterrupted();
+ }
+
+ public void initProcess() {
+
+ Properties props = biomajBank.getPropertiesFromBankFile();
+ try {
+ bProject.init(BiomajConst.processXmlFile, props);
+ } catch (BiomajException e) {
+ setErrorOnWorkflow(true);
+ return;
+ }
+
+ if (xmlBank.getWorkflowInfoRelease() != null)
+ getProject().setProperty(BiomajConst.remoteReleaseDynamicProperty,
+ xmlBank.getWorkflowInfoRelease());
+ if (xmlBank.getWorkflowInfoRemovedRelease() != null)
+ getProject().setProperty(BiomajConst.removedReleaseProperty,
+ xmlBank.getWorkflowInfoRemovedRelease());
+ // Dynamics properties
+
+ /*
+ * if (blh==null) blh = new BiomajListenerHandler();
+ */
+
+ try {
+ listenerHandler = new BiomajProcessListenerHandler(xmlBank);
+ if (metaProc != null) {
+ metaProc.setBlock(block);
+ listenerHandler.setMetaProcess(metaProc);
+ }
+
+ if (BiomajLogger.getInstance().getLogger(biomajBank.getDbName()) != null) {
+ String directory = BiomajLogger.getInstance().getLogger(biomajBank.getDbName()).getNameDirectory();
+ SimpleLoggerHistoric slh ;
+
+ if (metaProc == null) { // This is not supposed to happen with current code (tested in run()).
+ String nameFile = block+".log";
+ if (block.isEmpty())
+ nameFile = "defaultBlock"+nameFile;
+ slh = BiomajLogger.getInstance().initLogger(biomajBank.getDbName()+"Block:"+block,directory, nameFile );
+ }
+ else
+ {
+ String nameFile = metaProc.getName()+".log";
+ if (!block.isEmpty())
+ nameFile = block+"."+nameFile;
+ slh = BiomajLogger.getInstance().initLogger(biomajBank.getDbName()+"Block:"+block+"."+metaProc.getName(),directory, nameFile );
+ getProject().log("name meta :"+metaProc.getName(),Project.MSG_VERBOSE);
+ }
+
+ getProject().log("Log name directory:"+directory,Project.MSG_VERBOSE);
+ if (slh != null)
+ {
+ slh.setNameDirectory(directory);
+ getProject().addBuildListener(slh);
+ }
+ }
+ getProject().addBuildListener(listenerHandler);
+ } catch (BiomajException e) {
+ setErrorOnWorkflow(true);
+ return;
+ }
+
+ getProject().setProperty("type_process", typeProcessName);
+
+ int valueConsole = BiomajConsoleLogger.POST;
+ if (typeProcessName.compareTo(BiomajConst.preprocessTarget)==0)
+ valueConsole = BiomajConsoleLogger.PRE;
+ else if (typeProcessName.compareTo(BiomajConst.removeprocessTarget)==0)
+ valueConsole = BiomajConsoleLogger.REMOVE;
+ // Console logger
+ // DefaultLogger consoleLogger = new DefaultLogger();
+
+ if (withConsole) {
+ // level = Project.MSG_DEBUG;
+ BiomajConsoleLogger console = null;
+ if (metaProc != null)
+ console = new BiomajConsoleLogger(biomajBank.getDbName() + "-" + block +":"
+ + metaProc.getName(), this,valueConsole);
+ else
+ console = new BiomajConsoleLogger(biomajBank.getDbName()+ "-" + block +":", this,valueConsole);
+
+ (console)
+ .setMessageOutputLevel(Project.MSG_INFO);
+ getProject().addBuildListener(console);
+ }
+ bProject.start();
+ setErrorOnWorkflow(false);
+ }
+
+ @Override
+ public void run() {
+ if (metaProc == null) {
+ getProject().log("Unexpected undefined metaprocess for block:["
+ + block + "]", Project.MSG_INFO);
+ setErrorOnWorkflow(true);
+ release();
+ return;
+ }
+
+ if ((listProcessToLaunched == null)
+ || (listProcessToLaunched.trim().compareTo("") == 0)) {
+ getProject().log("No process needs to be launched for MetaProcess:["
+ + metaProc.getName() + "]", Project.MSG_INFO);
+ setErrorOnWorkflow(false);
+ release();
+ return;
+ }
+ initProcess();
+
+ getProject().log("#===================================#", Project.MSG_INFO);
+ getProject().log("BLOCK :" + block, Project.MSG_INFO);
+ getProject().log("[MetaProcess]", Project.MSG_INFO);
+ getProject().log("NAME :" + metaProc.getName(), Project.MSG_INFO);
+ getProject().log("PROCESS LIST :" + getProject().getProperty(metaProc.getName()), Project.MSG_INFO);
+ getProject().log("TO EXECUTE :" + getListProcessToLaunched(), Project.MSG_INFO);
+ getProject().log("#===================================#", Project.MSG_INFO);
+ getProject().log("", Project.MSG_INFO);
+ getProject().log("", Project.MSG_INFO);
+
+ if (isErrorOnWorkflow()) {
+ getProject().log("Can't instanciate BiomajListenerHandler for:"
+ + metaProc.getName(), Project.MSG_ERR);
+ setErrorOnWorkflow(true);
+ release();
+ return;
+ }
+
+ if (!biomajBank.getPropertiesFromBankFile().containsKey(
+ metaProc.getName())) {
+ getProject().log("Meta process not defined : " + metaProc.getName(),
+ Project.MSG_ERR);
+ setErrorOnWorkflow(true);
+ release();
+ return;
+ // throw new
+ // BiomajException("postprocess.define.process.fail",idListProcessSeq);
+ }
+ // getProject().setProperty("list_process_seq",
+ // biomajBank.getPropertiesFromBankFile().getProperty(metaProc.getName()));
+ getProject().setProperty("list_process_seq", listProcessToLaunched);
+ getProject().setProperty("metaprocess", metaProc.getName());
+ boolean error = false;
+ try {
+ setEnvironmentFilesList();
+ launchWithTarget();
+ }
+ catch (BuildException be) {
+ error = true;
+ getProject().fireBuildFinished(be);
+ setErrorOnWorkflow(true);
+ try {
+ listenerHandler.setErrorOnCurrentProcess();
+ } catch (BiomajException bbe) {
+ getProject().log("Can't set error on current process.",
+ Project.MSG_ERR);
+ }
+ // Pour l instant quand un process retourne une erreur on arrete le
+ // metaprocess
+ if (true) {
+ // Erreur globale non gerer
+ release();
+ return;
+ }/* else {
+ getProject().log("Keep others processes....", Project.MSG_ERR);
+ }*/
+ }
+ if (!error) {
+ getProject().log("No error detected on subprocesses....ok",
+ Project.MSG_INFO);
+ setErrorOnWorkflow(false);
+ }
+ deleteVolatilesFiles();
+ getProject().fireBuildFinished(null);
+ release();
+ }
+
+ public void setMetaProcess(MetaProcess mp) {
+ metaProc = mp;
+ }
+
+ /**
+ * @param block the block to set
+ * @uml.property name="block"
+ */
+ public void setBlock(String block) {
+ this.block = block;
+ }
+
+ protected void launchWithTarget() throws BiomajBuildException,
+ BuildException {
+ getProject().executeTarget("execute_process_sequentialy");
+ }
+
+ /**
+ * @return the project
+ * @uml.property name="project"
+ */
+ public Project getProject() {
+ return bProject.getProject();
+ }
+
+ public String getProperty(String key) {
+ return bProject.getProperty(key);
+ }
+
+ public void setProperty(String key,String value) {
+ bProject.setProperty(key, value);
+ }
+
+
+ public static String getXmlFileInfoPostProcess(Bank b, String block, String metaProcess) {
+ String preName = "";
+ if ((block!=null)&&(block.trim().compareTo("")!=0))
+ {
+ preName = block+".";
+ }
+
+ return preName+ metaProcess + "."
+ + Long.toString(b.getCurrentSession().getStart().getTime())
+ + ".xml";
+ }
+
+ /**
+ * @return the listProcessToLaunched
+ * @uml.property name="listProcessToLaunched"
+ */
+ public String getListProcessToLaunched() {
+ return listProcessToLaunched;
+ }
+
+ /**
+ * @param listProcessToLaunched
+ * the listProcessToLaunched to set
+ * @uml.property name="listProcessToLaunched"
+ */
+ public void setListProcessToLaunch(String listProcessToLaunched) {
+ this.listProcessToLaunched = listProcessToLaunched;
+ }
+
+ public void deleteVolatilesFiles() {
+ getProject().log("", Project.MSG_INFO);
+ getProject().log("", Project.MSG_INFO);
+ getProject().log("#===================================#", Project.MSG_INFO);
+ getProject().log("End MetaProcess:" + metaProc.getName(), Project.MSG_INFO);
+ getProject().log("delete volatile files:", Project.MSG_INFO);
+ Vector<BiomajProcess> lp = this.metaProc.getListProcess();
+ int count = 0;
+ for (BiomajProcess bp : lp) {
+ Vector<FileDesc> lfd = bp.getDependancesOutput();
+
+ for (FileDesc fd : lfd) {
+ if (fd.isVolatil()) {
+ File f = new File(fd.getLocation());
+ if (f.exists()) {
+ if (!f.delete())
+ getProject().log("Biomaj can't delete volatile file:["
+ + fd.getLocation() + "]", Project.MSG_WARN);
+ else {
+ getProject().log("Biomaj delete volatile file:["
+ + fd.getLocation() + "]", Project.MSG_INFO);
+ count++;
+ }
+ } else {
+ getProject().log("Volatile file does not existe:["
+ + fd.getLocation() + "]", Project.MSG_WARN);
+ }
+ }
+ }
+
+ }
+ getProject().log(Integer.toString(count) + " file(s) deleted.",
+ Project.MSG_INFO);
+ getProject().log("", Project.MSG_INFO);
+ getProject().log("#=======================#", Project.MSG_INFO);
+ getProject().log("METAPROCESS FINISHED", Project.MSG_INFO);
+ getProject().log("#=======================#", Project.MSG_INFO);
+ }
+
+ public void setModeConsole(boolean value) {
+ withConsole = value;
+ }
+
+ private void setEnvironmentFilesList() throws BiomajBuildException {
+ //Ajout de la liste complete des fichier contenu par la nouvelle release
+
+ if (getProject().getProperties().containsKey(BiomajConst.listFilesAvailable)&&(Boolean.valueOf(getProject().getProperty(BiomajConst.listFilesAvailable)))) {
+ try {
+ getProject().setProperty(BiomajConst.listFilesAvailable, Boolean.toString(true));
+ int count = 0;
+ //getProject().log("download:"+xmlBank.getNbFilesDownloaded(),Project.MSG_WARN);
+ //getProject().log("offline:"+xmlBank.getNbFilesLocalOffline(),Project.MSG_WARN);
+ //getProject().log("online:"+xmlBank.getNbFilesLocalOnline(),Project.MSG_WARN);
+ float size = xmlBank.getNbFilesDownloaded() + xmlBank.getNbFilesLocalOnline();
+ getProject().log("total:"+size,Project.MSG_VERBOSE);
+ String file = getProperty(BiomajConst.runtimeDirectoryProperty)+"/"+getProperty(BiomajConst.dbNameProperty)+".remote.filelist" ;
+
+ //log("Complete file list:"+file,Project.MSG_ERR);
+ BufferedReader listingFile = new BufferedReader(new FileReader(new File(file)));
+ String line= null ;
+ String resultAllDownloadedFiles = "";
+ String resultAllFilesExtracted = "";
+
+ String filtreOfflineDir = new File(getProperty(BiomajConst.dataDirProperty)+"/"+getProperty(BiomajConst.offlineDirProperty)).getAbsolutePath()+"/";
+ Bank bank = BiomajSession.getInstance().getBank(getProperty(BiomajConst.dbNameProperty)) ;
+
+ while ((line = listingFile.readLine()) != null) {
+ float a = (++count/ size)*100;
+ getProject().log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ RemoteFile rf = new RemoteFile(line);
+ resultAllDownloadedFiles = resultAllDownloadedFiles + rf.getAbsolutePath() + " ";
+
+ if (bank!=null) {
+ Vector<FileDesc> lfiles = bank.getGeneratedFiles(getProject(), rf);
+ for (FileDesc f : lfiles) {
+ resultAllFilesExtracted = resultAllFilesExtracted + f.getLocation().replace(filtreOfflineDir, "") + " "; }
+ }
+ }
+ listingFile.close();
+
+ getProject().log("result Zipped Total :"+resultAllDownloadedFiles,Project.MSG_VERBOSE);
+ getProject().log("result Unzipped Total :"+resultAllFilesExtracted,Project.MSG_VERBOSE);
+
+
+ getProject().setProperty(BmajExecute.RELEASE_ALL_COMPRESSED_FILES_LIST,resultAllDownloadedFiles);
+
+ //Attention ca fonctionne seulement si log.files=true dans le workflow !
+
+ getProject().setProperty(BmajExecute.RELEASE_ALL_UNCOMPRESSED_FILES_LIST,resultAllFilesExtracted);
+
+ file = getProperty(BiomajConst.runtimeDirectoryProperty)+"/"+getProperty(BiomajConst.dbNameProperty)+".copy.filelist" ;
+ //log("Copy file list:"+file,Project.MSG_ERR);
+ listingFile = new BufferedReader(new FileReader(new File(file)));
+ line = null ;
+ String resultCopy = "";
+
+ count = 0;
+ size = xmlBank.getNbFilesLocalOnline();
+
+ while ((line = listingFile.readLine()) != null) {
+ float a = (++count/ size)*100;
+ getProject().log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ if (!line.startsWith("#PLA"))
+ resultCopy = resultCopy + line + " ";
+ }
+ listingFile.close();
+
+ getProject().log("result Copy :"+resultCopy,Project.MSG_VERBOSE);
+
+ getProject().setProperty(BmajExecute.RELEASE_OLD_FILES_LIST,resultCopy);
+
+ String[] lCopy = resultCopy.split("\\s");
+ String[] lTotal = resultAllFilesExtracted.split("\\s");
+ String resultDelta = "";
+ count = 0;
+ size = lTotal.length;
+ for (String f : lTotal) {
+ float a = (++count/ size)*100;
+ getProject().log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ boolean isDownload = true;
+ for (String oldFile : lCopy) {
+ if (f.trim().compareTo(oldFile.trim())==0){
+ isDownload = false;
+ break;
+ }
+ }
+ if (isDownload)
+ {
+ resultDelta = resultDelta + f +" ";
+ }
+ }
+
+ getProject().log("result delta:"+resultDelta,Project.MSG_VERBOSE);
+ getProject().setProperty(BmajExecute.RELEASE_NEW_FILES_LIST,resultDelta);
+
+ } catch (Exception pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+
+ } else {
+ getProject().log("Environment variables ["+BmajExecute.RELEASE_ALL_COMPRESSED_FILES_LIST+","+
+ BmajExecute.RELEASE_ALL_UNCOMPRESSED_FILES_LIST+","+BmajExecute.RELEASE_NEW_FILES_LIST+","+
+ BmajExecute.RELEASE_OLD_FILES_LIST+"] are not initialized. ["+BiomajConst.listFilesAvailable+"=false]",Project.MSG_INFO);
+ }
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/RemoteBankWorkflowEngine.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/RemoteBankWorkflowEngine.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/RemoteBankWorkflowEngine.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,1407 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.concurrent.Semaphore;
+import javax.mail.Address;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.SendFailedException;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.logger.BiomajMirrorListenerHandler;
+import org.inria.biomaj.ant.logger.SimpleLoggerHistoric;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.session.bank.ProductionDirectory;
+import org.inria.biomaj.session.bank.Session;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.DecisionWorkflowPostProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+public class RemoteBankWorkflowEngine extends WorkflowEngine {
+ /** Nbre de gestion maximum de bank */
+ private static int max_connexion_remote = -1;
+
+ private static Semaphore nbConnexion ;
+
+ /**
+ * @uml.property name="blh"
+ * @uml.associationEnd
+ */
+ private BiomajMirrorListenerHandler blh = null;
+
+ //sous process qui contient une liste de process a executer sequentiellement
+ /**
+ * @uml.property name="idListProcessSeq"
+ */
+ private String idListProcessSeq ;
+
+
+ /**
+ * @uml.property name="bProject"
+ * @uml.associationEnd
+ */
+ private BiomajAntProject bProject = null ;
+ /**
+ * @uml.property name="console"
+ * @uml.associationEnd
+ */
+ private BuildListener console = null;
+
+ /**
+ * @uml.property name="level"
+ */
+ private int level = Project.MSG_INFO;
+
+ /**
+ * @uml.property name="withConsole"
+ */
+ private boolean withConsole = true;
+
+ /**
+ * metaprocess name for subtask
+ * @uml.property name="metaProcessName"
+ */
+ private String metaProcessName = null ;
+
+ /**
+ * Type process (post or pre) for subtask
+ * @uml.property name="typeProcessName"
+ */
+
+ private String typeProcessName = null ;
+
+ /**
+ * @uml.property name="modeForProcesses"
+ */
+ private int modeForProcesses = DecisionWorkflowPostProcess.MODE_VERIF;
+ /**
+ * @uml.property name="bank"
+ * @uml.associationEnd
+ */
+ private Bank bank;
+
+// private boolean tmpMove = false;
+
+ public RemoteBankWorkflowEngine(BiomajBank bank) throws BiomajException {
+ super(bank);
+ if (max_connexion_remote == -1) {
+ loadMaxConnexion();
+ nbConnexion = new Semaphore(max_connexion_remote);
+ }
+ }
+
+ protected void initWorkflow() throws BiomajException {
+ super.initWorkflow();
+
+ bProject = new BiomajAntProject();
+ Properties props = getBiomajBank().getPropertiesFromBankFile();
+ props.put("fromScratch", String.valueOf(isFromScratch()));
+
+ bProject.init(BiomajConst.mirrorXmlFile, props);
+
+ SimpleLoggerHistoric slh = BiomajLogger.getInstance().initLogger(getBiomajBank().getDbName(), "mirror.log");
+ if (slh != null)
+ bProject.addBuildListener(slh);
+
+ blh = new BiomajMirrorListenerHandler();
+ bProject.addBuildListener(blh);
+ //}
+
+ if (withConsole)
+ initConsoleLogger();
+
+ /*
+ * Verifie que ces proprietes n ont pas ete modifier par rapport aux derniers repertoire de prod !
+ * Si modificiation, il faut proposer a l utilisateur d'executer l'option --move pour exporter l ensemble des repertoires de version !
+ */
+ checkVersionDirectory();
+
+
+ /* Verifie l'existence des repertoire de production */
+ checkProductionDirectory();
+
+ /*
+ * If the workflow is launched with a stop point,set a propety to informe listener to load the last session
+ */
+ setProperty(BiomajConst.newUpdateProperty, Boolean.toString(isForceForANewUpdate() || isFromScratch()));
+
+
+ if (isFromScratch()) {
+ modeForProcesses = DecisionWorkflowPostProcess.MODE_NEW_RELEASE;
+ } else if (isForceForANewUpdate()) {
+ modeForProcesses = DecisionWorkflowPostProcess.MODE_NEW_RELEASE;
+ File offline = new File(getProperty(BiomajConst.dataDirProperty)+ "/" + getProperty(BiomajConst.offlineDirProperty));
+ File flat = new File(getProperty(BiomajConst.dataDirProperty)+ "/" + getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.futureReleaseLink+"/flat");
+ try {
+ BiomajUtils.moveAllFilesToDirectory(flat,offline);
+ flat.delete();
+ } catch (IOException ioe) {
+ throw new BiomajException(ioe);
+ }
+ }
+ bProject.start();
+ printInformation();
+
+ //Le projet est initialiser, on peut recuperer les donnees (Chargement des anciennes sessions)
+ // if (blh!=null) {
+ bank = BiomajSession.getInstance().getBank(this.getBiomajBank().getDbName());
+ if ((getCommand()!=WorkflowEngine.TARGET_ALL)&&(getCommand()!=WorkflowEngine.TARGET_REBUILD)) {
+ printInformationLastUpdate();
+ }
+ //}
+
+ }
+
+ public Bank getBank() {
+ return bank;
+ }
+
+ public boolean getModeConsole() {
+ return withConsole;
+ }
+
+ @Override
+ public void setModeConsole(boolean withConsole, int mode) {
+ this.withConsole = withConsole;
+ this.level = mode ;
+ }
+
+ protected void endWorkflow() throws BiomajException {
+ super.endWorkflow();
+ sendMessage(getMessageHeader(true),getMessage());
+ bProject.getProject().fireBuildFinished(null);
+ treatEnd();
+ }
+
+
+ @Override
+ protected void endWithErrorWorkflow(Exception e) throws BiomajException {
+ super.endWithErrorWorkflow(e);
+ sendMessage(getMessageHeader(false),getMessage());
+ if (bank != null) {
+ bank.setErrorOnWorkflow(true);
+
+ }
+ bProject.getProject().fireBuildFinished(e);
+ treatEnd();
+ }
+
+ protected void treatEnd() throws BiomajException{
+ if (isWorkWithCurrentDirectory()) {
+ File futur_rel = new File(getProperty(BiomajConst.dataDirProperty)+ "/" + getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.futureReleaseLink);
+ futur_rel.delete();
+ }
+
+ // Si on a des fichier à redeplacer dans leur repertoire d'origine dans le cas d'une execution fromscratch
+ /*
+ if (tmpMove) {
+ Vector<ProductionDirectory> dirs = bank.getBankStateListProductionDirectories();
+ String releasePath = dirs.get(dirs.size() - 2).getPath();
+
+ File flatDir = new File(releasePath +"/flat");
+ File tmpDir = new File(releasePath + "/" + BiomajConst.tmpMoveDir);
+ try {
+ BiomajUtils.moveAllFilesToDirectory(tmpDir, flatDir);
+ } catch (IOException ex) {
+ throw new BiomajException(ex);
+ }
+ tmpDir.delete();
+ }*/
+ }
+
+ protected void launchWithTarget(String target) throws BiomajException {
+
+ setProperty("task", target);
+
+ //log("External task:"+getProperty("task"),Project.MSG_WARN);
+
+ try {
+ bProject.getProject().executeTarget("workflow_control");
+ } catch (Exception e) {
+ bProject.getProject().log(e.getStackTrace().toString(),Project.MSG_DEBUG);
+ throw new BiomajException(e);
+ }
+
+ String stop = getProperty("stop.workflow");
+ if ((stop != null)&&(stop.compareTo("true")==0))
+ {
+ killApplication() ;
+ }
+ }
+
+
+
+ @Override
+ public Vector<WorkflowEngine> getChild() {
+ return new Vector<WorkflowEngine>();
+ }
+
+ /*
+ * O.FIlangi deprecated methode from class Thread
+ public void destroy() {
+ project.removeBuildListener(console);
+ }
+ */
+ @Override
+ protected void runAll() throws BiomajException {
+// no test for an existing session, this start a new session!
+ checkFrequency();
+ runPreProcess();
+ runMirror();
+ runMakeProduction();
+ runPostProcess();
+ runDeployment();
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+ @Override
+ protected void runUntilDeployment() throws BiomajException {
+ checkFrequency();
+ runPreProcess();
+ runMirror();
+ runMakeProduction();
+ runPostProcess();
+ runDeployment();
+ removeAllBlockProcess();
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+ /**
+ *
+ * run pre-process workflow
+ */
+ protected void runUntilPreProcess() throws BiomajException{
+ checkFrequency();
+ runPreProcess();
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+ /**
+ * run mirror workflow
+ */
+ protected void runUntilMirror() throws BiomajException {
+ checkFrequency();
+ runPreProcess();
+ runMirror() ;
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+
+ /**
+ */
+ protected void runUntilMakeProduction() throws BiomajException {
+ checkFrequency();
+ runPreProcess();
+ runMirror() ;
+ runMakeProduction() ;
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+
+ /**
+ * run Post-Process Workflow
+ */
+ protected void runUntilPostProcess() throws BiomajException {
+ checkFrequency();
+ runPreProcess();
+ runMirror() ;
+ runMakeProduction() ;
+ runPostProcess();
+ runDeleteOldVersion();
+ writeEnd();
+ }
+
+ @Override
+ protected void runRebuild() throws BiomajException {
+
+ writeBeginStag("REBUILD");
+ //test sur le rebuild !
+ if (!linkFuturReleaseExist()) {
+ List<ProductionDirectory> lpd = BiomajSQLQuerier.getAvailableProductionDirectories(getBiomajBank().getDbName());
+
+ if (lpd.size() > 0) {
+ //throw new BiomajException("error.rebuild.nofind.version");
+
+ //dans un premier temps on reconstruit seulement la derniere version
+ ProductionDirectory pd = lpd.get(lpd.size()-1);
+
+ Bank b = new Bank();
+ if (!BiomajSQLQuerier.getUpdateBank(getBiomajBank().getDbName(), pd.getSession(), b, true))
+ throw new BiomajException("error.rebuild.nofind.updatebank.with.prod.version");
+
+ Map<String, String> info = BiomajSQLQuerier.getBankInfo(getBiomajBank().getDbName());
+ if (info == null)
+ throw new BiomajException("error.rebuild.nofind.configuration.with.prod.version");
+
+ Configuration config = new Configuration(info);
+ b.setBankStateListProductionDirectories(BiomajSQLQuerier.getAllProductionDirectories(getBiomajBank().getDbName()));
+
+ b.setConfig(config);
+ bank.setBankToRebuild(b);
+ deleteDependances();
+ launchWithTarget("action_rebuild");
+ runPostProcess();
+ runDeployment();
+ runDeleteOldVersion();
+ writeEnd();
+ return ;
+ }
+ }
+
+ throw new BiomajException("error.rebuild.execute");
+ }
+
+ private void deleteDependances() throws BiomajException {
+ String[] process = getListProcessToRebuild();
+ String[] metas = getListMetaProcessToRebuild();
+ String[] blocks = getListBlockProcessToRebuild();
+
+ if (process == null) {
+ process = new String[0] ;
+ }
+ if (metas == null) {
+ metas = new String[0] ;
+ }
+
+ if (blocks == null) {
+ blocks = new String[0] ;
+ }
+
+ if (( blocks.length != 0)||(metas.length != 0)||( process.length != 0) ) {
+ Vector<MetaProcess> mps = bank.getAllMetaprocess();
+ //log("List of all MetaOP:"+mps.size(),Project.MSG_WARN);
+ for (MetaProcess mp : mps) {
+ boolean metaProcessIsDeleted = false ;
+ if (blocks.length != 0) {
+ for (String bl : blocks) {
+ if (!metaProcessIsDeleted && mp.getBlock().compareTo(bl.trim())==0) {
+ log("deleting dependances from BLOCK:"+bl,Project.MSG_WARN);
+ //effacement des deps
+ for (BiomajProcess bp : mp.getListProcess()) {
+ for (FileDesc fd : bp.getDependancesOutput()) {
+ deleteFile(fd);
+ }
+ }
+ metaProcessIsDeleted = true;
+ }
+ }
+ }
+ if (!metaProcessIsDeleted&&(metas.length != 0)) {
+ for (String meta : metas) {
+ if (meta.trim().compareTo(mp.getName())==0) {
+ log("Deleting dependances from METAPROC:"+meta,Project.MSG_WARN);
+ //effacement des deps
+ for (BiomajProcess bp : mp.getListProcess()) {
+ for (FileDesc fd : bp.getDependancesOutput()) {
+ deleteFile(fd);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (process.length != 0) {
+ Vector<BiomajProcess> bps = new Vector<BiomajProcess>();
+ for (MetaProcess mp : mps)
+ bps.addAll(mp.getListProcess());
+
+ for (BiomajProcess bp : bps) {
+ for (String proc : process)
+ if (bp.getKeyName().compareTo(proc) == 0) {
+ log("Deleting dependances from PROCESS:"+proc,Project.MSG_WARN);
+ for (FileDesc fd : bp.getDependancesOutput()) {
+ deleteFile(fd);
+ }
+
+ }
+ }
+ }
+
+ } else {
+ log("Aucun process n as besoin d effacement",Project.MSG_WARN);
+ }
+ }
+
+ private void deleteFile(FileDesc fd) {
+ //System.out.println(Boolean.toString(fd.isLink()));
+ log("delete:"+fd.getLocation(),Project.MSG_INFO);
+ new File(fd.getLocation()).delete();
+ }
+
+ private boolean checkFrequency() throws BiomajException {
+
+ if (bank.workflowTaskEverPast(Session.PREPROCESS)) {
+ log("Check frequency is ok....",Project.MSG_INFO);
+ return true;
+ }
+ writeBeginStag("FREQUENCY UPDATE");
+ launchWithTarget("action_frequency");
+
+ boolean val = Boolean.valueOf(getProperty("frequency.ok"));
+
+ if (val)
+ launchWithTarget("action_clean_log");
+ else
+ killApplication();
+
+ return val;
+ }
+
+
+ protected void runPreProcess() throws BiomajException {
+ if (bank.workflowTaskEverPast(Session.PREPROCESS)) {
+ log("Preprocess is ok....",Project.MSG_INFO);
+ return ;
+ }
+
+ writeBeginStag("PRE-PROCESS");
+
+ setProperty("type_process", BiomajConst.preprocessTarget);
+ runProcessesWithProperty(BiomajConst.dbPreProcessProperty,"");
+ if (blh!=null)
+ {
+ blh.finishedPreProcess(getProject());
+ }
+ }
+
+ protected void runMirror() throws BiomajException {
+ if (bank.workflowTaskEverPast(Session.COPY)) {
+ log("Mirror is ok....",Project.MSG_INFO);
+ log("load last release...:"+bank.getWorkflowInfoRelease(),Project.MSG_INFO);
+ setProperty(BiomajConst.remoteReleaseDynamicProperty, bank.getWorkflowInfoRelease());
+ return ;
+ }
+ writeBeginStag("SYNCHRONIZATION");
+ launchMirror();
+ }
+
+ private synchronized void launchMirror() throws BiomajException {
+ {
+ try {
+ log("Wait to download... available connections remaining : "+nbConnexion.availablePermits(),Project.MSG_VERBOSE);
+ nbConnexion.acquire();
+ } catch (InterruptedException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ try {
+ launchWithTarget("action_mirror");
+ } catch (Exception e) {
+ throw new BiomajException(e);
+ } finally {
+ nbConnexion.release();
+ }
+ }
+ }
+
+ /**
+ */
+ protected void runMakeProduction() throws BiomajException {
+ if (bank.workflowTaskEverPast(Session.MOVE)) {
+ log("Make directory production is ok....",Project.MSG_INFO);
+
+ if (!linkFuturReleaseExist())
+ {
+ log("no link futur exist !:"+bank.getWorkflowInfoProductionDir(),Project.MSG_VERBOSE);
+ return;
+ }
+
+ if (bank.getWorkflowInfoProductionDir()==null)
+ throw new BiomajException("workflowengine.makeproduction.error");
+
+ log("load last online directory...:"+bank.getWorkflowInfoProductionDir(),Project.MSG_INFO);
+ setProperty(BiomajConst.onlineDirDynamicProperty, bank.getWorkflowInfoProductionDir());
+ return ;
+ }
+ launchWithTarget("action_move");
+ //Si une nouvelle version est charge on ne prend pas en compte les ancien process...
+ if (Boolean.valueOf(getProperty(BiomajConst.offlineHasFilesDynamicProperty)))
+ modeForProcesses = DecisionWorkflowPostProcess.MODE_NEW_RELEASE;
+ else
+ modeForProcesses = DecisionWorkflowPostProcess.MODE_VERIF;
+ }
+
+ protected void runPostProcess() throws BiomajException {
+
+ if (!linkFuturReleaseExist())
+ {
+ removeAllBlockProcess();
+ return;
+ }
+
+ if (!isWorkWithCurrentDirectory()&&bank.workflowTaskEverPast(Session.POSTPROCESS)) {
+ log("post process is ok....",Project.MSG_INFO);
+ removeAllBlockProcess();
+ return ;
+ }
+
+ writeBeginStag("POST-PROCESS");
+
+ setProperty("type_process", BiomajConst.postprocessTarget);
+
+ /** Gestion des blocks depuis la 0.9.2.x : on garde la compatibilité avec les anciennes version si la
+ * propriété BLOCK n est pas définie !*/
+
+ boolean processLaunched = false;
+ if ((!getProject().getProperties().containsKey(BiomajConst.blockPostprocessProperty))||
+ (getProject().getProperty(BiomajConst.blockPostprocessProperty).trim().compareTo("")==0))
+ processLaunched = runProcessesWithProperty(BiomajConst.dbPostProcessProperty,"");
+ else {
+ processLaunched = executeBlockSequentially(BiomajConst.dbPostProcessProperty,getProject().getProperty(BiomajConst.blockPostprocessProperty));
+ }
+
+ if (blh != null)
+ blh.finishedPostProcess(getProject(), processLaunched);
+ }
+
+
+ public void runPostProcess(String listBlock) throws BiomajException {
+
+ if (!linkFuturReleaseExist())
+ return;
+
+ writeBeginStag("POST-PROCESS");
+
+ setProperty("type_process", BiomajConst.postprocessTarget);
+
+ boolean res = executeBlockSequentially(BiomajConst.dbPostProcessProperty,listBlock);
+
+ if (blh != null)
+ blh.finishedPostProcess(getProject(), res);
+
+
+ }
+
+ public void runOnlyRemoveProcess() throws BiomajException {
+ Vector<String> versions = getVersionToRemove();
+ for (String version : versions) {
+ runRemoveProcess(version);
+ }
+ writeEnd();
+ }
+
+ public void runRemoveProcess(String version) throws BiomajException {
+ try {
+ // Don't check if it has already been done. We may want to launch several times the remove processes.
+ // (if deleting several old versions for example)
+ // Note that in this case, the log and statefile corresponding to the remove process (statefiles/bankname/METAPROCESS.id.xml and log/bankname/time/METAPROCESS.log)
+ // will be the ones from the last execution. Previous ones are overwritten everytime a removeprocess is launched.
+
+ writeBeginStag("REMOVE-PROCESS");
+ bank.setRemove(true);
+
+ bank.setWorkflowInfoRemovedRelease(version);
+ setProperty("type_process", BiomajConst.removeprocessTarget);
+
+ runProcessesWithProperty(BiomajConst.dbRemoveProcessProperty,"");
+
+ if (blh!=null)
+ {
+ blh.finishedRemoveProcess(getProject());
+ }
+ }
+ catch (Exception e) {
+ // Get the log file path
+ String log ="";
+ if (bank != null) {
+ log = bank.getLogFile() ;
+ } else {
+ log = BiomajLogger.getInstance().getFileNameGeneralLog();
+ }
+
+ log("\n--There was a problem during remove process execution. See the log ["+log+"] for more details.", Project.MSG_WARN);
+ bank.setRemoveOk(false);
+ }
+ // Next line because we called createWorkflow before getting there. We have to be sure to remove EVERY reference to the same WE (1 call to createWorkflow = 1 reference).
+ WorkflowEngine.removeWE(getBiomajBank().getDbName());
+ }
+
+
+ protected void runDeployment() throws BiomajException {
+
+ if (!linkFuturReleaseExist())
+ return;
+
+ if (bank.workflowTaskEverPast(Session.DEPLOYMENT)) {
+ log("Deployement is ok....",Project.MSG_INFO);
+ return ;
+ }
+
+ writeBeginStag("DEPLOYMENT");
+ File f = new File(getProject().getProperty(BiomajConst.dataDirProperty)+"/"+getProject().getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.futureReleaseLink);
+
+ if (f.exists()) {
+ try {
+ setProperty(BiomajConst.onlineDirDynamicProperty, f.getCanonicalPath());
+ launchWithTarget("action_deployment");
+ writeEndDeploy();
+ } catch (IOException ioe) {
+ throw new BiomajException("error.futur.release.not.exist",ioe);
+ }
+ }
+
+ if (getCommand()==WorkflowEngine.TARGET_DEPLOY) {
+ // When runDeployment is called directly, old versions are not deleted affter deploying the new one. So force it here.
+ runDeleteOldVersion();
+ }
+ }
+
+ /**
+ * run a Block definition
+ *
+ * @since 0.9.2 evolution with block term
+ * @param property
+ * @throws BuildException
+ * @throws BiomajException
+ *
+ * @return true if at least one process has been launched, false otherwise
+ */
+ private boolean runProcessesWithProperty(String property,String block) throws BuildException, BiomajException {
+
+ boolean postProcess = false;
+ boolean launched = false;
+
+ log(BiomajUtils.dateToString(new Date(), Locale.US)+" ["+getBiomajBank().getDbName()+"]["+block+"]",Project.MSG_DEBUG);
+
+ if (BiomajConst.dbPostProcessProperty.compareTo(property)==0)
+ postProcess = true;
+ else
+ postProcess = false;
+
+ boolean conditionToProcess = false;
+ String blockProperty = property;
+
+ if ((block != null) && (block.trim().compareTo("")!=0))
+ blockProperty = block + "." + property;
+ else
+ block = "";
+
+
+ conditionToProcess = getBiomajBank().getPropertiesFromBankFile().containsKey(blockProperty) &&
+ getBiomajBank().getPropertiesFromBankFile().getProperty(blockProperty).trim().compareTo("")!=0;
+
+ if (!conditionToProcess) {
+ if (BiomajConst.dbRemoveProcessProperty.compareTo(property)==0)
+ bank.setRemove(false);
+
+ log("No parallel process defined! ("+property+" not set)", Project.MSG_INFO);
+ if (blh!=null) {
+ if (BiomajConst.dbPostProcessProperty.compareTo(property)==0)
+ blh.startPostProcess(getProject(),"",block);
+ else if (BiomajConst.dbPreProcessProperty.compareTo(property)==0)
+ blh.startPreProcess(getProject(),"");
+ else {
+ blh.startRemoveProcess(getProject(),"", block); // Block is not (yet?) used (not read from properties file)
+ }
+ }
+ return false;
+ }
+
+// On recupere la liste de processus parallele!
+ String list_proc_parallel = getBiomajBank().getPropertiesFromBankFile().getProperty(blockProperty);
+
+ String[] list = list_proc_parallel.split(",");
+
+ if (list.length==0) {
+ if (BiomajConst.dbRemoveProcessProperty.compareTo(property)==0)
+ bank.setRemove(false);
+
+ log("No parallel process defined! ("+blockProperty+" not set)", Project.MSG_INFO);
+ return false;
+ }
+
+ DecisionWorkflowPostProcess dwpp = new DecisionWorkflowPostProcess(block,getBiomajBank().getDbName(),blockProperty,bProject.getProject(),modeForProcesses,postProcess);
+
+ ProcessSequentielHandler[] lThread = new ProcessSequentielHandler[list.length];
+
+ log(list.length+" meta process found",Project.MSG_INFO);
+ log("Process to launch:",Project.MSG_INFO);
+ for (int i=0;i<list.length;i++) {
+ String listProc = dwpp.getListSubProcess(block,list[i]);
+ /*
+ * Correction Bug 26/03 Si pas de process a lance alors pas de xml creer!
+ * Pas d execution de processHandler
+ */
+ if (listProc.trim().compareTo("")==0) {
+ continue;
+ }
+
+ //OFI 08/2007 ver 0.9.2.x
+ //On est dans le cas ou un fichier dependant a ete efface du repertoire du prod
+ //ce qui lance l execution du process attache
+ /*
+ try {
+ if (!linkFuturReleaseExist()&&(linkCurrentReleaseExist())) {
+ if (lpd == null)
+ lpd = BiomajQueryXmlStateFile.getAllDirectoriesProduction(getBiomajBank().getDbName());
+
+ if ((lpd == null)||(lpd.size()<=0))
+ {
+ log("Can't get last production directory",Project.MSG_ERR);
+ throw new BiomajBuildException(getProject(),new Exception("Can't get last production directory"));
+ }
+ String path = lpd.get(lpd.size()-1).getPath();
+ createLinkFuturRelease(path);
+ localWorkWithCurrentDirectory = true;
+ }
+ } catch (ParseException pe) {
+ throw new BiomajBuildException(getProject(),pe);
+ }
+
+ */
+ ProcessSequentielHandler rbew = new ProcessSequentielHandler(getBiomajBank(),bank,getProperty("type_process"));
+ rbew.setBlock(block);
+ rbew.setMetaProcess(dwpp.getMetaProcess(block,list[i]));
+ rbew.setListProcessToLaunch(listProc);
+ log(list[i]+"="+rbew.getListProcessToLaunched(),Project.MSG_INFO);
+ rbew.setModeConsole(getModeConsole());
+ /*
+ * ON NE PEUX PAS PASSER ONLINE DIR CAR
+ * ON PEUT TRAITER LA NOUVELLE RELEASE MAIS AUSSI LA CURRENT.......
+ * PAS DE SENS....
+ if (getProject().getProperty(CitrinaConst.onlineDirDynamicProperty)==null) {
+ log("Devel error: Can't load onlineDirDynamicProperty in RemoteBankWorkflowEngine!",Project.MSG_ERR);
+ killApplication() ;
+ }
+
+ rbew.getProject().setProperty(CitrinaConst.onlineDirDynamicProperty, getProject().getProperty(CitrinaConst.onlineDirDynamicProperty));*/
+
+ lThread[i] = rbew;
+
+ if (blh!=null) {
+ if (BiomajConst.dbPostProcessProperty.compareTo(property)==0)
+ blh.startPostProcess(getProject(),list[i],block);
+ else if (BiomajConst.dbPreProcessProperty.compareTo(property)==0)
+ blh.startPreProcess(getProject(),list[i]);
+ else {
+ blh.startRemoveProcess(getProject(),list[i], block);
+ }
+ }
+ launched = true;
+ rbew.start();
+ }
+ log(list.length+" console(s) are open.",Project.MSG_INFO);
+ for (int i=0;i<lThread.length;i++) {
+ if (lThread[i]!=null)
+ lThread[i].synchr();
+ }
+
+ boolean retour = true;
+
+ for (int i=0;i<lThread.length;i++) {
+ if (lThread[i]==null)
+ continue;
+ while (lThread[i].isErrorOnWorkflow()==null) {}//rien, on attend que cette variable soit initialisee!
+ retour=(!lThread[i].isErrorOnWorkflow())&&retour;
+ }
+
+ /* Toutes les branches obnt executer, on peut arreter l application si il y a eu une erreur */
+ /*----------------------------------------------------------------------------------------------*/
+
+ if (!retour)
+ killApplication();
+ /*
+ if (localWorkWithCurrentDirectory)
+ removelinkFuturRelease();
+ */
+
+ return launched;
+ }
+
+ protected void runSeqListProcess() throws BuildException, BiomajException{
+
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(idListProcessSeq))
+ {
+ log("Meta process not defined : "+idListProcessSeq,Project.MSG_ERR);
+ throw new BiomajException("postprocess.define.process.fail",idListProcessSeq);
+ }
+
+ setProperty("list_process_seq", getBiomajBank().getPropertiesFromBankFile().getProperty(idListProcessSeq));
+ launchWithTarget("action_process");
+ }
+
+ protected void runDeleteOldVersion() throws BiomajException {
+ launchWithTarget("action_delete_version");
+ }
+
+
+ @Override
+ protected void runSubTask() throws BiomajException {
+ runSeqListProcess();
+ }
+
+ protected boolean executeBlockSequentially(String property,String allBlock) throws BiomajException {
+
+ if ((allBlock == null)||(allBlock.trim().compareTo("")==0)) {
+ getProject().log("Dev error:can't execute Block process with empty list![value="+allBlock+"]", Project.MSG_ERR);
+ return false;
+ }
+
+ String[] listBlock = allBlock.split(",");
+ boolean res = false;
+
+ for (String b : listBlock) {
+ getProject().log(" ----> BLOCK:"+b);
+ res = runProcessesWithProperty(property,b);
+ free(b);
+ }
+
+ return res;
+ }
+
+ @Override
+ public void log(String message, int priority) {
+ if ((bProject != null)&&(bProject.getProject()!=null)&&(message!=null)) {
+ //System.out.println("mess:"+message+" prio:"+priority);
+ bProject.getProject().log(message, priority);
+ }
+ else
+ System.out.println(message);
+ }
+
+ public String getProperty(String key) {
+ return bProject.getProperty(key);
+ }
+
+ public void setProperty(String key,String value) {
+ bProject.setProperty(key, value);
+ }
+
+ /**
+ * @return the project
+ * @uml.property name="project"
+ */
+ public Project getProject() {
+ return bProject.getProject();
+ }
+
+ /**
+ * @return the metaProcessName
+ * @uml.property name="metaProcessName"
+ */
+ public String getMetaProcessName() {
+ return metaProcessName;
+ }
+
+ /**
+ * @param metaProcessName the metaProcessName to set
+ * @uml.property name="metaProcessName"
+ */
+ public void setMetaProcessName(String metaProcessName) {
+ this.metaProcessName = metaProcessName;
+ }
+
+ /**
+ * @return the typeProcessName
+ * @uml.property name="typeProcessName"
+ */
+ public String getTypeProcessName() {
+ return typeProcessName;
+ }
+
+ /**
+ * @param typeProcessName the typeProcessName to set
+ * @uml.property name="typeProcessName"
+ */
+ public void setTypeProcessName(String typeProcessName) {
+ this.typeProcessName = typeProcessName;
+ }
+
+ private void killApplication() throws BiomajException {
+ setErrorOnWorkflow(true);
+ String log ="";
+ if (bank != null) {
+ log = bank.getLogFile() ;
+ } else {
+ log = BiomajLogger.getInstance().getFileNameGeneralLog();
+ }
+ throw new BiomajException("kill.application",log);
+ }
+
+ /*
+ * Recupère une liste de process qui a été executée avec succès aux sessions antérieures...
+ * pour une release!
+
+
+ private String[] getProcessesOkForRelease(String metaProcess) {
+
+ }
+ */
+ private void loadMaxConnexion() throws BiomajException {
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.bankNumThreadProperty))
+ throw new BiomajException("citrinautils.error.property",BiomajConst.bankNumThreadProperty);
+ try {
+ max_connexion_remote = Integer.valueOf((String)getBiomajBank().getPropertiesFromBankFile().get(BiomajConst.bankNumThreadProperty));
+ } catch (Exception e) {
+ throw new BiomajException("citrinautils.error.property.value",BiomajConst.bankNumThreadProperty);
+ }
+ }
+
+ public String getBaseProductionDirectory() {
+ String datadir=getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.dataDirProperty);
+ String dirVersion = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.versionDirProperty);
+ return datadir+"/"+dirVersion;
+ }
+
+ public void createLinkFuturRelease(String path) throws BiomajException {
+ try {
+ BiomajUtils.createLinkOnFileSystem(new File(path), BiomajConst.futureReleaseLink);
+ } catch (Exception e) {
+ throw new BiomajException(e);
+ }
+ }
+
+ public boolean linkFuturReleaseExist() {
+ /* Condition pour lancer les post processus : le repertoire future_release exist!*/
+ return new File(getBaseProductionDirectory()+"/"+BiomajConst.futureReleaseLink).exists();
+ }
+
+ public void removelinkFuturRelease() {
+ /* Condition pour lancer les post processus : le repertoire future_release exist!*/
+ new File(getBaseProductionDirectory()+"/"+BiomajConst.futureReleaseLink).delete();
+ }
+
+ public boolean linkCurrentReleaseExist() {
+ return new File(getBaseProductionDirectory()+"/"+BiomajConst.currentLink).exists();
+ }
+
+ private void printInformation() {
+ log("#==========================================#",Project.MSG_INFO);
+ log("FULL NAME :"+getProperty(BiomajConst.dbFullNameProperty),Project.MSG_INFO);
+ log("NAME :"+getProperty(BiomajConst.dbNameProperty),Project.MSG_INFO);
+ String url = getProperty(BiomajConst.protocolProperty) ;
+ if (getProperty(BiomajConst.serverProperty) != null)
+ url += "://"+getProperty(BiomajConst.serverProperty)+":" ;
+
+ if (getProperty(BiomajConst.remoteDirProperty) != null)
+ url += getProperty(BiomajConst.remoteDirProperty);
+ //else if (getProperty(BiomajConst.flatRepositoryProperty) != null)
+ //url += getProperty(BiomajConst.flatRepositoryProperty);
+
+ log("URL :"+url+".",Project.MSG_INFO);
+ log("#==========================================#",Project.MSG_INFO);
+ log("",Project.MSG_INFO);
+ log("",Project.MSG_INFO);
+ log("",Project.MSG_INFO);
+ log("",Project.MSG_INFO);
+ }
+
+ private void printInformationLastUpdate() {
+ log("Load current cycle update....",Project.MSG_INFO);
+ if (bank.getWorkflowInfoRelease() != null)
+ log("release:"+bank.getWorkflowInfoRelease(),Project.MSG_INFO);
+ }
+
+ protected void writeBeginStag(String nameStag) {
+ log("",Project.MSG_INFO);
+ log(" #=======================#",Project.MSG_INFO);
+ log(" # ["+nameStag.toUpperCase()+"]",Project.MSG_INFO);
+ log(" #=======================#",Project.MSG_INFO);
+ log("",Project.MSG_INFO);
+ }
+
+ protected void writeEndDeploy() {
+ log("",Project.MSG_INFO);
+ log(getBiomajBank().getDbName()+" has been updated.",Project.MSG_INFO);
+ log(bank.getWorkflowInfoRelease()+" is now online. in directory ["+bank.getWorkflowInfoProductionDir()+"]",Project.MSG_INFO);
+ }
+
+ protected void writeEnd() {
+ log(" #=======================#",Project.MSG_INFO);
+ log(" BIOMAJ SESSION FINISHED",Project.MSG_INFO);
+ log(" #=======================#",Project.MSG_INFO);
+ }
+
+ protected void writeEndStag(String nameStag) {
+ log(" #====================#",Project.MSG_INFO);
+ }
+
+ /**
+ * Send a message to tha bank admin when an error appears.
+ *
+ */
+ private void sendMessage(String header,String msgText) {
+ BiomajLogger.getInstance().log("start :sendMessage["+header+"]");
+
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailSmtpHostProperty)&&
+ (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailAdminProperty))&&
+ (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailFromProperty))) {
+ //log("An errors appears but user are not defined mail properties.",Project.MSG_WARN);
+ return;
+ }
+
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailSmtpHostProperty)) {
+ log(BiomajConst.mailSmtpHostProperty+" are not defined in global properties. ["+
+ BiomajConst.mailAdminProperty+"="+getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailAdminProperty)+"]",Project.MSG_ERR);
+
+ return;
+ }
+
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailAdminProperty)) {
+ log(BiomajConst.mailAdminProperty+" are not defined in global properties. ["+
+ BiomajConst.mailAdminProperty+"="+getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailAdminProperty)+"]",Project.MSG_ERR);
+
+ return;
+ }
+
+ if (!getBiomajBank().getPropertiesFromBankFile().containsKey(BiomajConst.mailFromProperty)) {
+ log(BiomajConst.mailFromProperty+" are not defined in global properties. ["+
+ BiomajConst.mailFromProperty+"="+getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailFromProperty)+"]",Project.MSG_ERR);
+
+ return;
+ }
+
+
+
+ boolean debug = false;
+ // create some properties and get the default Session
+ Properties props = new Properties();
+ String host = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailSmtpHostProperty);
+ String from = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailFromProperty);
+ //log("HOST:"+host);
+
+ props.put("mail.smtp.host", host);
+ if (debug) props.put("mail.debug", Boolean.toString(debug));
+
+
+ javax.mail.Session session = javax.mail.Session.getInstance(props, null);
+ session.setDebug(debug);
+
+ try {
+ // create a message
+ Message msg = new MimeMessage(session);
+ String tos = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.mailAdminProperty);
+ //msg.setFrom(new InternetAddress("Biomaj-"+Biomaj.VERSION+"@noreply.fr"));
+ msg.setFrom(new InternetAddress(from));
+ String[] lTos = tos.split(",");
+ InternetAddress[] address = new InternetAddress[lTos.length];
+
+ int i=0;
+ for (String to : lTos)
+ address[i++] = new InternetAddress(to);
+
+ //log("TO:"+to);
+ msg.setRecipients(Message.RecipientType.TO, address);
+ msg.setSubject(header);
+ msg.setSentDate(new Date());
+ // If the desired charset is known, you can use
+ // setText(text, charset)
+ msg.setText(msgText);
+
+ Transport.send(msg);
+ } catch (MessagingException mex) {
+ log("\n--Can't Send a mail:"+mex.getLocalizedMessage(),Project.MSG_WARN);
+ BiomajLogger.getInstance().log(mex);
+ log("\n--Exception handling in RemoteBankWorkflowEngine.java",Project.MSG_DEBUG);
+
+ log("",Project.MSG_DEBUG);
+ for (StackTraceElement st : mex.getStackTrace())
+ log(st.toString(),Project.MSG_DEBUG);
+
+ Exception ex = mex;
+ do {
+ if (ex instanceof SendFailedException) {
+ SendFailedException sfex = (SendFailedException)ex;
+ Address[] invalid = sfex.getInvalidAddresses();
+ if (invalid != null) {
+ log(" ** Invalid Addresses",Project.MSG_DEBUG);
+ if (invalid != null) {
+ for (int i = 0; i < invalid.length; i++)
+ log(" " + invalid[i],Project.MSG_DEBUG);
+ }
+ }
+ Address[] validUnsent = sfex.getValidUnsentAddresses();
+ if (validUnsent != null) {
+ log(" ** ValidUnsent Addresses",Project.MSG_DEBUG);
+ if (validUnsent != null) {
+ for (int i = 0; i < validUnsent.length; i++)
+ log(" "+validUnsent[i],Project.MSG_DEBUG);
+ }
+ }
+ Address[] validSent = sfex.getValidSentAddresses();
+ if (validSent != null) {
+ log(" ** ValidSent Addresses",Project.MSG_DEBUG);
+ if (validSent != null) {
+ for (int i = 0; i < validSent.length; i++)
+ log(" "+validSent[i],Project.MSG_DEBUG);
+ }
+ }
+ }
+
+ if (ex instanceof MessagingException)
+ ex = ((MessagingException)ex).getNextException();
+ else
+ ex = null;
+ } while (ex != null);
+ }
+ BiomajLogger.getInstance().log("END :sendMessage["+header+"]");
+ }
+
+
+ private String getMessageHeader(boolean isOk) {
+ if ((bank!=null)&&(bank.getConfig()!=null))
+ {
+ String h = "Biomaj message: BANK ["+bank.getConfig().getName()+"] - STATUS ["+Boolean.toString(isOk).toUpperCase()+"]" + " - UPDATE ["+Boolean.toString(bank.isUpdate()).toUpperCase()+"]";
+ if (bank.isUpdate())
+ h += " - RELEASE:"+bank.getWorkflowInfoRelease();
+ if (bank.isRemove())
+ h += " - REMOVE ["+Boolean.toString(bank.isRemoveOk()).toUpperCase()+"]";
+ return h;
+ }
+ else
+ return "Biomaj message: BANK ["+this.getBiomajBank().getDbName()+"] - STATUS ["+Boolean.toString(isOk).toUpperCase()+"]";
+ }
+
+ private String getMessage() throws BiomajException {
+ String res ="";
+ if (bank==null)
+ return "Biomaj can't begin a session!";
+
+ res+="Start :"+BiomajUtils.dateToString(bank.getStart(), Locale.US)+"\n";
+ res+="End :"+BiomajUtils.dateToString(new Date(), Locale.US)+"\n";
+ if (bank.getStart()!=null)
+ res+="Elapsed time :"+BiomajUtils.timeToString(new Date().getTime() - bank.getStart().getTime())+"\n";
+
+ if (bank.isUpdate()) {
+ res+="\n****************** INFO RELEASE ***************\n";
+
+ res+="Number of session :"+Integer.toString(bank.getListOldSession().size()+1)+"\n\n";
+
+ res+="Production directory :"+(bank.getWorkflowInfoProductionDir())+"\n";
+ res+="Release :"+(bank.getWorkflowInfoRelease())+"\n";
+ res+="Download :"+(BiomajUtils.sizeToString(bank.getWorkflowInfoSizeDownload()))+"\n";
+ res+="Bandwidth (Mo/s) :"+Float.toString(bank.getBandWidth())+"\n";
+ res+="Num files downloaded :"+bank.getNbFilesDownloaded()+"\n";
+ res+="Release :"+(BiomajUtils.sizeToString(bank.getWorkflowInfoSizeRelease()))+"\n";
+
+ Collection<MetaProcess> lMpPre = bank.getAvailableMetaProcess(Session.PREPROCESS);
+ res+="------------\nPre processes:\n";
+ if (lMpPre.size() > 0) {
+ for (MetaProcess mpPre : lMpPre) {
+ res+="Metaproc:["+ mpPre.getName() +"] log:["+mpPre.getLogFile()+"]"+"\n";
+ for (BiomajProcess bp : mpPre.getListProcess()) {
+ res+=" --> "+bp.getNameProcess()+"("+bp.getDescription()+")\n";
+ }
+ }
+ }
+ else {
+ res+="None\n";
+ }
+ res+="\n";
+
+ Collection<MetaProcess> lMp = bank.getAvailableMetaProcess(Session.POSTPROCESS);
+ res+="------------\nPost processes:\n";
+ if (lMp.size() > 0) {
+ for (MetaProcess mp : lMp) {
+ res+="Metaproc:["+ mp.getName() +"] log:["+mp.getLogFile()+"]"+"\n";
+ for (BiomajProcess bp : mp.getListProcess()) {
+ res+=" --> "+bp.getNameProcess()+"("+bp.getDescription()+")\n";
+ }
+ }
+ }
+ else {
+ res+="None\n";
+ }
+ res+="\n";
+
+ Collection<MetaProcess> lMpR = bank.getAvailableMetaProcess(Session.REMOVEPROCESS);
+ res+="------------\nRemove processes:\n";
+ if (lMpR.size() > 0) {
+ for (MetaProcess mpR : lMpR) {
+ res+="Metaproc:["+ mpR.getName() +"] log:["+mpR.getLogFile()+"]"+"\n";
+ for (BiomajProcess bp : mpR.getListProcess()) {
+ res+=" --> "+bp.getNameProcess()+"("+bp.getDescription()+")\n";
+ }
+ }
+ }
+ else {
+ res+="None\n";
+ }
+ res+="\n";
+ res+="\n***********************************************\n";
+ }
+ else if (bank.isRemove()) {
+ res+="\n****************** INFO REMOVE ***************\n";
+
+ Collection<MetaProcess> lMpR = bank.getAvailableMetaProcess(Session.REMOVEPROCESS);
+ res+="------------\nRemove processes:\n";
+ if (lMpR.size() > 0) {
+ for (MetaProcess mpR : lMpR) {
+ res+="Metaproc:["+ mpR.getName() +"] log:["+mpR.getLogFile()+"]"+"\n";
+ for (BiomajProcess bp : mpR.getListProcess()) {
+ res+=" --> "+bp.getNameProcess()+"("+bp.getDescription()+")\n";
+ }
+ }
+ }
+ else {
+ res+="None\n";
+ }
+ res+="\n";
+ res+="\n***********************************************\n";
+ }
+
+ try {
+ if (bank!=null)
+ for (Session s : bank.getListOldSession()) {
+ for (String d : s.getMessageErrorOnSession())
+ res+=d+"\n";
+ }
+
+ if ((bank!=null)&&(bank.getCurrentSession()!=null))
+ for (String s : bank.getCurrentSession().getMessageErrorOnSession())
+ res+=s+"\n";
+ } catch (ParseException pe) {
+ getProject().log(pe.getMessage(),Project.MSG_ERR);
+ }
+ return res;
+ }
+
+ public void updateProperties() {
+ Properties props = getBiomajBank().getPropertiesFromBankFile();
+ Enumeration<?> keys = props.keys();
+
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ if ((getProperty(key)==null)||(getProperty(key).compareTo(props.getProperty(key))!=0)) {
+ log("update property ["+key+":"+props.getProperty(key)+"]",Project.MSG_DEBUG);
+ setProperty(key,props.getProperty(key));
+ }
+ }
+ }
+
+ /**
+ * Initialize console logger with good title
+ *
+ */
+ private void initConsoleLogger() {
+
+ int value = BiomajConsoleLogger.SYNC;
+ if ((getCommand()==WorkflowEngine.TARGET_ALL)||(getCommand()==TARGET_UNTIL_DEPLOY))
+ value = BiomajConsoleLogger.SYNC_DEP;
+ else if ((getCommand()==WorkflowEngine.TARGET_DEPLOY))
+ value = BiomajConsoleLogger.DEP;
+
+ console = new BiomajConsoleLogger(getBiomajBank().getDbName(),this,value);
+
+
+ ((BiomajConsoleLogger)console).setMessageOutputLevel(level);
+ bProject.addBuildListener(console);
+ }
+
+ private void checkProductionDirectory() throws BiomajBuildException {
+ log("[check production directories]",Project.MSG_VERBOSE);
+
+ List<ProductionDirectory> lpd = BiomajSQLQuerier.getAvailableProductionDirectories(getBiomajBank().getDbName());
+
+ for (ProductionDirectory pd : lpd) {
+ File d = new File(pd.getPath());
+ if (!d.exists()) {
+ log("Directory '" + pd.getPath() + "' could not be found." +
+ "Related session deleted. Directory status set to 'deleted'.", Project.MSG_WARN);
+ BiomajSQLQuerier.deleteSession(pd.getSession(), null);
+ if (BiomajSQLQuerier.setDirectoryStateToDeleted(pd) <= 0) {
+ throw new BiomajBuildException(getProject(),"production.directory.does.not.exist",
+ pd.getPath(),BiomajUtils.getBiomajRootDirectory()+"/statefiles/"+getBiomajBank().getDbName()+".xml",null);
+ }
+ } else {
+ log(pd.getPath(),Project.MSG_VERBOSE);
+ }
+ }
+
+ }
+
+ private void checkVersionDirectory() throws BiomajBuildException {
+
+ Map<String, String> info = BiomajSQLQuerier.getBankInfo(getBiomajBank().getDbName());
+ if (info == null)
+ return;
+
+
+ Configuration config = new Configuration(info);
+
+ String lastVersionDirectory = config.getVersionDirectory();
+
+ String availableDir = getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.dataDirProperty) +"/"+
+ getBiomajBank().getPropertiesFromBankFile().getProperty(BiomajConst.versionDirProperty);
+
+
+ File prodDir = new File(availableDir);
+
+ if (prodDir.compareTo(new File(lastVersionDirectory))!=0) {
+ throw new BiomajBuildException(getProject(),"remotebankworkflow.error.change.versiondir", prodDir.getAbsolutePath(),null);
+ }
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/VirtualBankWorkflowEngine.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/VirtualBankWorkflowEngine.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/VirtualBankWorkflowEngine.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,150 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.util.Vector;
+
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class VirtualBankWorkflowEngine extends BankSetWorkflowEngine {
+
+ public VirtualBankWorkflowEngine(BiomajBank bank) {
+ super(bank);
+ }
+
+ @Override
+ protected void endWorkflow() throws BiomajException {
+ super.endWorkflow();
+
+ }
+
+ @Override
+ protected void initWorkflow() throws BiomajException {
+ super.initWorkflow();
+ }
+
+ @Override
+ protected void runAll() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+ synchronizeFils();
+ startTargetFils(WorkflowEngine.TARGET_DEPLOY);
+ }
+
+ @Override
+ protected void runUntilMirror() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_MIRROR);
+ }
+
+ @Override
+ protected void runUntilMakeProduction() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_DEPLOY);
+ }
+
+ @Override
+ protected void runUntilDeployment() throws BiomajException {
+ runAll();
+ }
+
+ @Override
+ protected void runUntilPostProcess() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_POSTPROCESS);
+
+ }
+
+ @Override
+ protected void runUntilPreProcess() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_UNTIL_PREPROCESS);
+ }
+
+ @Override
+ protected void runDeployment() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_DEPLOY);
+ }
+
+ @Override
+ protected void runMakeProduction() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_DEPLOY);
+ }
+
+ @Override
+ protected void runMirror() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_MIRROR);
+
+ }
+
+
+
+ @Override
+ protected void runRebuild() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_REBUILD);
+ runAll();
+ }
+
+ @Override
+ protected void runPostProcess() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_POSTPROCESS);
+
+ }
+
+ @Override
+ protected void runPreProcess() throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_PREPROCESS);
+ }
+
+ @Override
+ public void runOnlyRemoveProcess() throws BiomajException {
+ Vector<String> versions = getVersionToRemove();
+ for (String version : versions) {
+ runRemoveProcess(version);
+ }
+ }
+
+ @Override
+ public void runRemoveProcess(String version) throws BiomajException {
+ startTargetFils(WorkflowEngine.TARGET_REMOVEPROCESS);
+
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngine.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngine.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngine.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,679 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.concurrent.Semaphore;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public abstract class WorkflowEngine extends BiomajThread {
+
+ public static final int TARGET_ALL = 0;
+ public static final int TARGET_UNTIL_PREPROCESS = 1;
+ public static final int TARGET_UNTIL_MIRROR = 2;
+ public static final int TARGET_UNTIL_POSTPROCESS = 3;
+ public static final int TARGET_UNTIL_MAKEPROD = 4;
+ public static final int TARGET_UNTIL_DEPLOY = 5;
+ public static final int TARGET_SUB_TASK = 6;
+ public static final int TARGET_PREPROCESS = 7;
+ public static final int TARGET_MIRROR = 8;
+ public static final int TARGET_POSTPROCESS = 9;
+ public static final int TARGET_DEPLOY = 10;
+ public static final int TARGET_REBUILD = 11;
+ public static final int TARGET_REMOVEPROCESS = 12;
+
+
+ /** Keep all instance of workflow engine to handle dependances and no redondance */
+ private static TreeMap<String, WorkflowEngine> mapBankNameWE = new TreeMap<String, WorkflowEngine>();
+ /** Instance of each workflow */
+ private static TreeMap<String, Integer> mapBankRef = new TreeMap<String, Integer>();
+
+ /**
+ * @uml.property name="command"
+ */
+ private int command =-1;
+
+ /** Extension lock file*/
+ public static final String extensionLock = ".lock";
+
+ /**
+ * @uml.property name="checkLock"
+ */
+ private Boolean checkLock = true;
+
+ private BiomajBank biomajBank;
+ /**
+ * Default is true, set false, if you don't want that biomaj check if there are lock
+ * @param check
+ * @uml.property name="workWithCurrentDirectory"
+ */
+
+ private boolean workWithCurrentDirectory = false;
+
+ /**
+ * @uml.property name="forceForANewUpdate"
+ */
+ private boolean forceForANewUpdate = false;
+
+ private boolean fromScratch = false;
+
+ /**
+ * Initialized ti True When a Block is Executed
+ * @uml.property name="hm_blockIsOk"
+ * @uml.associationEnd qualifier="blockName:java.lang.String java.util.concurrent.Semaphore"
+ */
+ private HashMap<String, Semaphore> hm_blockIsOk ;
+
+ private String[] listProcessToRebuild = null ;
+ private String[] listMetaProcessToRebuild = null ;
+ private String[] listBlockProcessToRebuild = null ;
+
+
+ private Vector<String> versionsToRemove;
+
+ public Vector<String> getVersionToRemove() {
+ return versionsToRemove;
+ }
+
+
+ public void setVersionsToRemove(Vector<String> versionsToRemove) {
+ this.versionsToRemove = versionsToRemove;
+ }
+
+
+ public void lockHasBeCheck(boolean check) {
+ checkLock = check;
+ }
+
+
+ public WorkflowEngine(BiomajBank bank) {
+ super(bank.getDbName());
+ biomajBank = bank;
+
+ hm_blockIsOk = new HashMap<String, Semaphore>();
+ if ((bank.getPropertiesFromBankFile().containsKey(BiomajConst.blockPostprocessProperty))&&
+ (bank.getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty).trim().compareTo("")!=0))
+ {
+ String[] lBlocks = bank.getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty).split(",");
+ for (String b : lBlocks) {
+ hm_blockIsOk.put(b, new Semaphore(0));
+ }
+
+ }
+
+ if (getMapBankNameWE().containsKey(bank.getDbName()))
+ {
+ BiomajLogger.getInstance().log("Workflow engine ever instanciate for ["+bank.getDbName()+"]");
+ return;
+ }
+ getMapBankNameWE().put(bank.getDbName(), this);
+ getMapBankRef().put(bank.getDbName(), new Integer(1));
+
+ }
+
+ /**
+ * Getter of the property <tt>biomajBank</tt>
+ * @return Returns the biomajBank.
+ * @uml.property name="biomajBank"
+ */
+ public BiomajBank getBiomajBank() {
+ return biomajBank;
+ }
+
+ /**
+ * Setter of the property <tt>biomajBank</tt>
+ * @param biomajBank The biomajBank to set.
+ * @uml.property name="biomajBank"
+ */
+ public void setBiomajBank(BiomajBank biomajBank) {
+ this.biomajBank = biomajBank;
+ }
+
+ public abstract void setModeConsole(boolean withConsole,int mode);
+
+ protected void initWorkflow() throws BiomajException {
+ setLock();
+ //synchr();
+ }
+
+ protected void endWorkflow() throws BiomajException {
+ unlock();
+ release();
+ setErrorOnWorkflow(false);
+ BiomajSession.getInstance().removeBank(getBiomajBank().getDbName());
+ BiomajLogger.getInstance().close(getBiomajBank().getDbName());
+ }
+
+ protected void endWithErrorWorkflow(Exception e) throws BiomajException {
+ unlock();
+ release();
+ setErrorOnWorkflow(true);
+ BiomajSession.getInstance().removeBank(getBiomajBank().getDbName());
+ BiomajLogger.getInstance().close(getBiomajBank().getDbName());
+ }
+
+ public abstract void log(String message, int priority);
+
+ protected abstract void runAll() throws BiomajException ;
+
+ /**
+ * run mirror workflow
+ * @throws BiomajException
+ */
+ protected abstract void runUntilMirror() throws BiomajException ;
+
+ /**
+ * @throws BiomajException
+ */
+ protected abstract void runUntilMakeProduction() throws BiomajException ;
+
+ /**
+ * run Post-Process Workflow
+ * @throws BiomajException
+ */
+ protected abstract void runUntilPostProcess() throws BiomajException ;
+
+ /**
+ * run pre-process workflow
+ * @throws BiomajException
+ */
+ protected abstract void runUntilPreProcess() throws BiomajException ;
+
+ /**
+ * run Deployement workflow
+ * @throws BiomajException
+ */
+ protected abstract void runUntilDeployment() throws BiomajException ;
+
+
+ protected abstract void runRebuild() throws BiomajException ;
+
+ protected abstract void runDeployment() throws BiomajException ;
+
+ protected abstract void runMirror() throws BiomajException ;
+
+ protected abstract void runMakeProduction() throws BiomajException ;
+
+ protected abstract void runPostProcess() throws BiomajException ;
+
+ protected abstract void runPreProcess() throws BiomajException ;
+
+ public abstract void runRemoveProcess(String version) throws BiomajException ;
+
+ public abstract void runOnlyRemoveProcess() throws BiomajException ;
+
+ protected void runSubTask() throws BiomajException {
+ throw new BiomajException("workflowengine.subtask.defined");
+ }
+
+ public String getCommandStr() {
+ switch (command) {
+ case TARGET_ALL: return "ALL";
+ case TARGET_UNTIL_MIRROR: return "PRE-PROCESS SYNC";
+ case TARGET_UNTIL_DEPLOY: return "PRE-PROCESS SYNC POST-PROCESSING MOVE";
+ case TARGET_UNTIL_POSTPROCESS : return "PRE-PROCESS SYNC POST-PROCESSING";
+ case TARGET_UNTIL_PREPROCESS: return "PRE-PROCESSING";
+ //case TARGET_PRE_MIRROR_POST: return "PRE-PROCESSING SYNC POST-PROCESSING";
+ case TARGET_PREPROCESS: return "PRE-PROCESSING";
+ case TARGET_MIRROR: return "SYNC";
+ case TARGET_DEPLOY: return "MOVE";
+ case TARGET_POSTPROCESS : return "POST-PROCESSING";
+ case TARGET_SUB_TASK: return "SUB-PROCESS";
+ case TARGET_REBUILD: return "REBUILD";
+ case TARGET_REMOVEPROCESS: return "REMOVE-PROCESS";
+ }
+ return "COMMAND NO DEFINED:"+getCommand();
+ }
+
+ /**
+ * @return the command
+ * @uml.property name="command"
+ */
+ public int getCommand() {
+ return command;
+ }
+
+
+
+ /**
+ * @param command the command to set
+ * @uml.property name="command"
+ */
+ public void setCommand(int command) {
+ this.command = command;
+ }
+
+
+ @Override
+ public void run() {
+ try {
+
+ if (bankIsLock(getBiomajBank().getDbName()))
+ {
+ //initWorkflow();
+ //log("A biomaj process running for bank:"+getBiomajBank().getDbName(),Project.MSG_ERR);
+ //log("if you think this is a error please delete manually the file:"+getNameLockFile(getBiomajBank().getDbName()),Project.MSG_INFO);
+
+
+ System.err.println();
+ System.err.println();
+ System.err.println("A biomaj process running for bank:"+getBiomajBank().getDbName());
+ System.err.println("if you think this is a error please delete manually the file:"+getNameLockFile(getBiomajBank().getDbName()));
+ System.err.println();
+ System.err.println();
+
+ BiomajSession.getInstance().removeBank(getBiomajBank().getDbName());
+ BiomajLogger.getInstance().close(getBiomajBank().getDbName());
+ //setLock();
+ return;
+ }
+ //super.run();
+ //BiomajQueryXmlStateFile bq = new BiomajQueryXmlStateFile();
+ //Session session = new Session();
+ //bq.getLastSession(getBiomajBank().getDbName(), session);
+
+ initWorkflow();
+ switch (getCommand()) {
+ case TARGET_ALL : runAll();
+ break;
+ case TARGET_UNTIL_MIRROR : runUntilMirror();
+ break;
+ case TARGET_UNTIL_PREPROCESS : runUntilPreProcess();
+ break;
+ case TARGET_UNTIL_POSTPROCESS : runUntilPostProcess();
+ break;
+ case TARGET_UNTIL_MAKEPROD : runUntilMakeProduction();
+ break;
+ case TARGET_UNTIL_DEPLOY : runUntilDeployment();
+ break;
+ case TARGET_MIRROR : runMirror();
+ break;
+ case TARGET_PREPROCESS : runPreProcess();
+ break;
+ case TARGET_POSTPROCESS : runPostProcess();
+ break;
+ case TARGET_DEPLOY : runDeployment();
+ break;
+ case TARGET_REBUILD : runRebuild();
+ break;
+ case TARGET_REMOVEPROCESS : runOnlyRemoveProcess();
+ break;
+ case TARGET_SUB_TASK : runSubTask();
+ break;
+ default:
+ System.err.println("ERREUR BIOMAJ ! No command defined");
+ }
+ endWorkflow();
+ }
+ catch (BuildException e) {
+ try { endWithErrorWorkflow(null) ;} catch (BiomajException be) { BiomajLogger.getInstance().log(be);}
+ BiomajLogger.getInstance().log(e);
+ BiomajLogger.getInstance().close(getBiomajBank().getDbName());
+ } catch (BiomajException e) {
+ log(e.getLocalizedMessage(), Project.MSG_ERR);
+ try { endWithErrorWorkflow(null) ;} catch (BiomajException be) { BiomajLogger.getInstance().log(be);}
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log(e);
+ log(e.getLocalizedMessage(), Project.MSG_ERR);
+ BiomajLogger.getInstance().close(getBiomajBank().getDbName());
+ try { endWithErrorWorkflow(null) ;} catch (BiomajException be) { BiomajLogger.getInstance().log(be);}
+ }
+ }
+
+ /**
+ * True if a citrina execution is in current process with the bank specified
+ * False otherwise
+ * @param bankName
+ * @return
+ */
+ private Boolean bankIsLock(String bankName) throws BiomajException {
+ if (!checkLock)
+ return false;
+ //another citrina process treat the bank!
+ File f = new File(getNameLockFile(bankName));
+ if (f.exists())
+ return true;
+
+ return false;
+ }
+
+
+ /**
+ * Set a lock for bankName
+ * @param bankName
+ */
+ private void setLock() throws BiomajException {
+ if (!checkLock)
+ return;
+ File f = new File(getNameLockFile(getBiomajBank().getDbName()));
+
+ try {
+ FileOutputStream fi = new FileOutputStream(f,true);
+ fi.write("LOCK".getBytes());
+ fi.close();
+
+ } catch (FileNotFoundException e) {
+
+ } catch (IOException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ }
+
+ /**
+ * Remove a lock for bankName
+ * @param bankName
+ */
+ protected void unlock() throws BiomajException {
+ if (!checkLock)
+ return;
+ String bankName = getBiomajBank().getDbName();
+ File f = new File(getNameLockFile(bankName));
+ f.delete();
+ }
+
+ /**
+ * Get the name of lock file,
+ * WARNING : not create the temp file in /tmp because, citrina can run on several computer!
+ * @param bankName
+ */
+ public static String getNameLockFile(String bankName) throws BiomajException {
+ String tmpDir = BiomajInformation.getInstance().getProperty(BiomajInformation.TMPDIR) + "/";
+ File tmp = new File(tmpDir);
+ if (!tmp.exists())
+ tmp.mkdir();
+ return tmpDir + bankName + extensionLock;
+ }
+
+
+ /**
+ * @return the workWithCurrentDirectory
+ * @uml.property name="workWithCurrentDirectory"
+ */
+ public boolean isWorkWithCurrentDirectory() {
+ return workWithCurrentDirectory;
+ }
+
+
+ /**
+ * @param workWithCurrentDirectory the workWithCurrentDirectory to set
+ * @uml.property name="workWithCurrentDirectory"
+ */
+ public void setWorkWithCurrentDirectory(boolean workWithCurrentDirectory) {
+ this.workWithCurrentDirectory = workWithCurrentDirectory;
+ }
+
+
+ /**
+ * @return the forceForANewUpdate
+ * @uml.property name="forceForANewUpdate"
+ */
+ public boolean isForceForANewUpdate() {
+ return forceForANewUpdate;
+ }
+
+
+ /**
+ * @param forceForANewUpdate the forceForANewUpdate to set
+ * @uml.property name="forceForANewUpdate"
+ */
+ public void setForceForANewUpdate(boolean forceForANewUpdate) {
+ this.forceForANewUpdate = forceForANewUpdate;
+ }
+
+ public boolean isFromScratch() {
+ return fromScratch;
+ }
+
+ public void setFromScratch(boolean fromScratch) {
+ this.fromScratch = fromScratch;
+ }
+
+
+ public static TreeMap<String, WorkflowEngine> getMapBankNameWE() {
+ return mapBankNameWE;
+ }
+
+ public static boolean workflowIsInstanciate(String bankName) {
+ return getMapBankNameWE().containsKey(bankName);
+ }
+
+ public static WorkflowEngine getWorkflow(String bankName) {
+ return getMapBankNameWE().get(bankName);
+ }
+
+
+ public static void addReference(String bankName) {
+ if (getMapBankRef().containsKey(bankName))
+ getMapBankRef().put(bankName, getMapBankRef().get(bankName)+1);
+ }
+
+ public static Integer getReference(String bankName) {
+ if (getMapBankRef().containsKey(bankName))
+ return getMapBankRef().get(bankName);
+
+ return new Integer(0);
+ }
+
+ public static void removeWE(String bankName) {
+ if (!getMapBankRef().containsKey(bankName))
+ return;
+ Integer value = getMapBankRef().get(bankName);
+
+ if (value <= 1) { // Removing last reference
+ getMapBankRef().remove(bankName);
+ getMapBankNameWE().remove(bankName);
+ } else { // Not the last reference
+ getMapBankRef().put(bankName, value - 1);
+ }
+ }
+
+ public static TreeMap<String, Integer> getMapBankRef() {
+ return mapBankRef;
+ }
+
+
+ public Boolean blockExist(String blockName) {
+ return hm_blockIsOk.containsKey(blockName);
+ }
+
+
+ public Boolean blockIsExecute(String blockName) {
+ if (hm_blockIsOk.containsKey(blockName))
+ return (hm_blockIsOk.get(blockName).availablePermits()<=0);
+ return false;
+ }
+
+ protected void setBlockExecute(String blockName) throws BiomajException {
+ /* System.out.println(getBiomajBank().getDbName()+"<-- lock by process:"+blockName);
+ System.out.println(hm_blockIsOk.size());
+ Semaphore s = hm_blockIsOk.get(blockName);
+
+ if ( s==null )
+ throw new BiomajException("workflow.error.synchro.null.block",blockName,getBiomajBank().getDbName());
+
+ if (s.availablePermits()<1) {
+ throw new BiomajException("workflow.error.synchro.block",blockName,getBiomajBank().getDbName());
+ }
+ try {
+ s.acquire();
+ } catch (InterruptedException ie) {
+ throw new BiomajException("workflow.error.interrupted.synchro.block");
+ }
+ System.out.println("--> lock by process:"+blockName);*/
+ }
+
+ protected void removeBlockExecute(String blockName) throws BiomajException {
+ log(getBiomajBank().getDbName()+"<-- remove block from handler manager:"+blockName,Project.MSG_DEBUG);
+ int nbRef = getAllReferences().size();
+ log(getBiomajBank().getDbName()+" : Nb ref father:"+nbRef,Project.MSG_DEBUG);
+ hm_blockIsOk.get(blockName).release(nbRef);
+ }
+
+ protected void removeAllBlockProcess() throws BiomajException {
+ log(getBiomajBank().getDbName()+"<-- clear all block from handler manager:",Project.MSG_DEBUG);
+ Collection<Semaphore> cs = hm_blockIsOk.values();
+ int nbRef = getAllReferences().size();
+ log(getBiomajBank().getDbName()+" : Nb ref father:"+nbRef,Project.MSG_DEBUG);
+ //On relache le lock au nombre de Pere
+
+ for (Semaphore s : cs) {
+ s.release(nbRef);
+ }
+ }
+
+ public void synchr(String blockName) throws BiomajException {
+ log(getBiomajBank().getDbName()+"<-- synchr:"+blockName,Project.MSG_DEBUG);
+
+ //Si le process n est pas lanc�, c est qu il est ok!
+ if (!hm_blockIsOk.containsKey(blockName)) {
+ log(getBiomajBank()+getName()+":Process "+blockName+" is ever executed!",Project.MSG_DEBUG);
+ return;
+ }
+ try {
+ hm_blockIsOk.get(blockName).acquire();
+ } catch (InterruptedException ie) {
+ throw new BiomajException("workflow.error.interrupted.synchro.block");
+ }
+ log("--> synchr:"+blockName,Project.MSG_DEBUG);
+ }
+
+
+ public void free(String blockName) throws BiomajException {
+ log(getBiomajBank().getDbName()+"<-- free:"+blockName,Project.MSG_DEBUG);
+ int nbRef = getAllReferences().size();
+ log(getBiomajBank().getDbName()+"Nb ref father:"+nbRef,Project.MSG_DEBUG);
+ hm_blockIsOk.get(blockName).release(nbRef);
+ log("--> free:"+blockName,Project.MSG_DEBUG);
+ }
+
+
+ public abstract Vector<WorkflowEngine> getChild() ;
+
+ /**
+ * Retourne un vecteur de workflowengine qui depende du workflow engine courant:
+ * Si this == RemoteWorkflow Engine le vecteur est vide
+ *
+ * @return
+ */
+ public Vector<WorkflowEngine> getAllReferences() {
+
+ Vector<WorkflowEngine> result = new Vector<WorkflowEngine>();
+
+ for (WorkflowEngine we : mapBankNameWE.values()) {
+ if (we.getId()==this.getId())
+ continue;
+ Vector<WorkflowEngine> vw = we.getChild();
+ for (WorkflowEngine we2 : vw) {
+ if (we2.getId()==this.getId())
+ result.add(we2);
+ }
+ }
+
+ return result;
+
+ }
+
+
+ public String[] getListBlockProcessToRebuild() {
+ return listBlockProcessToRebuild;
+ }
+
+
+ public void setListBlockProcessToRebuild(String[] listBlockProcessToRebuild) {
+ this.listBlockProcessToRebuild = listBlockProcessToRebuild;
+ }
+
+
+ public String[] getListMetaProcessToRebuild() {
+ return listMetaProcessToRebuild;
+ }
+
+
+ public void setListMetaProcessToRebuild(String[] listMetaProcessToRebuild) {
+ this.listMetaProcessToRebuild = listMetaProcessToRebuild;
+ }
+
+
+ public String[] getListProcessToRebuild() {
+ return listProcessToRebuild;
+ }
+
+
+ public void setListProcessToRebuild(String[] listProcessToRebuild) {
+ this.listProcessToRebuild = listProcessToRebuild;
+ }
+
+ /**
+ * /!\ For testing purpose only /!\
+ */
+ public static void initWorkflowEngine() {
+ /*
+ * We need to reinit the map when we run successive
+ * instances of biomaj in the same jvm.
+ * For example if we run an update process and a remove
+ * process for the same bank, the same WorklflowEngine object will
+ * be returned, which is no good as mutliple call at the
+ * Thread start method raises an exception.
+ */
+ mapBankNameWE = new TreeMap<String, WorkflowEngine>();
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngineFactory.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngineFactory.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/WorkflowEngineFactory.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,79 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.exe.workflow;
+
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class WorkflowEngineFactory {
+
+
+ /**
+ */
+ public WorkflowEngine createWorkflow(BiomajBank bank) throws NullPointerException,BiomajException {
+ if (WorkflowEngine.workflowIsInstanciate(bank.getDbName())) {
+ WorkflowEngine.addReference(bank.getDbName());
+ return WorkflowEngine.getWorkflow(bank.getDbName());
+ }
+
+ if (bank == null)
+ throw new NullPointerException();
+
+ if (bank.getPropertiesFromBankFile() == null) {
+ BiomajLogger.getInstance().log("Erreur exc");
+ return null;
+ }
+ if (bank.getPropertiesFromBankFile().containsKey(BiomajConst.virtualListProperty)) {
+ return new VirtualBankWorkflowEngine(bank);
+ } else if (bank.getPropertiesFromBankFile().containsKey(BiomajConst.dependsListProperty)) {
+ return new ComputedBankWorkflowEngine(bank);
+ } else if (bank.getPropertiesFromBankFile().containsKey(BiomajConst.remoteDirProperty)) {
+ return new RemoteBankWorkflowEngine(bank);
+ } else {
+ return null;
+ }
+
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/global_workflow.uad
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/global_workflow.uad (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/global_workflow.uad 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ActivityDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="global_workflow" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:StartEditModel" location="568,20" size="21,21">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.0" target="//@children.18" targetEnd="//@children.0/@sourceConnections.0/@children.1" label="//@children.0/@sourceConnections.0/@children.2" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="10,21" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="69,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.18/@sourceConnections.0" location="490,140" size="226,27" itemName="readLastReleaseDownloadBankStatefiles">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.1" target="//@children.3" targetEnd="//@children.1/@sourceConnections.0/@children.1" label="//@children.1/@sourceConnections.0/@children.2" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="89,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="61,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="928,101" size="215,84" fontInfo="Arial-8-0" note="On recupère les informations 
du workflow de la plus récente session 
où "au moin 1 fichier a été téléchargé!"
"/>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.1/@sourceConnections.0" location="518,220" size="124,27" itemName="GetRemoteRelease">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.3" target="//@children.6" targetEnd="//@children.3/@sourceConnections.0/@children.1" label="//@children.3/@sourceConnections.0/@children.2" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="76,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="14,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.6/@sourceConnections.0" location="491,379" size="207,27" itemName="initSynchronizeLocalAndRemoteBank">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.4" target="//@children.8" targetEnd="//@children.4/@sourceConnections.0/@children.1" label="//@children.4/@sourceConnections.0/@children.2" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="110,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.4" target="//@children.7" targetEnd="//@children.4/@sourceConnections.1/@children.1" label="//@children.4/@sourceConnections.1/@children.2" sourceEnd="//@children.4/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="105,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="250,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:EndEditModel" targetConnections="//@children.6/@sourceConnections.1 //@children.22/@sourceConnections.1 //@children.17/@sourceConnections.2" location="155,309" size="45,31" itemName="Error"/>
+ <children xsi:type="editmodel:DecisionEditModel" targetConnections="//@children.3/@sourceConnections.0" location="580,280" size="30,30">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.6" target="//@children.4" targetEnd="//@children.6/@sourceConnections.0/@children.1" label="//@children.6/@sourceConnections.0/@children.2" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="release" eventArgument="" condition="release exist" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="14,30" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="103,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="release [release exist]" size="103,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.6" target="//@children.5" targetEnd="//@children.6/@sourceConnections.1/@children.1" label="//@children.6/@sourceConnections.1/@children.2" sourceEnd="//@children.6/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="Not find release" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="0,29" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="45,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="Not find release" location="319,290" size="75,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="29.85629715503877" distanceFromWire="-12.271981102903633" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.4/@sourceConnections.1" location="275,459" size="286,27" itemName="listingLocalFlatDirectoryFromDirectoryBankProduction">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.7" target="//@children.9" targetEnd="//@children.7/@sourceConnections.0/@children.1" label="//@children.7/@sourceConnections.0/@children.2" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeLocal" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="145,26" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="51,-1"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeLocal)" location="475,518" size="51,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="-9.392976565111574" distanceFromWire="-18.242039119771256" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.4/@sourceConnections.0" location="769,449" size="193,27" itemName="listingRemoteDirectoryOnServer">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.8" target="//@children.9" targetEnd="//@children.8/@sourceConnections.0/@children.1" label="//@children.8/@sourceConnections.0/@children.2" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeRemote" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="51,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="63,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeRemote)" size="64,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.8/@sourceConnections.0 //@children.7/@sourceConnections.0" location="560,538" size="100,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.9" target="//@children.10" targetEnd="//@children.9/@sourceConnections.0/@children.1" label="//@children.9/@sourceConnections.0/@children.2" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeLocal,listeRemote" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="59,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="39,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeLocal,listeRemote)" size="110,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.9/@sourceConnections.0" location="580,657" size="176,27" itemName="compareRemoteAndLocalFiles">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.10" target="//@children.26" targetEnd="//@children.10/@sourceConnections.0/@children.1" label="//@children.10/@sourceConnections.0/@children.2" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="update=true" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="0,26" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="156,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="update=true" size="58,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.10" target="//@children.27" targetEnd="//@children.10/@sourceConnections.1/@children.1" label="//@children.10/@sourceConnections.1/@children.2" sourceEnd="//@children.10/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="update=false" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="176,19" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="0,8"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="update=false" size="61,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="975,419" size="151,44" fontInfo="Arial-8-0" note="La version sur le serveur
est la version de référence"/>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.26/@sourceConnections.1" location="181,756" size="200,27" itemName="doanloadNewFilesInOfflineDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.12" target="//@children.17" targetEnd="//@children.12/@sourceConnections.0/@children.1" label="//@children.12/@sourceConnections.0/@children.2" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="no.extract" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="42,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="14,1"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(no.extract)" size="55,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.15/@sourceConnections.0" location="350,835" size="277,27" itemName="copyFilesFromOnlineFlatDirectoryToOfflineDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.13" target="//@children.19" targetEnd="//@children.13/@sourceConnections.0/@children.1" label="//@children.13/@sourceConnections.0/@children.2" sourceEnd="//@children.13/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="44,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="55,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.15/@sourceConnections.1" location="642,819" size="270,27" itemName="linkFilesFromOnlineFlatDirectoryToOfflineDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.14" target="//@children.19" targetEnd="//@children.14/@sourceConnections.0/@children.1" label="//@children.14/@sourceConnections.0/@children.2" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="94,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="62,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:DecisionEditModel" targetConnections="//@children.26/@sourceConnections.0" location="522,738" size="30,30">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.15" target="//@children.13" targetEnd="//@children.15/@sourceConnections.0/@children.1" label="//@children.15/@sourceConnections.0/@children.2" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="do.link=false" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="14,30" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="186,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name=" [do.link=false]" location="481,809" size="67,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="16.49508586967574" distanceFromWire="-21.584998080889967" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.15" target="//@children.14" targetEnd="//@children.15/@sourceConnections.1/@children.1" label="//@children.15/@sourceConnections.1/@children.2" sourceEnd="//@children.15/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="do.link=true" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="30,20" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="96,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name=" [do.link=true]" location="633,761" size="64,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="16.793558155007474" distanceFromWire="25.039496889801555" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.17/@sourceConnections.0" location="36,899" size="266,27" itemName="UncompressedFilesDownloadedInOfflineDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.16" target="//@children.22" targetEnd="//@children.16/@sourceConnections.0/@children.1" label="//@children.16/@sourceConnections.0/@children.2" sourceEnd="//@children.16/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="70,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="14,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:DecisionEditModel" targetConnections="//@children.12/@sourceConnections.0" location="209,806" size="30,30">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.17" target="//@children.16" targetEnd="//@children.17/@sourceConnections.0/@children.1" label="//@children.17/@sourceConnections.0/@children.2" sourceEnd="//@children.17/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="no.extract=false" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="14,30" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="128,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name=" [no.extract=false]" location="87,865" size="84,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="48.54225542553367" distanceFromWire="-41.384168932120005" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.17" target="//@children.19" targetEnd="//@children.17/@sourceConnections.1/@children.1" label="//@children.17/@sourceConnections.1/@children.2" sourceEnd="//@children.17/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="30,28" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="45,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.17" target="//@children.5" targetEnd="//@children.17/@sourceConnections.2/@children.1" label="//@children.17/@sourceConnections.2/@children.2" sourceEnd="//@children.17/@sourceConnections.2/@children.0" connectionRouterKind="Manual" eventName="Error download" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="14,0" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="24,31"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="Error download" size="74,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <bendpoints secondRelativeDimension="11,249" firstRelativeDimension="-165,-64"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.0/@sourceConnections.0" location="509,89" size="142,27" itemName="readPropertiesBankFile">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.18" target="//@children.1" targetEnd="//@children.18/@sourceConnections.0/@children.1" label="//@children.18/@sourceConnections.0/@children.2" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="70,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="89,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.22/@sourceConnections.0 //@children.17/@sourceConnections.1 //@children.13/@sourceConnections.0 //@children.14/@sourceConnections.0" location="339,959" size="100,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.19" target="//@children.20" targetEnd="//@children.19/@sourceConnections.0/@children.1" label="//@children.19/@sourceConnections.0/@children.2" sourceEnd="//@children.19/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="49,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="89,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.19/@sourceConnections.0" location="299,999" size="219,27" itemName="createDirectoryProduction">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.20" target="//@children.24" targetEnd="//@children.20/@sourceConnections.0/@children.1" label="//@children.20/@sourceConnections.0/@children.2" sourceEnd="//@children.20/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="109,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="118,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:EndEditModel" targetConnections="//@children.36/@sourceConnections.0 //@children.49/@sourceConnections.0" location="734,1580" size="86,31" itemName="End Workflow"/>
+ <children xsi:type="editmodel:DecisionEditModel" targetConnections="//@children.16/@sourceConnections.0" location="92,1025" size="30,30">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.22" target="//@children.19" targetEnd="//@children.22/@sourceConnections.0/@children.1" label="//@children.22/@sourceConnections.0/@children.2" sourceEnd="//@children.22/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="30,11" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="35,8"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.22" target="//@children.5" targetEnd="//@children.22/@sourceConnections.1/@children.1" label="//@children.22/@sourceConnections.1/@children.2" sourceEnd="//@children.22/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="CRC Error" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="8,7" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="29,30"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="CRC Error" location="6,957" size="52,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="28.78468226302746" distanceFromWire="14.122395937536684" anchorKind="MiddlePart"/>
+ <bendpoints secondRelativeDimension="-153,613" firstRelativeDimension="-74,-109"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.44/@sourceConnections.0 //@children.48/@sourceConnections.0" location="352,1500" size="100,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.23" target="//@children.49" targetEnd="//@children.23/@sourceConnections.0/@children.1" label="//@children.23/@sourceConnections.0/@children.2" sourceEnd="//@children.23/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="error=false" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="72,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="167,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="error=false" size="52,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.23" target="//@children.35" targetEnd="//@children.23/@sourceConnections.1/@children.1" label="//@children.23/@sourceConnections.1/@children.2" sourceEnd="//@children.23/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="error=true" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="56,0" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="0,30"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="error=true" location="696,1399" size="49,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="163.6943729969514" distanceFromWire="38.1333482549717" anchorKind="MiddlePart"/>
+ <bendpoints secondRelativeDimension="-31,181" firstRelativeDimension="317,-54"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.20/@sourceConnections.0" location="290,1079" size="270,41" itemName="linkDirectoryWithSymbolicLinkFUTURE_RELEASE">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.24" target="//@children.25" targetEnd="//@children.24/@sourceConnections.0/@children.1" label="//@children.24/@sourceConnections.0/@children.2" sourceEnd="//@children.24/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="98,41" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="64,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.24/@sourceConnections.0" location="324,1180" size="130,27" itemName="executeBlock">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.25" target="//@children.39" targetEnd="//@children.25/@sourceConnections.0/@children.1" label="//@children.25/@sourceConnections.0/@children.2" sourceEnd="//@children.25/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="7,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="88,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.25" target="//@children.40" targetEnd="//@children.25/@sourceConnections.1/@children.1" label="//@children.25/@sourceConnections.1/@children.2" sourceEnd="//@children.25/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="122,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="6,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.10/@sourceConnections.0" location="311,683" size="156,27" itemName="newReleaseUpdate">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.26" target="//@children.15" targetEnd="//@children.26/@sourceConnections.0/@children.1" label="//@children.26/@sourceConnections.0/@children.2" sourceEnd="//@children.26/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeExtract,do.link" condition="remote.file.date<local.file.date" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="114,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="0,9"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeExtract,do.link) [remote.file.date<local.file.date]" location="479,695" size="242,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="109.02460489114014" distanceFromWire="69.06978737719395" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.26" target="//@children.12" targetEnd="//@children.26/@sourceConnections.1/@children.1" label="//@children.26/@sourceConnections.1/@children.2" sourceEnd="//@children.26/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeDownload" condition="remote.file.date>local.file.date" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="34,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="164,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeDownload) [remote.file.date>local.file.date]" location="130,823" size="224,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="99.0" distanceFromWire="-102.99999999999999" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.10/@sourceConnections.1" location="1104,690" size="171,27" itemName="checkCurrentDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.27" target="//@children.30" targetEnd="//@children.27/@sourceConnections.0/@children.1" label="//@children.27/@sourceConnections.0/@children.2" sourceEnd="//@children.27/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="70,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="70,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="286,569" size="232,71" fontInfo="Arial-8-0" note="Une nouvelle version est détecté. 
un téléchargement s'en suit ainsi 
que les exécution des blocks de processus"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="1082,597" size="262,61" fontInfo="Arial-8-0" note="La version actuellement en production correspond
à la version de référence"/>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.27/@sourceConnections.0" location="1104,767" size="142,27" itemName="loadLastUpdateSession">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.30" target="//@children.31" targetEnd="//@children.30/@sourceConnections.0/@children.1" label="//@children.30/@sourceConnections.0/@children.2" sourceEnd="//@children.30/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="85,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="55,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.30/@sourceConnections.0" location="1134,835" size="111,27" itemName="executeBlock">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.31" target="//@children.32" targetEnd="//@children.31/@sourceConnections.0/@children.1" label="//@children.31/@sourceConnections.0/@children.2" sourceEnd="//@children.31/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="43,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="72,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.31" target="//@children.33" targetEnd="//@children.31/@sourceConnections.1/@children.1" label="//@children.31/@sourceConnections.1/@children.2" sourceEnd="//@children.31/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="61,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="10,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.31/@sourceConnections.0" location="1050,910" size="148,27" itemName="checkDependanceMeta1">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.32" target="//@children.36" targetEnd="//@children.32/@sourceConnections.0/@children.1" label="//@children.32/@sourceConnections.0/@children.2" sourceEnd="//@children.32/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="117,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="51,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.31/@sourceConnections.1" location="1244,910" size="148,27" itemName="checkDependanceMeta2">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.33" target="//@children.36" targetEnd="//@children.33/@sourceConnections.0/@children.1" label="//@children.33/@sourceConnections.0/@children.2" sourceEnd="//@children.33/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="60,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="56,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="697,915" size="313,95" fontInfo="Arial-8-0" note="Aucun processus n est execute.
On verifie seulement la validite des fichier de dependance
time,date,nom de fichier doit correspondre au fichier contenu
par la version courante"/>
+ <children xsi:type="editmodel:EndEditModel" targetConnections="//@children.36/@sourceConnections.1 //@children.23/@sourceConnections.1" location="734,1250" size="44,31" itemName="error"/>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.33/@sourceConnections.0 //@children.32/@sourceConnections.0" location="1137,1045" size="104,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.36" target="//@children.21" targetEnd="//@children.36/@sourceConnections.0/@children.1" label="//@children.36/@sourceConnections.0/@children.2" sourceEnd="//@children.36/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="dependance=true" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="49,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="54,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="dependance=true" size="84,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.36" target="//@children.35" targetEnd="//@children.36/@sourceConnections.1/@children.1" label="//@children.36/@sourceConnections.1/@children.2" sourceEnd="//@children.36/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="dependance=false" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="44,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="44,4"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="dependance=false" size="87,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="697,1100" size="298,44" fontInfo="Arial-8-0" note="Si une dépendance est manquante ou ne correspond pas
(time,date) une erreur est signalé"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="948,1232" size="176,47" fontInfo="Arial-8-0" note="Les dépendances sont valides"/>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.25/@sourceConnections.0" location="243,1242" size="97,27" itemName="executeMeta1">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.39" target="//@children.41" targetEnd="//@children.39/@sourceConnections.0/@children.1" label="//@children.39/@sourceConnections.0/@children.2" sourceEnd="//@children.39/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="49,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="46,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.25/@sourceConnections.1" location="440,1242" size="97,27" itemName="executeMeta2">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.40" target="//@children.45" targetEnd="//@children.40/@sourceConnections.0/@children.1" label="//@children.40/@sourceConnections.0/@children.2" sourceEnd="//@children.40/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="48,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="55,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.39/@sourceConnections.0" location="246,1280" size="111,27" itemName="executeProcess1">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.41" target="//@children.42" targetEnd="//@children.41/@sourceConnections.0/@children.1" label="//@children.41/@sourceConnections.0/@children.2" sourceEnd="//@children.41/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="55,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="78,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.41/@sourceConnections.0" location="223,1320" size="158,27" itemName="writeDependanceProcess1">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.42" target="//@children.43" targetEnd="//@children.42/@sourceConnections.0/@children.1" label="//@children.42/@sourceConnections.0/@children.2" sourceEnd="//@children.42/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="78,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="55,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.42/@sourceConnections.0" location="246,1360" size="111,27" itemName="executeProcess2">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.43" target="//@children.44" targetEnd="//@children.43/@sourceConnections.0/@children.1" label="//@children.43/@sourceConnections.0/@children.2" sourceEnd="//@children.43/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="55,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="78,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.43/@sourceConnections.0" location="223,1410" size="158,27" itemName="writeDependanceProcess2">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.44" target="//@children.23" targetEnd="//@children.44/@sourceConnections.0/@children.1" label="//@children.44/@sourceConnections.0/@children.2" sourceEnd="//@children.44/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="143,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="14,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.40/@sourceConnections.0" location="433,1280" size="111,27" itemName="executeProcess3">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.45" target="//@children.46" targetEnd="//@children.45/@sourceConnections.0/@children.1" label="//@children.45/@sourceConnections.0/@children.2" sourceEnd="//@children.45/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="55,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="67,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.45/@sourceConnections.0" location="421,1320" size="158,27" itemName="writeDependanceProcess3">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.46" target="//@children.47" targetEnd="//@children.46/@sourceConnections.0/@children.1" label="//@children.46/@sourceConnections.0/@children.2" sourceEnd="//@children.46/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="67,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="55,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.46/@sourceConnections.0" location="433,1370" size="111,27" itemName="executeProcess4">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.47" target="//@children.48" targetEnd="//@children.47/@sourceConnections.0/@children.1" label="//@children.47/@sourceConnections.0/@children.2" sourceEnd="//@children.47/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="55,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="67,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.47/@sourceConnections.0" location="421,1410" size="158,27" itemName="writeDependanceProcess4">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.48" target="//@children.23" targetEnd="//@children.48/@sourceConnections.0/@children.1" label="//@children.48/@sourceConnections.0/@children.2" sourceEnd="//@children.48/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="15,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="84,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.23/@sourceConnections.0" location="398,1554" size="318,27" itemName="deployAndCreateCurrentLinkAndRemoveFutureReleaseLink">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.49" target="//@children.21" targetEnd="//@children.49/@sourceConnections.0/@children.1" label="//@children.49/@sourceConnections.0/@children.2" sourceEnd="//@children.49/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="269,26" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="621,1325" size="180,51" fontInfo="Arial-8-0" note="Une erreur a ete detecte durant 
un processus (exit!=0)"/>
+ <diagramOptions xsi:type="options:ActivityDiagramOptions" level="0" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+</editmodel:ActivityDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/org.inria.biomaj.exe.workflow.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/org.inria.biomaj.exe.workflow.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/org.inria.biomaj.exe.workflow.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,522 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.exe.workflow" metadata="uml2-1.0" initialized="true" scrolledY="536" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.20/@sourceConnections.0" name="WorkflowEngineFactory" location="607,920" size="306,103" id="org.inria.biomaj.exe.workflow/WorkflowEngineFactory" runTimeClassModel="createWorkflow(Lorg.inria.biomaj.exe.bank.BiomajBank;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="283,19">
+ <children xsi:type="editmodel:MethodEditModel" name="createWorkflow" id="org.inria.biomaj.exe.workflow/WorkflowEngineFactory#createWorkflow(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/WorkflowEngineFactory->org.inria.biomaj.exe.workflow/WorkflowEngine" source="//@children.0" target="//@children.5" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="44,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="41,51" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="321,612"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.2 //@children.2/@sourceConnections.3 //@children.19/@sourceConnections.0" name="BiomajAntProject" location="1200,810" size="294,293" id="org.inria.biomaj.exe.workflow/BiomajAntProject" runTimeClassModel="set(Ljava.util.Properties;),setProperty(Ljava.lang.String;Ljava.lang.String;),build,start(),project,updateProperties(Ljava.util.Properties;),getProperty(Ljava.lang.String;),addBuildListener(Lorg.apache.tools.ant.BuildListener;),BiomajAntProject(),init(Ljava.lang.String;Ljava.util.Properties;),getProject()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="90,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="build" id="org.inria.biomaj.exe.workflow/BiomajAntProject#build"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="project" id="org.apache.tools.ant/Project at project+org.inria.biomaj.exe.workflow/BiomajAntProject@|org.apache.tools.ant/Project#project"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="271,171">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajAntProject" id="org.inria.biomaj.exe.workflow/BiomajAntProject#BiomajAntProject()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addBuildListener" id="org.inria.biomaj.exe.workflow/BiomajAntProject#addBuildListener(Lorg.apache.tools.ant.BuildListener;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProject" id="org.inria.biomaj.exe.workflow/BiomajAntProject#getProject()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProperty" id="org.inria.biomaj.exe.workflow/BiomajAntProject#getProperty(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.exe.workflow/BiomajAntProject#init(Ljava.lang.String;Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="set" id="org.inria.biomaj.exe.workflow/BiomajAntProject#set(Ljava.util.Properties;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProperty" id="org.inria.biomaj.exe.workflow/BiomajAntProject#setProperty(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="start" id="org.inria.biomaj.exe.workflow/BiomajAntProject#start()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="updateProperties" id="org.inria.biomaj.exe.workflow/BiomajAntProject#updateProperties(Ljava.util.Properties;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ProcessSequentielHandler" location="600,390" size="532,369" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler" runTimeClassModel="setProperty(Ljava.lang.String;Ljava.lang.String;),interrupt(),initProcess(),deleteVolatilesFiles(),ProcessSequentielHandler(Lorg.inria.biomaj.exe.bank.BiomajBank;Lorg.inria.biomaj.session.bank.Bank;Ljava.lang.String;),run(),getProject(),setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;),getListProcessToLaunched(),setModeConsole(Z),setListProcessToLaunched(Ljava.lang.String;),getProperty(Ljava.lang.String;),getXmlFileInfoPostProcess(Lorg.inria.biomaj.session.bank.Bank;Ljava.lang.String;Ljava.lang.String;),setBlock(Ljava.lang.String;),isInterrupted()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="163,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="509,323">
+ <children xsi:type="editmodel:MethodEditModel" name="ProcessSequentielHandler" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#ProcessSequentielHandler(Lorg.inria.biomaj.exe.bank.BiomajBank;Lorg.inria.biomaj.session.bank.Bank;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="interrupt" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#interrupt()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isInterrupted" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#isInterrupted()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initProcess" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#initProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="run" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#run()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setMetaProcess" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBlock" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#setBlock(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProject" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#getProject()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProperty" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#getProperty(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProperty" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#setProperty(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getXmlFileInfoPostProcess" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#getXmlFileInfoPostProcess(Lorg.inria.biomaj.session.bank.Bank;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListProcessToLaunched" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#getListProcessToLaunched()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setListProcessToLaunched" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#setListProcessToLaunched(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="deleteVolatilesFiles" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#deleteVolatilesFiles()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setModeConsole" id="org.inria.biomaj.exe.workflow/ProcessSequentielHandler#setModeConsole(Z)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/BiomajThread<-org.inria.biomaj.exe.workflow/ProcessSequentielHandler" source="//@children.2" target="//@children.5/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="265,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.2" target="//@children.10" targetEnd="//@children.2/@sourceConnections.1/@children.1" sourceEnd="//@children.2/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="532,87" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="162,61"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler at listenerHandler+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@" source="//@children.2" target="//@children.11" targetEnd="//@children.2/@sourceConnections.2/@children.2" label="//@children.2/@sourceConnections.2/@children.0" sourceEnd="//@children.2/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="532,204" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler at listenerHandler+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.exe.workflow/ProcessSequentielHandler#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="listenerHandler" location="0,164" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler at listenerHandler+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#listenerHandler" multiplicityLabel="//@children.2/@sourceConnections.2/@children.2/@children.1" roleLabel="//@children.2/@sourceConnections.2/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" ~ listenerHandler" location="1499,570" size="84,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1565,601" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@" source="//@children.2" target="//@children.1" targetEnd="//@children.2/@sourceConnections.3/@children.2" label="//@children.2/@sourceConnections.3/@children.0" sourceEnd="//@children.2/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="522,369" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.exe.workflow/ProcessSequentielHandler#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="bProject" location="0,10" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.exe.workflow/BiomajAntProject#bProject" multiplicityLabel="//@children.2/@sourceConnections.3/@children.2/@children.1" roleLabel="//@children.2/@sourceConnections.3/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - bProject" location="1144,827" size="49,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="1187,796" size="6,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" id="org.inria.biomaj.session.process/MetaProcess at metaProc+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@" source="//@children.2" target="//@children.12" targetEnd="//@children.2/@sourceConnections.4/@children.2" label="//@children.2/@sourceConnections.4/@children.0" sourceEnd="//@children.2/@sourceConnections.4/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="363,369" id="org.inria.biomaj.session.process/MetaProcess at metaProc+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.exe.workflow/ProcessSequentielHandler#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="metaProc" location="0,222" id="org.inria.biomaj.session.process/MetaProcess at metaProc+org.inria.biomaj.exe.workflow/ProcessSequentielHandler@|org.inria.biomaj.session.process/MetaProcess#metaProc" multiplicityLabel="//@children.2/@sourceConnections.4/@children.2/@children.1" roleLabel="//@children.2/@sourceConnections.4/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - metaProc" location="1607,1159" size="56,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1645,1128" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showStaticAttributes="true" showPublicMethods="true" showPackageMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="RemoteBankWorkflowEngine" location="1010,1200" size="380,920" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine" runTimeClassModel="linkCurrentReleaseExist(),removelinkFuturRelease(),log(Ljava.lang.String;I),writeBeginStag(Ljava.lang.String;),runUntilMirror(),runRebuild(),runUntilPostProcess(),getProject(),runDeleteOldVersion(),writeEndStag(Ljava.lang.String;),runUntilPreProcess(),runUntilDeployment(),updateProperties(),getMetaProcessName(),runMirror(),linkFuturReleaseExist(),getModeConsole(),launchWithTarget(Ljava.lang.String;),setTypeProcessName(Ljava.lang.String;),setProperty(Ljava.lang.String;Ljava.lang.String;),createLinkFuturRelease(Ljava.lang.String;),runSeqListProcess(),RemoteBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;),getTypeProcessName(),writeEndDeploy(),writeEnd(),runMakeProduction(),getChild(),runSubTask(),initWorkflow(),setMetaProcessName(Ljava.lang.String;),runPostProcess(Ljava.lang.String;),endWorkflow(),runAll(),setModeConsole(ZI),getBaseProductionDirectory(),runPostProcess(),runPreProcess(),getProperty(Ljava.lang.String;),treatEnd(),runUntilMakeProduction(),endWithErrorWorkflow(Ljava.lang.Exception;),executeBlockSequentially(Ljava.lang.String;Ljava.lang.String;),runDeployment()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="150,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="357,1140">
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#RemoteBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createLinkFuturRelease" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#createLinkFuturRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWithErrorWorkflow" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#endWithErrorWorkflow(Ljava.lang.Exception;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWorkflow" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#endWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="executeBlockSequentially" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#executeBlockSequentially(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBaseProductionDirectory" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getBaseProductionDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChild" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getChild()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcessName" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getMetaProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getModeConsole" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getModeConsole()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProject" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getProject()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProperty" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getProperty(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTypeProcessName" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#getTypeProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initWorkflow" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#initWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="launchWithTarget" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#launchWithTarget(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="linkCurrentReleaseExist" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#linkCurrentReleaseExist()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="linkFuturReleaseExist" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#linkFuturReleaseExist()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#log(Ljava.lang.String;I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removelinkFuturRelease" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#removelinkFuturRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runAll" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runDeleteOldVersion" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runDeleteOldVersion()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runDeployment" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMakeProduction" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMirror" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runPostProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPreProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runRebuild" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runRebuild()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runSeqListProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runSeqListProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runSubTask" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runSubTask()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilDeployment" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runUntilDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMakeProduction" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runUntilMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMirror" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runUntilMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPostProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runUntilPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPreProcess" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#runUntilPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setMetaProcessName" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#setMetaProcessName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setModeConsole" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#setModeConsole(ZI)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProperty" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#setProperty(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTypeProcessName" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#setTypeProcessName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="treatEnd" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#treatEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="updateProperties" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#updateProperties()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeBeginStag" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#writeBeginStag(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeEnd" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#writeEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeEndDeploy" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#writeEndDeploy()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeEndStag" id="org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#writeEndStag(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/WorkflowEngine<-org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine" source="//@children.3" target="//@children.4/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="190,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler at blh+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@" source="//@children.3" target="//@children.13" targetEnd="//@children.3/@sourceConnections.1/@children.2" label="//@children.3/@sourceConnections.1/@children.0" sourceEnd="//@children.3/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="380,334" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler at blh+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#" attachSource="true" roleLabel="//@children.3/@sourceConnections.1/@children.1/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="1397,1510" size="0,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="blh" location="0,184" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler at blh+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#blh" multiplicityLabel="//@children.3/@sourceConnections.1/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.1/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - blh" location="1699,1578" size="24,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1705,1547" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@" source="//@children.3" target="//@children.1" targetEnd="//@children.3/@sourceConnections.2/@children.2" label="//@children.3/@sourceConnections.2/@children.0" sourceEnd="//@children.3/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="284,0" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#" attachSource="true" roleLabel="//@children.3/@sourceConnections.2/@children.1/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="1287,1176" size="0,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="bProject" location="94,293" id="org.inria.biomaj.exe.workflow/BiomajAntProject at bProject+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.exe.workflow/BiomajAntProject#bProject" multiplicityLabel="//@children.3/@sourceConnections.2/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.2/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - bProject" location="1301,1110" size="49,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1269,1110" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/Bank at bank+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@" source="//@children.3" target="//@children.16" targetEnd="//@children.3/@sourceConnections.3/@children.2" label="//@children.3/@sourceConnections.3/@children.0" sourceEnd="//@children.3/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="380,775" id="org.inria.biomaj.session.bank/Bank at bank+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="bank" location="0,145" id="org.inria.biomaj.session.bank/Bank at bank+org.inria.biomaj.exe.workflow/RemoteBankWorkflowEngine@|org.inria.biomaj.session.bank/Bank#bank" multiplicityLabel="//@children.3/@sourceConnections.3/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.3/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - bank" location="1550,1951" size="33,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1565,1982" size="18,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedMethods="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.8/@sourceConnections.0" name="BankSetWorkflowEngine" location="209,1160" size="311,331" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine" runTimeClassModel="synchronizeFils(Ljava.lang.String;Ljava.lang.String;),getBlockAfterAll(),log(Ljava.lang.String;I),getBankAndBlockChild(I),BankSetWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;),getBlockBeforeAll(),getChild(),startTargetFils(I),initListFils(),synchronizeFils(),getBlockDependsChild(I),setModeConsole(ZI),endWithErrorWorkflow(Ljava.lang.Exception;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="121,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="284,247">
+ <children xsi:type="editmodel:MethodEditModel" name="BankSetWorkflowEngine" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#BankSetWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setModeConsole" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#setModeConsole(ZI)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initListFils" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#initListFils()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="startTargetFils" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#startTargetFils(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="synchronizeFils" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#synchronizeFils()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="synchronizeFils" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#synchronizeFils(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWithErrorWorkflow" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#endWithErrorWorkflow(Ljava.lang.Exception;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#log(Ljava.lang.String;I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBlockBeforeAll" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#getBlockBeforeAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBlockAfterAll" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#getBlockAfterAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBankAndBlockChild" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#getBankAndBlockChild(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBlockDependsChild" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#getBlockDependsChild(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChild" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#getChild()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.3/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.exe.workflow/WorkflowEngine<-org.inria.biomaj.exe.workflow/BankSetWorkflowEngine" source="//@children.4" target="//@children.5" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="154,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="159,708" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/WorkflowEngine at lThread+org.inria.biomaj.exe.workflow/BankSetWorkflowEngine@" source="//@children.4" target="//@children.5" targetEnd="//@children.4/@sourceConnections.1/@children.2" label="//@children.4/@sourceConnections.1/@children.0" sourceEnd="//@children.4/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="73,0" id="org.inria.biomaj.exe.workflow/WorkflowEngine at lThread+org.inria.biomaj.exe.workflow/BankSetWorkflowEngine@|org.inria.biomaj.exe.workflow/BankSetWorkflowEngine#" attachSource="true" roleLabel="//@children.4/@sourceConnections.1/@children.1/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="275,1136" size="0,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="lThread" location="247,711" id="org.inria.biomaj.exe.workflow/WorkflowEngine at lThread+org.inria.biomaj.exe.workflow/BankSetWorkflowEngine@|org.inria.biomaj.exe.workflow/WorkflowEngine#lThread" multiplicityLabel="//@children.4/@sourceConnections.1/@children.2/@children.1" roleLabel="//@children.4/@sourceConnections.1/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - lThread" location="289,1077" size="47,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="271,1077" size="4,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.4/@sourceConnections.0 //@children.4/@sourceConnections.1 //@children.0/@sourceConnections.0" name="WorkflowEngine" location="35,359" size="321,711" id="org.inria.biomaj.exe.workflow/WorkflowEngine" runTimeClassModel="lockHasBeCheck(Z),tARGET_UNTIL_DEPLOY,getListProcessToRebuild(),runRebuild(),tARGET_SUB_TASK,blockIsExecute(Ljava.lang.String;),isForceForANewUpdate(),runUntilPostProcess(),setBiomajBank(Lorg.inria.biomaj.exe.bank.BiomajBank;),getReference(Ljava.lang.String;),getListBlockProcessToRebuild(),tARGET_DEPLOY,WorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;),runUntilPreProcess(),runUntilDeployment(),tARGET_REBUILD,removeWE(Ljava.lang.String;),getNameLockFile(Ljava.lang.String;),setBlockExecute(Ljava.lang.String;),blockExist(Ljava.lang.String;),runMakeProduction(),isWorkWithCurrentDirectory(),removeBlockExecute(Ljava.lang.String;),getChild(),run(),setCommand(I),addReference(Ljava.lang.String;),tARGET_UNTIL_PREPROCESS,setListProcessToRebuild([Ljava.lang.String;),endWorkflow(),setModeConsole(ZI),runPreProcess(),tARGET_UNTIL_MIRROR,endWithErrorWorkflow(Ljava.lang.Exception;),runUntilMakeProduction(),getCommandStr(),getMapBankNameWE(),tARGET_MIRROR,getCommand(),tARGET_POSTPROCESS,log(Ljava.lang.String;I),runUntilMirror(),getListMetaProcessToRebuild(),setListMetaProcessToRebuild([Ljava.lang.String;),extensionLock,getAllReferences(),runMirror(),synchr(Ljava.lang.String;),tARGET_ALL,getBiomajBank(),setForceForANewUpdate(Z),free(Ljava.lang.String;),workflowIsInstanciate(Ljava.lang.String;),runSubTask(),initWorkflow(),getWorkflow(Ljava.lang.String;),removeAllBlockProcess(),setListBlockProcessToRebuild([Ljava.lang.String;),unlock(),runAll(),setWorkWithCurrentDirectory(Z),tARGET_UNTIL_POSTPROCESS,tARGET_UNTIL_MAKEPROD,tARGET_PREPROCESS,runPostProcess(),getMapBankRef(),runDeployment()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="205,399">
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_ALL" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_ALL"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_UNTIL_PREPROCESS" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_UNTIL_PREPROCESS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_UNTIL_MIRROR" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_UNTIL_MIRROR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_UNTIL_POSTPROCESS" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_UNTIL_POSTPROCESS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_UNTIL_MAKEPROD" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_UNTIL_MAKEPROD"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_UNTIL_DEPLOY" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_UNTIL_DEPLOY"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_SUB_TASK" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_SUB_TASK"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_PREPROCESS" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_PREPROCESS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_MIRROR" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_MIRROR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_POSTPROCESS" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_POSTPROCESS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_DEPLOY" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_DEPLOY"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tARGET_REBUILD" id="org.inria.biomaj.exe.workflow/WorkflowEngine#tARGET_REBUILD"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="extensionLock" id="org.inria.biomaj.exe.workflow/WorkflowEngine#extensionLock"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="349,1064">
+ <children xsi:type="editmodel:MethodEditModel" name="initWorkflow" id="org.inria.biomaj.exe.workflow/WorkflowEngine#initWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWorkflow" id="org.inria.biomaj.exe.workflow/WorkflowEngine#endWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWithErrorWorkflow" id="org.inria.biomaj.exe.workflow/WorkflowEngine#endWithErrorWorkflow(Ljava.lang.Exception;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runAll" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMirror" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runUntilMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMakeProduction" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runUntilMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPostProcess" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runUntilPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPreProcess" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runUntilPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilDeployment" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runUntilDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runRebuild" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runRebuild()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runDeployment" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMirror" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMakeProduction" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcess" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPreProcess" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runSubTask" id="org.inria.biomaj.exe.workflow/WorkflowEngine#runSubTask()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="unlock" id="org.inria.biomaj.exe.workflow/WorkflowEngine#unlock()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBlockExecute" id="org.inria.biomaj.exe.workflow/WorkflowEngine#setBlockExecute(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeBlockExecute" id="org.inria.biomaj.exe.workflow/WorkflowEngine#removeBlockExecute(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeAllBlockProcess" id="org.inria.biomaj.exe.workflow/WorkflowEngine#removeAllBlockProcess()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.exe.workflow/BiomajThread<-org.inria.biomaj.exe.workflow/WorkflowEngine" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="159,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="143,274" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.5" target="//@children.9" targetEnd="//@children.5/@sourceConnections.1/@children.1" sourceEnd="//@children.5/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="321,260" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="133,146"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0" name="BiomajThread" location="330,20" size="287,274" id="org.inria.biomaj.exe.workflow/BiomajThread" runTimeClassModel="BiomajThread(Ljava.lang.String;),setErrorOnWorkflow(Z),lockWorkflow,isErrorOnWorkflow(),release(),threadName,setThreadName(Ljava.lang.String;),errorOnWorkflow,synchr(),getThreadName()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="146,57">
+ <children xsi:type="editmodel:AttributeEditModel" name="errorOnWorkflow" id="org.inria.biomaj.exe.workflow/BiomajThread#errorOnWorkflow"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lockWorkflow" id="org.inria.biomaj.exe.workflow/BiomajThread#lockWorkflow"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="threadName" id="org.inria.biomaj.exe.workflow/BiomajThread#threadName"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="264,133">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajThread" id="org.inria.biomaj.exe.workflow/BiomajThread#BiomajThread(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getThreadName" id="org.inria.biomaj.exe.workflow/BiomajThread#getThreadName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isErrorOnWorkflow" id="org.inria.biomaj.exe.workflow/BiomajThread#isErrorOnWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="release" id="org.inria.biomaj.exe.workflow/BiomajThread#release()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErrorOnWorkflow" id="org.inria.biomaj.exe.workflow/BiomajThread#setErrorOnWorkflow(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setThreadName" id="org.inria.biomaj.exe.workflow/BiomajThread#setThreadName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="synchr" id="org.inria.biomaj.exe.workflow/BiomajThread#synchr()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="VirtualBankWorkflowEngine" location="607,1630" size="280,369" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine" runTimeClassModel="runUntilMirror(),runMakeProduction(),runRebuild(),initWorkflow(),VirtualBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;),runUntilPostProcess(),endWorkflow(),runAll(),runUntilPreProcess(),runUntilDeployment(),runPreProcess(),runPostProcess(),runUntilMakeProduction(),runMirror(),runDeployment()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="257,285">
+ <children xsi:type="editmodel:MethodEditModel" name="VirtualBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#VirtualBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWorkflow" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#endWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initWorkflow" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#initWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runAll" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runDeployment" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMakeProduction" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMirror" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcess" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPreProcess" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runRebuild" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runRebuild()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilDeployment" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runUntilDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMakeProduction" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runUntilMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMirror" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runUntilMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPostProcess" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runUntilPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPreProcess" id="org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine#runUntilPreProcess()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine<-org.inria.biomaj.exe.workflow/VirtualBankWorkflowEngine" source="//@children.7" target="//@children.8/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="140,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ComputedBankWorkflowEngine" location="80,1630" size="497,559" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine" runTimeClassModel="runPostProcessFils(),log(Ljava.lang.String;I),runUntilMirror(),runRebuild(),setRemoteBankWorkflowEngine(Lorg.inria.biomaj.exe.workflow.RemoteBankWorkflowEngine;),runUntilPostProcess(),getRemoteBankWorkflowEngine(),runUntilPreProcess(),runUntilDeployment(),runMirror(),ComputedBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;),runMakeProduction(),initWorkflow(),remoteBankWorkflowEngine,runPostProcessBeforeAll(),setCommand(I),computeRemoteDirectory(),runAll(),endWorkflow(),setModeConsole(ZI),runPreProcess(),runPostProcess(),runUntilMakeProduction(),endWithErrorWorkflow(Ljava.lang.Exception;),runDeployment()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="299,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="remoteBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#remoteBankWorkflowEngine"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="474,456">
+ <children xsi:type="editmodel:MethodEditModel" name="ComputedBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#ComputedBankWorkflowEngine(Lorg.inria.biomaj.exe.bank.BiomajBank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="computeRemoteDirectory" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#computeRemoteDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWithErrorWorkflow" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#endWithErrorWorkflow(Ljava.lang.Exception;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="endWorkflow" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#endWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#getRemoteBankWorkflowEngine()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initWorkflow" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#initWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#log(Ljava.lang.String;I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runAll" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runDeployment" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMakeProduction" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runMirror" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcess" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcessBeforeAll" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runPostProcessBeforeAll()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPostProcessFils" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runPostProcessFils()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runPreProcess" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runRebuild" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runRebuild()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilDeployment" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runUntilDeployment()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMakeProduction" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runUntilMakeProduction()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilMirror" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runUntilMirror()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPostProcess" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runUntilPostProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="runUntilPreProcess" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#runUntilPreProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setCommand" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#setCommand(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setModeConsole" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#setModeConsole(ZI)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoteBankWorkflowEngine" id="org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine#setRemoteBankWorkflowEngine(Lorg.inria.biomaj.exe.workflow.RemoteBankWorkflowEngine;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.exe.workflow/BankSetWorkflowEngine<-org.inria.biomaj.exe.workflow/ComputedBankWorkflowEngine" source="//@children.8" target="//@children.4" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="248,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="154,329" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.5/@sourceConnections.1" location="770,150" size="515,146" fontInfo="Arial-8-0" note="Diagramme de classe du moteur de workflow

Pour chaque type de banque instancié, on associe un moteur de workflow qui derive de 
WorkflowEngine. Ce WorkflowEngine est un thread qui peut executer des taches precises du workflow: 
preprocessing, mirror, postprocessing, deployement.


"/>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.2/@sourceConnections.1" location="1260,310" size="494,61" fontInfo="Arial-8-0" note="La gestion des post-processus est une partie a part entiere dans l execution du workflow.
Cette classe permet d'executer l'ensemble des postprocessus en fonction des sessions anterieures 
ainsi que des dependances de fichiers generes."/>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.2 //@children.15/@sourceConnections.0" name="BiomajProcessListenerHandler" location="1590,430" size="427,369" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler" runTimeClassModel="pl,subBuildFinished(Lorg.apache.tools.ant.BuildEvent;),setErrorOnCurrentProcess(),targetFinished(Lorg.apache.tools.ant.BuildEvent;),BiomajProcessListenerHandler(Lorg.inria.biomaj.session.bank.Bank;),handleProcessContext(Lorg.apache.tools.ant.BuildEvent;),taskFinished(Lorg.apache.tools.ant.BuildEvent;),setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;),bank,buildStarted(Lorg.apache.tools.ant.BuildEvent;),messageLogged(Lorg.apache.tools.ant.BuildEvent;),subBuildStarted(Lorg.apache.tools.ant.BuildEvent;),throwException(Lorg.apache.tools.ant.BuildEvent;Lorg.inria.biomaj.utils.BiomajException;),buildFinished(Lorg.apache.tools.ant.BuildEvent;),getMetaProcess(),taskStarted(Lorg.apache.tools.ant.BuildEvent;),targetStarted(Lorg.apache.tools.ant.BuildEvent;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="299,285">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajProcessListenerHandler" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#BiomajProcessListenerHandler(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildFinished" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#buildFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildStarted" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#buildStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcess" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#getMetaProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="handleProcessContext" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#handleProcessContext(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="messageLogged" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#messageLogged(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErrorOnCurrentProcess" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#setErrorOnCurrentProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setMetaProcess" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#setMetaProcess(Lorg.inria.biomaj.session.process.MetaProcess;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildFinished" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#subBuildFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildStarted" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#subBuildStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="targetFinished" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#targetFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="targetStarted" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#targetStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="taskFinished" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#taskFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="taskStarted" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#taskStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="throwException" id="org.inria.biomaj.ant.logger/BiomajProcessListenerHandler#throwException(Lorg.apache.tools.ant.BuildEvent;Lorg.inria.biomaj.utils.BiomajException;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.17/@sourceConnections.0 //@children.2/@sourceConnections.4" name="MetaProcess" location="1670,930" size="391,426" id="org.inria.biomaj.session.process/MetaProcess" runTimeClassModel="setStart(Ljava.util.Date;),getName(),getWarn(),setWarn(Ljava.util.Vector;),getBlock(),getStatusStr(),getListProcess(),setLogFile(Ljava.lang.String;),getLogFile(),setListProcess(Ljava.util.Vector;),setErr(Ljava.util.Vector;),setName(Ljava.lang.String;),getStart(),setBlock(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;),getEnd(),setEnd(Ljava.util.Date;),getErr()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="84,95"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="155,342">
+ <children xsi:type="editmodel:MethodEditModel" name="getErr" id="org.inria.biomaj.session.process/MetaProcess#getErr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWarn" id="org.inria.biomaj.session.process/MetaProcess#getWarn()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.process/MetaProcess#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.process/MetaProcess#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.process/MetaProcess#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.process/MetaProcess#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListProcess" id="org.inria.biomaj.session.process/MetaProcess#getListProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getName" id="org.inria.biomaj.session.process/MetaProcess#getName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatusStr" id="org.inria.biomaj.session.process/MetaProcess#getStatusStr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.process/MetaProcess#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogFile" id="org.inria.biomaj.session.process/MetaProcess#getLogFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBlock" id="org.inria.biomaj.session.process/MetaProcess#getBlock()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBlock" id="org.inria.biomaj.session.process/MetaProcess#setBlock(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWarn" id="org.inria.biomaj.session.process/MetaProcess#setWarn(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setListProcess" id="org.inria.biomaj.session.process/MetaProcess#setListProcess(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setName" id="org.inria.biomaj.session.process/MetaProcess#setName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErr" id="org.inria.biomaj.session.process/MetaProcess#setErr(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogFile" id="org.inria.biomaj.session.process/MetaProcess#setLogFile(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.1 //@children.14/@sourceConnections.0" name="BiomajMirrorListenerHandler" location="1730,1350" size="415,369" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler" runTimeClassModel="startPostProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;Ljava.lang.String;),BiomajMirrorListenerHandler(),subBuildFinished(Lorg.apache.tools.ant.BuildEvent;),targetFinished(Lorg.apache.tools.ant.BuildEvent;),finishedPostProcess(Lorg.apache.tools.ant.Project;),finishedPreProcess(Lorg.apache.tools.ant.Project;),taskFinished(Lorg.apache.tools.ant.BuildEvent;),buildStarted(Lorg.apache.tools.ant.BuildEvent;),mirrorContext(Lorg.apache.tools.ant.BuildEvent;),messageLogged(Lorg.apache.tools.ant.BuildEvent;),subBuildStarted(Lorg.apache.tools.ant.BuildEvent;),bankLogger,startPreProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;),buildFinished(Lorg.apache.tools.ant.BuildEvent;),taskStarted(Lorg.apache.tools.ant.BuildEvent;),targetStarted(Lorg.apache.tools.ant.BuildEvent;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="383,285">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajMirrorListenerHandler" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#BiomajMirrorListenerHandler()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildFinished" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#buildFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildStarted" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#buildStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="finishedPostProcess" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#finishedPostProcess(Lorg.apache.tools.ant.Project;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="finishedPreProcess" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#finishedPreProcess(Lorg.apache.tools.ant.Project;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="messageLogged" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#messageLogged(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="mirrorContext" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#mirrorContext(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="startPostProcess" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#startPostProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="startPreProcess" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#startPreProcess(Lorg.apache.tools.ant.Project;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildFinished" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#subBuildFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="subBuildStarted" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#subBuildStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="targetFinished" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#targetFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="targetStarted" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#targetStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="taskFinished" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#taskFinished(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="taskStarted" id="org.inria.biomaj.ant.logger/BiomajMirrorListenerHandler#taskStarted(Lorg.apache.tools.ant.BuildEvent;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1420,1290" size="401,27" fontInfo="Arial-8-0" note="Un listener Ant est attache au fichier mirror.xml pendant l'execution du workflow">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.14" target="//@children.13" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="355,27" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="45,33"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1840,344" size="482,27" fontInfo="Arial-8-0" note="Un listener Ant est attache au fichier handle_process.xml pendant l'execution des post-processus">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.15" target="//@children.11" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="88,27" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="338,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.3 //@children.18/@sourceConnections.0" name="Bank" location="1590,1830" size="509,1338" id="org.inria.biomaj.session.bank/Bank" runTimeClassModel="getId(),addLocalOnlineFile(Ljava.lang.String;),getGeneratedFiles(Lorg.apache.tools.ant.Project;Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),addErrProcess(Ljava.lang.String;Ljava.lang.String;),getWorkflowInfoSizeRelease(),getWorkflowInfoSizeDownload(),fillWithDirectoryVersion(Ljava.lang.String;),setWorkflowInfoSizeDownload(J),Bank(),getStatus(),getWorkflowInfoProductionDir(),getWorkflowInfoRelease(),getBandWidth(),getStart(),addFilesInProduction(Ljava.lang.String;Ljava.lang.String;Z),getWorkflowInfoIsDeployed(),setWorkflowInfoProductionDir(Ljava.lang.String;),getNbFilesLocalOnline(),findDependancesFilesFromExtraction(Ljava.lang.String;),getConfig(),getAllMetaProcessFromPhasePostprocess(Ljava.lang.String;),setLogFile(Ljava.lang.String;),setUpdate(Z),addWarnProcess(Ljava.lang.String;Ljava.lang.String;),setListOldSession(Ljava.util.Vector;),getErrorOnWorkflow(),needANewCycleUpdate(Lorg.apache.tools.ant.BuildEvent;),getAllMetaProcessFromPhasePreprocess(),setEnd(Ljava.util.Date;),setEndProcess(Ljava.lang.String;),getCurrentSession(),getListOldSession(),addFilesInExtraction(Ljava.lang.String;Ljava.lang.String;),workflowTaskEverPast(I),findFile(Ljava.lang.String;JJI),addLocalOfflineFile(Ljava.lang.String;),setCurrentSession(Lorg.inria.biomaj.session.bank.Session;),setBankStateListProductionDirectories(Ljava.util.Vector;),getAllMetaprocess(),getAvailableMetaProcess(I),getAvailableProcess(I),isUpdate(),setWorkflowInfoRelease(Ljava.lang.String;),getNbFilesDownloaded(),setRelease(Ljava.lang.String;),addDownloadFile(Ljava.lang.String;JJ),getNbFilesLocalOffline(),setOnlineDirectory(Ljava.lang.String;),setBankSize(Ljava.lang.Long;),getEnd(),setStart(Ljava.util.Date;),getLastMetaProcessExecuted(Ljava.lang.String;Ljava.lang.String;),setConfig(Lorg.inria.biomaj.session.bank.Configuration;),setStartProcess(Ljava.lang.String;),addProductionDirectory(Ljava.lang.String;),setErrorOnWorkflow(Ljava.lang.Boolean;),getProcessRuntime(Ljava.lang.String;),setBankToRebuild(Lorg.inria.biomaj.session.bank.Bank;),setWorkflowInfoIsDeployed(Ljava.lang.Boolean;),fill(Lorg.w3c.dom.Node;Z),removeProductionDirectory(Ljava.lang.String;),setWorkflowInfoSizeRelease(J),setId(Ljava.lang.Long;),getLogFile(),getIdProcess(Ljava.lang.String;),getBankStateListProductionDirectories()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="486,1254">
+ <children xsi:type="editmodel:MethodEditModel" name="Bank" id="org.inria.biomaj.session.bank/Bank#Bank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRelease" id="org.inria.biomaj.session.bank/Bank#setRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setOnlineDirectory" id="org.inria.biomaj.session.bank/Bank#setOnlineDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogFile" id="org.inria.biomaj.session.bank/Bank#getLogFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankSize" id="org.inria.biomaj.session.bank/Bank#setBankSize(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStartProcess" id="org.inria.biomaj.session.bank/Bank#setStartProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessRuntime" id="org.inria.biomaj.session.bank/Bank#getProcessRuntime(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addWarnProcess" id="org.inria.biomaj.session.bank/Bank#addWarnProcess(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addErrProcess" id="org.inria.biomaj.session.bank/Bank#addErrProcess(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFilesInExtraction" id="org.inria.biomaj.session.bank/Bank#addFilesInExtraction(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFilesInProduction" id="org.inria.biomaj.session.bank/Bank#addFilesInProduction(Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addDownloadFile" id="org.inria.biomaj.session.bank/Bank#addDownloadFile(Ljava.lang.String;JJ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addLocalOfflineFile" id="org.inria.biomaj.session.bank/Bank#addLocalOfflineFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addLocalOnlineFile" id="org.inria.biomaj.session.bank/Bank#addLocalOnlineFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getIdProcess" id="org.inria.biomaj.session.bank/Bank#getIdProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCurrentSession" id="org.inria.biomaj.session.bank/Bank#getCurrentSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getConfig" id="org.inria.biomaj.session.bank/Bank#getConfig()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addProductionDirectory" id="org.inria.biomaj.session.bank/Bank#addProductionDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeProductionDirectory" id="org.inria.biomaj.session.bank/Bank#removeProductionDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBankStateListProductionDirectories" id="org.inria.biomaj.session.bank/Bank#getBankStateListProductionDirectories()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableProcess" id="org.inria.biomaj.session.bank/Bank#getAvailableProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableMetaProcess" id="org.inria.biomaj.session.bank/Bank#getAvailableMetaProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.bank/Bank#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListOldSession" id="org.inria.biomaj.session.bank/Bank#getListOldSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.bank/Bank#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.bank/Bank#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setListOldSession" id="org.inria.biomaj.session.bank/Bank#setListOldSession(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogFile" id="org.inria.biomaj.session.bank/Bank#setLogFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEndProcess" id="org.inria.biomaj.session.bank/Bank#setEndProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.bank/Bank#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoIsDeployed" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoIsDeployed()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoIsDeployed" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoIsDeployed(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoProductionDir" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoProductionDir()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoProductionDir" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoProductionDir(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoRelease" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoRelease" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/Bank#fill(Lorg.w3c.dom.Node;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillWithDirectoryVersion" id="org.inria.biomaj.session.bank/Bank#fillWithDirectoryVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.inria.biomaj.session.bank/Bank#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.inria.biomaj.session.bank/Bank#setId(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="workflowTaskEverPast" id="org.inria.biomaj.session.bank/Bank#workflowTaskEverPast(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isUpdate" id="org.inria.biomaj.session.bank/Bank#isUpdate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUpdate" id="org.inria.biomaj.session.bank/Bank#setUpdate(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.session.bank/Bank#getStatus()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoSizeRelease" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoSizeRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoSizeRelease" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoSizeRelease(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesDownloaded" id="org.inria.biomaj.session.bank/Bank#getNbFilesDownloaded()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOnline" id="org.inria.biomaj.session.bank/Bank#getNbFilesLocalOnline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOffline" id="org.inria.biomaj.session.bank/Bank#getNbFilesLocalOffline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBandWidth" id="org.inria.biomaj.session.bank/Bank#getBandWidth()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getErrorOnWorkflow" id="org.inria.biomaj.session.bank/Bank#getErrorOnWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErrorOnWorkflow" id="org.inria.biomaj.session.bank/Bank#setErrorOnWorkflow(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoSizeDownload" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoSizeDownload()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcessFromPhasePreprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaProcessFromPhasePreprocess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankStateListProductionDirectories" id="org.inria.biomaj.session.bank/Bank#setBankStateListProductionDirectories(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setConfig" id="org.inria.biomaj.session.bank/Bank#setConfig(Lorg.inria.biomaj.session.bank.Configuration;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="needANewCycleUpdate" id="org.inria.biomaj.session.bank/Bank#needANewCycleUpdate(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoSizeDownload" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoSizeDownload(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcessFromPhasePostprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaProcessFromPhasePostprocess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="findFile" id="org.inria.biomaj.session.bank/Bank#findFile(Ljava.lang.String;JJI)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="findDependancesFilesFromExtraction" id="org.inria.biomaj.session.bank/Bank#findDependancesFilesFromExtraction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankToRebuild" id="org.inria.biomaj.session.bank/Bank#setBankToRebuild(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastMetaProcessExecuted" id="org.inria.biomaj.session.bank/Bank#getLastMetaProcessExecuted(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaprocess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setCurrentSession" id="org.inria.biomaj.session.bank/Bank#setCurrentSession(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getGeneratedFiles" id="org.inria.biomaj.session.bank/Bank#getGeneratedFiles(Lorg.apache.tools.ant.Project;Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1354,850" size="467,27" fontInfo="Arial-8-0" note="Un objet MetaProcess est alimente afin de mettre a jour le fichier d'etat a traver le listener Ant">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.17" target="//@children.12" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="391,27" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="75,17"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1299,2161" size="234,61" fontInfo="Arial-8-0" note="Un objet Bank est alimente afin de mettre a
 jour le fichier d etat a travers un listener Ant
">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.18" target="//@children.16" targetEnd="//@children.18/@sourceConnections.0/@children.1" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="160,30" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,361"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1220,640" size="330,44" fontInfo="Arial-8-0" note="ProcessSequentielHandler et RemoteWorkflowEngine manipule 
un script Ant pour l'execution des sous-taches">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.19" target="//@children.1" targetEnd="//@children.19/@sourceConnections.0/@children.1" sourceEnd="//@children.19/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="136,44" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="156,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="540,833" size="395,44" fontInfo="Arial-8-0" note="Les creation d'un workflow se font par cet objet. Apres instanciation d'un objet 
BiomajBank (mapping du fichier de propriete), Le workflow adapté est créee.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.20" target="//@children.0" targetEnd="//@children.20/@sourceConnections.0/@children.1" sourceEnd="//@children.20/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="219,44" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="152,0"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of BioMAJ Workflows (Remote Bank, Banks set,Dependances Bank).
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/rebuild_workflow.uad
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/rebuild_workflow.uad (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/rebuild_workflow.uad 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ActivityDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="rebuild_workflow" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.1/@sourceConnections.0" location="465,140" size="91,31" itemName="init"/>
+ <children xsi:type="editmodel:StartEditModel" location="500,60" size="21,21">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.1" target="//@children.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" label="//@children.1/@sourceConnections.0/@children.2" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="10,21" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="45,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="610,142" size="269,27" fontInfo="Arial-8-0" note="Chargement du context de la version a reconstruire"/>
+ <diagramOptions xsi:type="options:ActivityDiagramOptions" level="0" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+</editmodel:ActivityDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/workflow_simple.uad
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/workflow_simple.uad (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/exe/workflow/workflow_simple.uad 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ActivityDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="workflow_simple" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332042696F6D616A5F4E564D">
+ <children xsi:type="editmodel:ActivityEditModel" location="493,40" size="207,27" itemName="initSynchronizeLocalAndRemoteBank">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.0" target="//@children.2" targetEnd="//@children.0/@sourceConnections.0/@children.1" label="//@children.0/@sourceConnections.0/@children.2" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="110,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.1/@children.1" label="//@children.0/@sourceConnections.1/@children.2" sourceEnd="//@children.0/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="105,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="250,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.0/@sourceConnections.1" location="254,110" size="286,27" itemName="listingLocalFlatDirectoryFromDirectoryBankProduction">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.1" target="//@children.3" targetEnd="//@children.1/@sourceConnections.0/@children.1" label="//@children.1/@sourceConnections.0/@children.2" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeLocal" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="145,26" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="51,-1"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeLocal)" location="454,169" size="51,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="-9.392976565111574" distanceFromWire="-18.242039119771256" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.0/@sourceConnections.0" location="676,110" size="262,27" itemName="listingRemoteCompressedFlatDirectoryOnServer">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.2" target="//@children.3" targetEnd="//@children.2/@sourceConnections.0/@children.1" label="//@children.2/@sourceConnections.0/@children.2" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeRemote" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="87,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="62,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeRemote)" size="64,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0" location="539,189" size="100,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.3" target="//@children.4" targetEnd="//@children.3/@sourceConnections.0/@children.1" label="//@children.3/@sourceConnections.0/@children.2" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeLocal,listeRemote" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="50,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="88,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeLocal,listeRemote)" size="110,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.3/@sourceConnections.0" location="501,249" size="176,27" itemName="compareRemoteAndLocalFiles">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.4" target="//@children.5" targetEnd="//@children.4/@sourceConnections.0/@children.1" label="//@children.4/@sourceConnections.0/@children.2" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeDownload" condition="remote.file.date>local.file.date" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="23,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="94,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeDownload) [remote.file.date>local.file.date]" location="356,381" size="224,17" fontInfo="Arial-8-0" automaticRelocationAllowed="false" locationOnWireFromSource="87.0" distanceFromWire="-55.000000000000014" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.4" target="//@children.6" targetEnd="//@children.4/@sourceConnections.1/@children.1" label="//@children.4/@sourceConnections.1/@children.2" sourceEnd="//@children.4/@sourceConnections.1/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="listeExtract" condition="remote.file.date<local.file.date" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="161,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="13,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" name="(listeExtract) [remote.file.date<local.file.date]" size="209,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.4/@sourceConnections.0" location="430,329" size="118,27" itemName="doanloadNewFiles">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.5" target="//@children.7" targetEnd="//@children.5/@sourceConnections.0/@children.1" label="//@children.5/@sourceConnections.0/@children.2" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="58,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="88,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.4/@sourceConnections.1" location="648,410" size="52,27" itemName="copy">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.6" target="//@children.8" targetEnd="//@children.6/@sourceConnections.0/@children.1" label="//@children.6/@sourceConnections.0/@children.2" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="20,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="54,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.5/@sourceConnections.0" location="400,410" size="184,27" itemName="UncompressedFilesDownloaded">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" source="//@children.7" target="//@children.8" targetEnd="//@children.7/@sourceConnections.0/@children.1" label="//@children.7/@sourceConnections.0/@children.2" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="89,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="49,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ForkJoinEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.6/@sourceConnections.0" location="562,500" size="100,8" vertical="false">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.8" target="//@children.9" targetEnd="//@children.8/@sourceConnections.0/@children.1" label="//@children.8/@sourceConnections.0/@children.2" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="49,8" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="74,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.8/@sourceConnections.0" location="537,560" size="137,27" itemName="executeAllPostProcess">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.9" target="//@children.11" targetEnd="//@children.9/@sourceConnections.0/@children.1" label="//@children.9/@sourceConnections.0/@children.2" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="68,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="78,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:EndEditModel" targetConnections="//@children.11/@sourceConnections.0" location="563,690" size="86,31" itemName="End Workflow"/>
+ <children xsi:type="editmodel:ActivityEditModel" targetConnections="//@children.9/@sourceConnections.0" location="527,630" size="157,27" itemName="CreateProductionDirectory">
+ <sourceConnections xsi:type="editmodel:TransitionEditModel" autoLocated="true" source="//@children.11" target="//@children.10" targetEnd="//@children.11/@sourceConnections.0/@children.1" label="//@children.11/@sourceConnections.0/@children.2" sourceEnd="//@children.11/@sourceConnections.0/@children.0" connectionRouterKind="Manual" eventName="" eventArgument="" condition="" action="">
+ <children xsi:type="editmodel:StateEndEditModel" location="78,27" attachSource="true"/>
+ <children xsi:type="editmodel:StateEndEditModel" location="42,0"/>
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ActivityDiagramOptions" level="0" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+</editmodel:ActivityDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/FtpImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/FtpImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/FtpImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,443 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.SocketException;
+import java.util.Random;
+import java.util.Vector;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.net.ftp.FTP;
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPClientConfig;
+import org.apache.commons.net.ftp.FTPConnectionClosedException;
+import org.apache.commons.net.ftp.FTPFile;
+import org.apache.commons.net.ftp.FTPFileEntryParser;
+import org.apache.commons.net.ftp.FTPReply;
+import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
+import org.apache.commons.net.ftp.parser.ParserInitializationException;
+import org.apache.commons.net.ftp.parser.UnixFTPEntryParser;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class FtpImpl extends RemoteCommandImpl {
+
+ private static final int CONNEX_TIME_OUT_STATIC = 100000;
+
+
+ private boolean activeMode = false ;
+ /**
+ * @uml.property name="cONNEX_TIME_OUT"
+ */
+ private int CONNEX_TIME_OUT = CONNEX_TIME_OUT_STATIC;
+
+ private static final int NB_TRY_STATIC = 5;
+
+ /**
+ * @uml.property name="nB_TRY"
+ */
+ private int NB_TRY = NB_TRY_STATIC;
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server ;
+
+ /**
+ * @uml.property name="port"
+ */
+ private int port ;
+
+ /**
+ * @uml.property name="username"
+ */
+ private String username ;
+
+ /**
+ * @uml.property name="password"
+ */
+ private String password ;
+
+ /**
+ * @uml.property name="client"
+ * @uml.associationEnd
+ */
+ private FTPClient client;
+
+ private int currentReconnectionTries = 0;
+ private static final int MAX_RECONNECTION_TRIES = 3;
+
+ public FtpImpl(Task task) {
+ super(task);
+ }
+
+ @Override
+ public void init(String server, Integer port, String username, String password) throws BiomajBuildException {
+ super.init(server,port,username,password);
+ this.server = server;
+ this.port = port ;
+ this.username = username ;
+ this.password = password;
+
+ if (getTask().getProject().getProperties().containsKey(BiomajConst.ftpActiveMode)) {
+ activeMode = Boolean.valueOf(getTask().getProject().getProperty(BiomajConst.ftpActiveMode)) ;
+ }
+
+ //Initialisation du parametrage du ftp
+ if (getTask().getProject().getProperties().containsKey(BiomajConst.ftpTimeOut))
+ {
+ try {
+ CONNEX_TIME_OUT = Integer.valueOf(getTask().getProject().getProperty(BiomajConst.ftpTimeOut));
+
+ if ((CONNEX_TIME_OUT!=-1)&&(CONNEX_TIME_OUT<0)) {
+ log("Bad value for ["+BiomajConst.ftpTimeOut+":"+getTask().getProject().getProperties().get(BiomajConst.ftpTimeOut)+"] has to be positive or -1.",Project.MSG_WARN);
+ CONNEX_TIME_OUT = CONNEX_TIME_OUT_STATIC;
+ }
+
+
+ } catch (NumberFormatException nf) {
+ log("Bad value for ["+BiomajConst.ftpTimeOut+":"+getTask().getProject().getProperties().get(BiomajConst.ftpTimeOut)+"]",Project.MSG_WARN);
+ CONNEX_TIME_OUT = CONNEX_TIME_OUT_STATIC;
+ }
+ }
+
+ if (getTask().getProject().getProperties().containsKey(BiomajConst.ftpTriesConnexion))
+ {
+ try {
+ NB_TRY = Integer.valueOf(getTask().getProject().getProperty(BiomajConst.ftpTriesConnexion));
+
+ if (NB_TRY<0)
+ {
+ log("Bad value for ["+BiomajConst.ftpTriesConnexion+":"+getTask().getProject().getProperties().get(BiomajConst.ftpTriesConnexion)+"] has to be positive.",Project.MSG_WARN);
+ NB_TRY = NB_TRY_STATIC;
+ }
+
+ } catch (NumberFormatException nf) {
+ log("Bad value for ["+BiomajConst.ftpTriesConnexion+":"+getTask().getProject().getProperties().get(BiomajConst.ftpTriesConnexion)+"]",Project.MSG_WARN);
+ NB_TRY = NB_TRY_STATIC;
+ }
+ }
+
+ connect();
+ }
+
+ public void connect() throws BiomajBuildException {
+ class MyFTPFileEntryParserFactoryWhenSystemNameIsNull implements FTPFileEntryParserFactory {
+ public FTPFileEntryParser createFileEntryParser(String key)
+ throws ParserInitializationException {
+ return new UnixFTPEntryParser();
+
+ }
+ public FTPFileEntryParser createFileEntryParser(FTPClientConfig config)
+ throws ParserInitializationException {
+ return new UnixFTPEntryParser();
+ }
+
+ } ;
+ try {
+ client = new FTPClient();
+// if (CONNEX_TIME_OUT>0)
+// client.setDefaultTimeout(CONNEX_TIME_OUT);
+ int tries= 0;
+ boolean isOk = false ;
+ Exception e = null ;
+ while (tries++ < NB_TRY && !isOk) {
+// try {
+ client.connect(server, port);
+ //checkFtpCode(client);
+
+ if (!client.login(username, password)) {
+ throw new BiomajBuildException(getTask().getProject(),"ftp.loggin.error",client.getReplyString(),new Exception());
+ }
+
+ if (client.getSystemName()==null) {
+// use parserKey,pathName method signature
+ client.setParserFactory(new MyFTPFileEntryParserFactoryWhenSystemNameIsNull());
+ }
+
+ if (!activeMode) {
+ client.enterLocalPassiveMode();
+ log("Changed to passive mode.",Project.MSG_VERBOSE);
+ }
+
+ isOk = true;
+
+// } catch (SocketTimeoutException ste) {
+// log("** connect() ERROR:SOCKETTIMEOUTEXCEPTION **", Project.MSG_VERBOSE);
+// log("try to reconect on the server:"+server,Project.MSG_VERBOSE);
+// e = ste ;
+// }
+ }
+ if (!isOk) {
+ if (e != null)
+ throw new BiomajBuildException(getTask().getProject(),"remote.error.autoreconnect",Integer.toString(NB_TRY),e);
+ else
+ throw new BiomajBuildException(getTask().getProject(),"remote.error.autoreconnect",Integer.toString(NB_TRY),null);
+ }
+ /*
+ if (!client.login(username, password)) {
+ throw new BiomajBuildException(getTask().getProject(),"ftp.loggin.error",client.getReplyString(),new Exception());
+ }*/
+ } catch (SocketException exSoc) {
+ throw new BiomajBuildException(getTask().getProject(),"ftp.socket.error",exSoc.toString(),exSoc);
+ } catch (IOException exIo) {
+ throw new BiomajBuildException(getTask().getProject(),"io.error",exIo.toString(),exIo);
+ }
+
+ }
+
+
+ @Override
+ public void disconnect() {
+ if (client == null)
+ return;
+ if(client.isConnected()) {
+ try {
+ client.disconnect();
+ } catch(IOException ioe) {
+ getTask().getProject().log("Can't disconnect from server : "+ioe.getMessage(),Project.MSG_VERBOSE);
+ }
+ }
+ }
+
+ /**
+ * Get a remote file
+ * @param remoteDirectory : directory to find file
+ * @param nameFile : file to download
+ * @param targetDirectory : local directory where the file will be stored
+ * @param targetName : file name in the local directory
+ * @return
+ */
+ @Override
+ protected boolean getFileWithImpl(String remoteDirectory,String nameFile,String targetDirectory,String targetName) throws BiomajBuildException {
+
+ boolean isOk=false;
+ remoteDirectory = checkRemoteDirectory(remoteDirectory) ;
+ try {
+ // If connection was somehow lost, try to reconnect
+ int reply = client.getReplyCode();
+ while (!FTPReply.isPositiveCompletion(reply) && currentReconnectionTries++ < MAX_RECONNECTION_TRIES) {
+ log("FTP wrong reply code. Try to reconnect", Project.MSG_WARN);
+ disconnect();
+ Random rand = new Random();
+ int wait = 100 + rand.nextInt(400); // Wait between 100 and 500
+ TimeUnit.MILLISECONDS.sleep(wait);
+ connect();
+ reply = client.getReplyCode();
+ }
+ // If could not reconnect, stop
+ if (currentReconnectionTries >= MAX_RECONNECTION_TRIES)
+ throw new BiomajBuildException(getTask().getProject(), "remote.error.connection.closed", new Exception("Maximum number of attempts reached for file " + nameFile));
+
+ FileOutputStream fileStream = new FileOutputStream(targetDirectory+"/"+targetName);
+ client.changeWorkingDirectory(remoteDirectory);
+// Bug O.F 21/09/2006 deafult mode is ASCII
+ client.setFileType(FTP.BINARY_FILE_TYPE);
+
+ isOk=client.retrieveFile(nameFile,fileStream);
+
+ fileStream.close();
+ } catch (FTPConnectionClosedException ex) {
+ throw new BiomajBuildException(getTask().getProject(),"remote.error.connection.closed",ex.getMessage(),ex);
+
+ } catch (Throwable ex) {
+ throw new BiomajBuildException(getTask().getProject(),ex);
+
+ }
+ return isOk;
+ }
+
+
+
+/*
+ private void checkFtpCode(FTPClient ftp) throws BiomajBuildException {
+ if(!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
+ throw new BiomajBuildException(getTask().getProject(),"ftp.error",ftp.getReplyString(),new Exception());
+ }
+ }
+*/
+
+ private Vector<RemoteFile> list(String base, String directoryToApplyLs,boolean matchFile) throws BiomajBuildException {
+ base = checkRemoteDirectory(base) ;
+ log("methode list : base ["+base+"] directoryToApplyLs ["+directoryToApplyLs+"] matchFile ["+Boolean.valueOf(matchFile)+"]",Project.MSG_VERBOSE);
+ Vector<RemoteFile> remoteFiles = new Vector<RemoteFile>();
+
+ int tentative = 0 ;
+
+ while ( tentative++ < NB_TRY ) {
+ try {
+ //checkFtpCode(client);
+ log("Listing FTP files", Project.MSG_DEBUG);
+ String ref = base+"/"+directoryToApplyLs;
+ log("change directory:["+ref+"]", Project.MSG_DEBUG);
+ client.changeWorkingDirectory(ref);
+ FTPFile[] list = client.listFiles();
+
+ //Si c est un lien, on doit determiner si c est un fichier ou un repertoire
+
+ for (int i=0;i<list.length;i++) {
+ if (list[i]==null)
+ continue;
+ if (isFile(ref,list[i])==matchFile) {
+ log("add remote file:["+list[i].getName()+"]", Project.MSG_DEBUG);
+ remoteFiles.add(new RemoteFile(directoryToApplyLs,client,list[i]));
+ }
+ }
+
+ return remoteFiles;
+
+ } catch(IOException ioe) {
+ log("** list() ERROR:IOEXCEPTION **", Project.MSG_VERBOSE);
+ log("MESSAGE:"+ioe.getMessage(), Project.MSG_DEBUG);
+
+ if(client.isConnected()) {
+ try {
+ client.disconnect();
+ } catch(IOException iof) {
+ log(iof.getMessage(),Project.MSG_VERBOSE);
+ //throw new BiomajBuildException(getTask().getProject(),"remote.error.connect",client.getPassiveHost().toString() + ioe.getMessage(),iof);
+ }
+ }
+
+ log(ioe.getMessage(),Project.MSG_VERBOSE);
+ connect();
+ //throw new BiomajBuildException(getTask().getProject(),"remote.error.connect",client.getPassiveHost().toString() + ioe.getMessage(),new Exception());
+ }
+ catch (BiomajBuildException n) {
+ throw n;
+ }
+ catch (BiomajException n) {
+ throw new BiomajBuildException(getTask().getProject(),n);
+ }
+ catch (Exception e) {
+ log("Exception throwable :"+e.getMessage(), Project.MSG_ERR);
+ for (StackTraceElement s : e.getStackTrace()) {
+ log(s.toString(),Project.MSG_VERBOSE);
+ }
+ throw new BiomajBuildException(getTask().getProject(),e);
+ }
+ catch (Throwable t) {
+ log("Exception throwable :"+t.getMessage(), Project.MSG_ERR);
+ for (StackTraceElement s : t.getStackTrace()) {
+ log(s.toString(),Project.MSG_VERBOSE);
+ }
+ throw new BiomajBuildException(getTask().getProject(),t);
+ }
+ }
+ throw new BiomajBuildException(getTask().getProject(),"remote.error.autoreconnect",Integer.toString(NB_TRY),null);
+ }
+
+ @Override
+ public Vector<RemoteFile> listDir(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,false);
+ }
+
+ @Override
+ public Vector<RemoteFile> listFiles(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,true);
+ }
+
+
+ /**
+ * Si f est un lien, donne son lien d'origine (fichier no link) sinon rend f
+ * @param f
+ * @return
+ */
+
+ public boolean isFile(String base,FTPFile f) throws IOException,BiomajException {
+ if (!f.isSymbolicLink())
+ return f.isFile();
+
+
+ log(f.getName()+" is a link:"+f.getRawListing(),Project.MSG_DEBUG);
+
+ String ln = f.getLink();
+ boolean res = false;
+ /**
+ * Il arrive qu il y ai des probleme de connexion time-out, on essaye un certain nombre de tentative
+ * (connexion/deconnexion) avant de renvoyer une erreur
+ */
+ int tentative = 0 ;
+
+ while ( tentative++ < NB_TRY ) {
+ try {
+
+ //test pour savoir si le lien est un repertoire ou non!
+ if (res = client.changeWorkingDirectory(ln))
+ log("DIRECTORY",Project.MSG_VERBOSE);
+ else
+ log("FILE",Project.MSG_VERBOSE);
+
+ log("Change directory:"+base,Project.MSG_DEBUG);
+ //on revient au working directory initial
+ client.changeWorkingDirectory(base);
+ //checkFtpCode(client);
+ //throw new IOException("TEST");
+ return !res;
+
+ } catch (IOException ioe)
+ {
+ log("isFile() : ** ERROR:IOEXCEPTION **", Project.MSG_VERBOSE);
+ if(client.isConnected()) {
+ try {
+ client.disconnect();
+ } catch(IOException iof) {
+ log(iof.getMessage(),Project.MSG_VERBOSE);
+ //throw new BiomajException("remote.error.connect",ioe.getMessage());
+ }
+ }
+ log(ioe.getMessage(),Project.MSG_VERBOSE);
+ //throw new BiomajException("remote.error.connect",client.getPassiveHost().toString() + ioe.getMessage());
+ //throw ioe;
+ connect();
+ }
+ }
+ throw new BiomajException("remote.error.autoreconnect",Integer.toString(NB_TRY));
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/HttpImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/HttpImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/HttpImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,266 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
+import java.net.Proxy;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.ParseException;
+import java.util.Vector;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.task.net.HttpListingParser;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class HttpImpl extends RemoteCommandImpl {
+
+ /**
+ * @uml.property name="httpServer"
+ */
+ private String httpServer;
+
+
+ public HttpImpl(Task task) {
+ super(task);
+ }
+
+ @Override
+ public void init (
+ String server,
+ Integer port,
+ final String username,
+ final String password) throws BiomajBuildException {
+ super.init(server,port,username,password);
+
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password.toCharArray());
+ }
+ });
+
+ httpServer = server;
+ //Correction OFI 08/06/2007 - on enleve http://
+ httpServer = httpServer.replace("http://","");
+
+ //les proprietes de filtrage pour le protocol http doivent etre positionne
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpParseDirLineProperty, "Describe how to parse a directory line in the html format on server.");
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpParseFileLineProperty, "Describe how to parse a file line in the html format on server.");
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpGroupDirName, "Group where name of directory is in "+BiomajConst.httpParseDirLineProperty);
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpGroupDirDate, "Group where date of directory is in "+BiomajConst.httpParseDirLineProperty);
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpGroupFileName, "Group where name of file is in "+BiomajConst.httpParseDirLineProperty);
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpGroupFileDate, "Group where date of file is in "+BiomajConst.httpParseDirLineProperty);
+ InputValidation.checkString(getTask().getProject(), BiomajConst.httpGroupFileSize, "Group where size of file is in "+BiomajConst.httpParseDirLineProperty);
+
+ }
+
+
+
+ @Override
+ public void disconnect() {
+ }
+
+ /**
+ * Get a remote file
+ * @param remoteDirectory : directory to find file
+ * @param nameFile : file to download
+ * @param targetDirectory : local directory where the file will be stored
+ * @param targetName : file name in the local directory
+ * @return
+ */
+ @Override
+ protected boolean getFileWithImpl(String remoteDirectory,String nameFile,String targetDirectory,String targetName) throws BiomajException{
+
+ try {
+
+ URLConnection cx = connectToURLThroughProxyIfNeeded("http://" + httpServer + remoteDirectory + "/" + nameFile);
+ cx.connect();
+
+ DataInputStream dis = new DataInputStream(cx.getInputStream());
+
+ FileOutputStream fileStream = new FileOutputStream(targetDirectory+"/"+targetName);
+ DataOutputStream dos = new DataOutputStream(fileStream);
+
+ // recovery of the html document into the variable inputLine
+ log("File is writing:"+targetDirectory+"/"+targetName,Project.MSG_DEBUG);
+ byte[] b = new byte[1024];
+ int nbBytes = 0;
+ while ( ( nbBytes = dis.read(b)) != -1)
+ dos.write(b,0,nbBytes);
+
+ log("File is write!",Project.MSG_DEBUG);
+ dis.close () ;
+ dos.close() ;
+
+ }
+ catch (FileNotFoundException fe) {
+ return false;
+ }
+ catch (Exception ex) {
+ throw new BiomajBuildException(getTask().getProject(),ex);
+ }
+ return true;
+ }
+
+ public Vector<RemoteFile> list(String base, String directoryToApplyLs,boolean directory) throws BiomajBuildException {
+ Vector<RemoteFile> res = new Vector<RemoteFile>();
+ BufferedReader in = null;
+ try {
+ Project p = getTask().getProject();
+ URLConnection cx = connectToURLThroughProxyIfNeeded("http://" + httpServer + base + "/" + directoryToApplyLs);
+ cx.connect();
+
+ in = new BufferedReader(new InputStreamReader(cx.getInputStream()));
+
+ String tmp = "" ;
+
+ HttpListingParser hlp = new HttpListingParser(p.getProperty(BiomajConst.httpParseDirLineProperty),
+ Integer.valueOf(p.getProperty(BiomajConst.httpGroupDirName)),Integer.valueOf(p.getProperty(BiomajConst.httpGroupDirDate)),"",
+ p.getProperty(BiomajConst.httpParseFileLineProperty),Integer.valueOf(p.getProperty(BiomajConst.httpGroupFileName)),
+ Integer.valueOf(p.getProperty(BiomajConst.httpGroupFileDate)),Integer.valueOf(p.getProperty(BiomajConst.httpGroupFileSize)),"");
+ // recovery of the html document into the variable inputLine
+ while ( (tmp = in.readLine ()) != null) {
+ hlp.setLine(tmp);
+ //if (hlp.matches(tmp)) {
+ if (!hlp.parse())
+ continue;
+
+ if (hlp.getRemoteFile().isDir()==directory)
+ {
+ RemoteFile rf = hlp.getRemoteFile();
+ rf.setBase(directoryToApplyLs);
+ res.add(rf);
+ }
+ //}
+ }
+
+ } catch (IOException e) {
+ BiomajLogger.getInstance().log(e);
+ throw new BiomajBuildException(getTask().getProject(),"io.error",e.getMessage(),e);
+ } catch (ParseException e) {
+ BiomajLogger.getInstance().log(e);
+ throw new BiomajBuildException(getTask().getProject(),"io.error",e.getMessage(),e);
+ } finally {
+ try {
+ if ((in != null))
+ in.close();
+ } catch (IOException ioe) {
+
+ }
+ }
+
+ return res;
+ }
+
+ private URLConnection connectToURLThroughProxyIfNeeded(String address) {
+
+ URL url;
+ try {
+ url = new URL(address);
+ } catch (MalformedURLException e1) {
+ BiomajLogger.getInstance().log(e1);
+ return null;
+ }
+
+ Proxy proxy = Proxy.NO_PROXY;
+
+ if (System.getProperty("proxySet") != null && System.getProperty("proxySet").equals("true")) {
+ String proxyHost = System.getProperty("socksProxyHost");
+ int proxyPort = 1080;
+ if (System.getProperty("socksProxyPort") != null)
+ proxyPort = Integer.valueOf(System.getProperty("socksProxyPort"));
+
+ if (System.getProperty("socksProxyUser") != null) {
+ final String proxyUser = System.getProperty("socksProxyUser");
+ final String proxyPassword = System.getProperty("socksProxyPassword");
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(proxyUser, proxyPassword.toCharArray());
+ }
+ });
+ }
+ proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(proxyHost, proxyPort));
+ }
+
+ try {
+ HttpURLConnection cx = (HttpURLConnection) url.openConnection(proxy);
+ return cx;
+ } catch (IOException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+
+ return null;
+ }
+
+
+
+ @Override
+ public Vector<RemoteFile> listDir(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,true);
+ }
+
+ @Override
+ public Vector<RemoteFile> listFiles(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,false);
+ }
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/LocalImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/LocalImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/LocalImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,134 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Vector;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class LocalImpl extends RemoteCommandImpl {
+
+// private ArrayList<File> listFiles = new ArrayList<File>() ;
+
+ public LocalImpl(Task task) {
+ super(task);
+ }
+
+
+ @Override
+ protected boolean getFileWithImpl(String remoteDirectory, String nameFile, String targetDirectory, String targetName) throws BiomajException {
+ try {
+ BiomajUtils.copy(new File(remoteDirectory,nameFile),new File(targetDirectory,targetName));
+ return true;
+ } catch (IOException ioe) {
+ log(ioe.getMessage(),Project.MSG_WARN);
+ return false;
+ }
+ }
+
+
+ @Override
+ public void init(String server, Integer port, String username, String password) throws BiomajBuildException {
+ // TODO Auto-generated method stub
+ super.init(server,port,username,password);
+ }
+
+
+
+ @Override
+ public void disconnect() {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ @Override
+ public Vector<RemoteFile> listDir(String base, String directoryToApplyLs) throws BiomajBuildException {
+ File dir = new File (base,directoryToApplyLs);
+ Vector<RemoteFile> res = new Vector<RemoteFile>();
+ if (!dir.exists()) {
+ log(dir.getAbsolutePath()+" does not exist!",Project.MSG_INFO);
+ return res;
+ }
+
+ File[] list = dir.listFiles();
+
+ for (int i=0;i<list.length;i++) {
+ if (list[i].isDirectory()) {
+ res.add(new RemoteFile(directoryToApplyLs,list[i]));
+ }
+ }
+ return res;
+ }
+
+
+ @Override
+ public Vector<RemoteFile> listFiles(String base, String directoryToApplyLs) throws BiomajBuildException {
+ File dir = new File (base,directoryToApplyLs);
+ Vector<RemoteFile> res = new Vector<RemoteFile>();
+ if (!dir.exists()) {
+ log(dir.getAbsolutePath()+"does not exist!",Project.MSG_INFO);
+ return res;
+ }
+
+ File[] list = dir.listFiles();
+
+ for (int i=0;i<list.length;i++) {
+ if (list[i].isFile()) {
+ {
+ res.add(new RemoteFile(directoryToApplyLs,list[i]));
+
+ }
+ }
+ }
+ return res;
+ }
+
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteCommandImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteCommandImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteCommandImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,665 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.gmod.biomaj.ant.task.InputValidation;
+import org.inria.biomaj.ant.logger.BiomajConsoleLogger;
+import org.inria.biomaj.ant.task.BmajExtract;
+import org.inria.biomaj.ant.task.net.RemoteCommand;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+abstract public class RemoteCommandImpl {
+
+ /**
+ * @uml.property name="task"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Task task;
+
+ /**
+ * @uml.property name="bw"
+ */
+ private BufferedWriter bw;
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server = "";
+ /**
+ * UseFull to get a listing of Remote file which are ever request!
+ * @author ofilangi
+ */
+ private class ListingBuffer {
+ private Collection<RemoteFile> listBuf = new Vector<RemoteFile>();
+ /**
+ * @uml.property name="remoteDirectory"
+ */
+ private String remoteDirectory = "";
+ /**
+ * @uml.property name="remoteFiles"
+ */
+ private String remoteFiles = "";
+ /**
+ * @uml.property name="excludedFiles"
+ */
+ private String excludedFiles = "";
+ /**
+ * @return the excludedFiles
+ * @uml.property name="excludedFiles"
+ */
+ public String getExcludedFiles() {
+ return excludedFiles;
+ }
+ /**
+ * @param excludedFiles the excludedFiles to set
+ * @uml.property name="excludedFiles"
+ */
+ public void setExcludedFiles(String excludedFiles) {
+ this.excludedFiles = excludedFiles;
+ }
+ /**
+ * @return the listBuf
+ * @uml.property name="listBuf"
+ */
+ public Collection<RemoteFile> getListBuf() {
+ return listBuf;
+ }
+ /**
+ * @param listBuf the listBuf to set
+ * @uml.property name="listBuf"
+ */
+ public void setListBuf(Collection<RemoteFile> listBuf) {
+ this.listBuf = listBuf;
+ }
+ /**
+ * @return the remoteDirectory
+ * @uml.property name="remoteDirectory"
+ */
+ public String getRemoteDirectory() {
+ return remoteDirectory;
+ }
+ /**
+ * @param remoteDirectory the remoteDirectory to set
+ * @uml.property name="remoteDirectory"
+ */
+ public void setRemoteDirectory(String remoteDirectory) {
+ this.remoteDirectory = remoteDirectory;
+ }
+ /**
+ * @return the remoteFiles
+ * @uml.property name="remoteFiles"
+ */
+ public String getRemoteFiles() {
+ return remoteFiles;
+ }
+ /**
+ * @param remoteFiles the remoteFiles to set
+ * @uml.property name="remoteFiles"
+ */
+ public void setRemoteFiles(String remoteFiles) {
+ this.remoteFiles = remoteFiles;
+ }
+
+ }
+
+ /**
+ * Commun a toutes les instanciations de protocol pour la session biomaj courante
+ */
+ private static HashMap<String, ListingBuffer> lBuffer = null;
+
+ /**
+ * Constructor
+ * @param project
+ * @param task
+ */
+ public RemoteCommandImpl(Task task) {
+ setTask(task);
+ if (lBuffer == null)
+ lBuffer = new HashMap<String, ListingBuffer>();
+ }
+
+ /*
+ * Methode to redefine in specific protocol implementation
+ */
+ public void init (String server, Integer port, String username, String password) throws BiomajBuildException {
+ this.server = server;
+ }
+
+ abstract public void disconnect();
+
+ abstract public Vector<RemoteFile> listFiles(String base,String directoryToApplyLs) throws BiomajBuildException ;
+ abstract public Vector<RemoteFile> listDir(String base,String directoryToApplyLs) throws BiomajBuildException ;
+
+ /*
+ * Generic Algo to get a remote listing file independantly from the protocol
+ */
+
+ /**
+ *
+ * @param remoteDirectory
+ * @param listingFile
+ * @param remoteFiles
+ * @param regexpExcluded
+ * @throws BiomajException
+ * @throws BiomajBuildException
+ */
+
+ public void getListingFilesWithBufferFile(String remoteDirectory, String listingFile,String remoteFiles, String regexpExcluded) throws BiomajBuildException {
+ //InputValidation.checkString(getTask().getProject(),remoteDirectory, "remote directory");
+ InputValidation.checkString(getTask().getProject(),listingFile, "the listing file");
+ InputValidation.checkString(getTask().getProject(),remoteFiles, "the remote file regular expression");
+
+ try {
+
+ Collection<RemoteFile> resultat = new Vector<RemoteFile>() ;
+ if (!bufferExist(remoteDirectory, remoteFiles, regexpExcluded)) {
+ String[] listExpression = remoteFiles.split("\\s");
+
+ TreeMap<String,RemoteFile> res = new TreeMap<String,RemoteFile>();
+ for (int i=0;i<listExpression.length;i++) {
+ log("Checking expression ["+listExpression[i]+"]...",Project.MSG_INFO);
+ getFilesMatchWithRegularExpression(remoteDirectory, "", listExpression[i], regexpExcluded,res,true);
+ }
+ resultat = res.values();
+ } else {
+ log("UN BUFFER EXIST!!",Project.MSG_DEBUG);
+ resultat = getResultBuffer();
+ }
+
+ bw = new BufferedWriter(new FileWriter(listingFile));
+ writeListing(resultat);
+ bw.close();
+ } catch (IOException e) {
+ throwExceptionBiomaj("io.error",e.getMessage());
+ }
+ }
+
+
+ public Collection<RemoteFile> getListingFiles(String remoteDirectory,String remoteFiles, String regexpExcluded) throws BiomajBuildException {
+ // InputValidation.checkString(getTask().getProject(),remoteDirectory, "remote directory");
+ //InputValidation.checkString(getTask().getProject(),listingFile, "the listing file");
+ InputValidation.checkString(getTask().getProject(),remoteFiles, "the remote file regular expression");
+ TreeMap<String,RemoteFile> res = new TreeMap<String,RemoteFile>();
+
+ String[] listExpression = remoteFiles.split("\\s");
+
+ for (int i=0;i<listExpression.length;i++) {
+ log("Checking expression ["+listExpression[i]+"]...",Project.MSG_INFO);
+ getFilesMatchWithRegularExpression(remoteDirectory, "", listExpression[i], regexpExcluded,res,true);
+ }
+
+ setResultBuffer(remoteDirectory, remoteFiles, regexpExcluded, res.values());
+
+ return res.values();
+ }
+
+ private void getFilesMatchWithRegularExpression(String remoteDirectory,String path,String regExpr,String regExprExclu,TreeMap<String,RemoteFile> resultat,boolean logPercent) throws BiomajBuildException {
+ if (logPercent)
+ log("Searching files in root directory....",Project.MSG_VERBOSE);
+
+ if ( resultat == null ) {
+ log("argument 'resulat' from getFilesMatchWithRegularExpression can't be set null",Project.MSG_ERR);
+ throw new BiomajBuildException(getTask().getProject(),"",new Exception());
+ }
+ //Il n'y a pas de repertoire dans l'expression reguliere
+ if (!regExpr.contains("/")) {
+ if (!path.endsWith("/..") && !path.endsWith("/.") && !path.equals(".") && !path.equals("..")) {
+ if (logPercent)
+ log("Biomaj is creating a file list...",Project.MSG_VERBOSE);
+
+ Vector<RemoteFile> lFiles = listFiles(remoteDirectory,path);
+ int compteur = 0;
+ for (RemoteFile f : lFiles) {
+ if (logPercent) {
+ float a = ((float)++compteur/ (float)lFiles.size())*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ }
+ //Correction bug O.F
+ //if (match(f.getAbsolutePath(),regExpr,regExprExclu))
+ if (match(f.getName(),regExpr,regExprExclu)){
+
+ log(f.getName()+" is ok! toString:"+f.toString(),Project.MSG_VERBOSE);
+
+ //if (resultat!=null)
+ if (!resultat.containsKey(f.getAbsolutePath())){
+ resultat.put(f.getAbsolutePath(),f);
+ }
+ /*else {
+ bw.write(f.toString());
+ bw.newLine();
+ }*/
+ }
+ }
+ }
+ return;
+ }
+
+ //On decoupe en sous repertoire et fichier
+ String[] decomposeDirectory = regExpr.split("/");
+ /*
+ for (int i=0;i<decomposeDirectory.length;i++)
+ System.out.println(decomposeDirectory[i]);
+ */
+ String newRegExpr = regExpr.substring(decomposeDirectory[0].length()+1);
+
+ if (logPercent)
+ log("Biomaj is creating a list of sub-directory...",Project.MSG_VERBOSE);
+
+ if (!path.equals(".") && !path.equals("..")) {
+ Vector<RemoteFile> lDirs = listDir(remoteDirectory,path);
+
+ if (logPercent)
+ log("Searching files in sub-directory...",Project.MSG_VERBOSE);
+
+ int compteur = 0;
+ for (RemoteFile d : lDirs) {
+ compteur++;
+ if (match(d.getAbsolutePath(),decomposeDirectory[0],regExprExclu))
+ {
+ if (logPercent) {
+ float a = ((float)compteur/ (float)lDirs.size())*100;
+ log(BiomajConsoleLogger.NOT_KEEP_LINE_ON_CONSOLE+"["+Integer.toString((int)a)+"%]",Project.MSG_INFO);
+ }
+ log("Expr:"+regExpr,Project.MSG_VERBOSE);
+ log(d.getAbsolutePath()+" match with "+decomposeDirectory[0],Project.MSG_VERBOSE);
+ log("newExpr:"+newRegExpr,Project.MSG_VERBOSE);
+ String newPath = path;
+ if (newPath.compareTo("")!=0)
+ newPath = newPath+"/"+d.getName();
+ else
+ newPath = d.getName();
+ getFilesMatchWithRegularExpression(remoteDirectory,newPath,newRegExpr,regExprExclu,resultat,false);
+ }
+ }
+ }
+ }
+
+
+ private boolean match (String filePath, String expr, String exprExc) {
+ final Pattern p = Pattern.compile(expr);
+ boolean exclu = false;
+ //log("filePath:"+filePath+" expr:"+expr+" exprExclu:"+exprExc,Project.MSG_INFO);
+ if (exprExc.compareTo("")!=0) {
+ String[] exclusions = exprExc.split("\\s");
+ for (int i=0;i<exclusions.length;i++) {
+ Pattern pExclu = Pattern.compile(exclusions[i].trim());
+ exclu = exclu || pExclu.matcher(filePath).find();
+ }
+ }
+
+ if (p.matcher(filePath).find()&&(!exclu)){
+ log(filePath+" match with:"+expr,Project.MSG_VERBOSE);
+ return true;
+ }
+
+ log(filePath+" not match! with:"+expr +" exclude:"+Boolean.toString(exclu),Project.MSG_VERBOSE);
+ return false;
+ }
+
+ /*
+ * End Algo
+ */
+
+ abstract protected boolean getFileWithImpl(String remoteDirectory,String nameFile,String targetDirectory,String targetName)
+ throws BiomajException;
+
+
+ /**
+ * Get a remote file
+ * @param remoteDirectory : directory to find file
+ * @param nameFile : file to download
+ * @param targetDirectory : local directory where the file will be stored
+ * @param targetName : file name in the local directory
+ * @return
+ */
+ public boolean getFile(String remoteDirectory,String nameFile,String targetDirectory,String targetName) throws BiomajException{
+
+ if (BiomajUtils.getRelativeDirectory(targetName).compareTo("")!=0) {
+ BiomajUtils.createSubDirectories(targetDirectory+"/"+BiomajUtils.getRelativeDirectory(targetName));
+ }
+
+ boolean ret = getFileWithImpl(remoteDirectory,nameFile,targetDirectory,targetName);
+
+ if (!ret)
+ return ret;
+
+ File f = new File(targetDirectory.trim()+"/"+targetName);
+
+ //test checksum if file is zipped!
+ //------------------------------
+
+ if (BmajExtract.containsCompressedFormat(nameFile)) {
+ if (BmajExtract.check(f,getTask())) {
+ getTask().log("compressed file is check!",Project.MSG_VERBOSE);
+ } else {
+ getTask().log("compressed file is corruped!",Project.MSG_VERBOSE);
+ return false;
+ }
+ }
+
+ return ret;
+
+ }
+
+ public static boolean getFile(Task task,String username,String password,String nameFileWithEntireUrl,String targetDirectory,String targetName) throws BiomajException {
+
+ String protocol = getProtocolAttributRemoteConfig(nameFileWithEntireUrl);
+ if (protocol == null)
+ return false;
+
+ String serveur = getServeurAttributRemoteConfig(nameFileWithEntireUrl);
+
+ if (serveur == null)
+ return false;
+
+ String filepath = getFilePathAttributRemoteConfig(nameFileWithEntireUrl);
+ if (filepath == null)
+ return false;
+ if (BiomajUtils.getRelativeDirectory(filepath).compareTo("")!=0) {
+ BiomajUtils.createSubDirectories(targetDirectory+"/"+BiomajUtils.getRelativeDirectory(filepath));
+ }
+
+ Integer port = getPortAttributRemoteConfig(nameFileWithEntireUrl);
+
+ RemoteCommandImpl rci = null ;
+ if (protocol.substring(0).compareTo(RemoteCommand.FTP_PROTOCOL)==0) {
+ rci = new FtpImpl(task);
+ } else if (protocol.substring(0).compareTo(RemoteCommand.HTTP_PROTOCOL)==0){
+ rci = new HttpImpl(task);
+ } else if (protocol.substring(0).compareTo(RemoteCommand.RSYNC_PROTOCOL)==0){
+ rci = new RsyncImpl(task);
+ } else if (protocol.substring(0).compareTo(RemoteCommand.LOCAL_PROTOCOL)==0){
+ rci = new LocalImpl(task);
+ }
+
+ //On ne specifie pas le password et le username
+ rci.init(serveur,port,username,password);
+ boolean ret = rci.getFileWithImpl("", filepath, targetDirectory, targetName);
+ rci.disconnect();
+ return ret;
+ }
+
+ /**
+ * Get a remote file and uncompressed this file
+ * @param remoteDirectory : directory to find file
+ * @param nameFile : file to download
+ * @param targetDirectory : local directory where the file will be stored
+ * @return the name file
+ */
+ public String getFileUncompressed(String remoteDirectory,String nameFile,String targetDirectory) throws BiomajException{
+ if (getFile(remoteDirectory,nameFile,targetDirectory,nameFile)) {
+ String newNameFile = BmajExtract.uncompressedFile(targetDirectory,nameFile,task);
+ if (newNameFile.compareTo(nameFile)!=0){
+ return newNameFile;
+ }
+ }
+ return nameFile;
+ }
+
+ public static String getFileUncompressed(Task t, String username,String password, String url,String targetDirectory) throws BiomajException{
+ String[] res = url.split("/");
+ if (getFile(t,username,password,url,targetDirectory,res[res.length-1])) {
+ String newNameFile = BmajExtract.uncompressedFile(targetDirectory,res[res.length-1],t);
+ if (newNameFile.compareTo(res[res.length-1])!=0){
+ return newNameFile;
+ }
+ }
+ return res[res.length-1];
+ }
+
+
+ /**
+ * if there are not / at end of a directory, we add one!
+ * @param remoteDirectory
+ */
+ protected String checkRemoteDirectory(String remoteDirectory) {
+ //remoteDirectory = remoteDirectory.trim();
+ if ((remoteDirectory.length()>0)&&(remoteDirectory.charAt(remoteDirectory.length()-1)!='/')) {
+ //log("Remote directory has to finish by '/'",Project.MSG_VERBOSE);
+ return remoteDirectory+"/";
+ }
+ return remoteDirectory;
+ }
+
+ /**
+ * @return the task
+ * @uml.property name="task"
+ */
+ public Task getTask() {
+ return task;
+ }
+
+ /**
+ * @param task the task to set
+ * @uml.property name="task"
+ */
+ public void setTask(Task task) {
+ this.task = task;
+ }
+
+ protected boolean checkWithExcludedFiles(String regExcluded, String filepath) {
+
+ if ((regExcluded==null)||(regExcluded.trim().compareTo("")==0))
+ return true;
+
+ String[] lExcReg = regExcluded.split("\\s");
+
+ for (int i=0; i<lExcReg.length;i++) {
+ Pattern p = Pattern.compile(lExcReg[i]);
+ if (p.matcher(filepath).find())
+ {
+
+ return false; //le fichier appartient a l expression reguliere
+ }
+ }
+
+ return true;
+ }
+
+ public void log(String message,int level) {
+ if (task!=null) {
+ task.log(message,level);
+ } else {
+ System.out.println(level+":"+message);
+ }
+
+ }
+
+ private void throwExceptionBiomaj(String key,String arg) throws BiomajBuildException {
+
+ if (arg == null)
+ arg = "";
+
+ if (task == null) {
+ throw new BiomajBuildException(null,key,arg,new Exception());
+ }
+ else
+ throw new BiomajBuildException(task.getProject(),key,arg,new Exception());
+
+ }
+
+ private boolean bufferExist(String remoteDirectory, String remoteFiles, String regexpExcluded) {
+ if (lBuffer.containsKey(server)) {
+ ListingBuffer lb = lBuffer.get(server);
+ log("remoteDirectory - old:["+lb.remoteDirectory+"] new:["+remoteDirectory+"]",Project.MSG_DEBUG);
+ log("remoteFiles - old:["+lb.remoteFiles+"] new:["+remoteFiles+"]",Project.MSG_DEBUG);
+ log("excludedFiles - old:["+lb.excludedFiles+"] new:["+regexpExcluded+"]",Project.MSG_DEBUG);
+
+ return ((lb.remoteDirectory.compareTo(remoteDirectory)==0)&&
+ (lb.remoteFiles.compareTo(remoteFiles)==0)&&
+ (lb.excludedFiles.compareTo(regexpExcluded)==0));
+ }
+ log("server:["+server+"] is not present in buffer!",Project.MSG_DEBUG);
+ return false;
+ }
+
+ private Collection<RemoteFile> getResultBuffer() throws BiomajBuildException {
+ if (lBuffer.containsKey(server)) {
+ return lBuffer.get(server).getListBuf();
+ }
+ throw new BiomajBuildException(getTask().getProject(),"unknown.error","Erreur interne, mauvaise implementation du buffer : RemoteCommandImpl",new Exception());
+ }
+
+ private void setResultBuffer(String remoteDirectory, String remoteFiles, String regexpExcluded,Collection<RemoteFile> lFiles) {
+ lBuffer.remove(server);
+ ListingBuffer lb = new ListingBuffer();
+ lb.setExcludedFiles(regexpExcluded);
+ lb.setListBuf(lFiles);
+ lb.setRemoteDirectory(remoteDirectory);
+ lb.setRemoteFiles(remoteFiles);
+ lBuffer.put(server, lb);
+ }
+
+ private void writeListing (Collection<RemoteFile> lFiles) throws BiomajBuildException {
+ try {
+ for (RemoteFile f : lFiles) {
+ bw.write(f.toString());
+ bw.newLine();
+ }
+ } catch (IOException ioe) {
+ throwExceptionBiomaj("",bw.toString());
+ }
+ }
+
+
+ public static String getProtocolAttributRemoteConfig(String url) {
+ if (!url.contains("://"))
+ return null;
+
+ String[] res = url.split("://");
+ String protocol = res[0] ;
+
+ if ((protocol.compareTo(RemoteCommand.FTP_PROTOCOL)!=0)&&(protocol.compareTo(RemoteCommand.LOCAL_PROTOCOL)!=0)
+ &&(protocol.compareTo(RemoteCommand.HTTP_PROTOCOL)!=0)&&(protocol.compareTo(RemoteCommand.RSYNC_PROTOCOL)!=0)) {
+ return null;
+ }
+ return protocol;
+ }
+
+ public static String getServeurAttributRemoteConfig(String url) {
+ if (!url.contains("://"))
+ return null;
+
+ String[] res = url.split("://");
+
+ String serveurAndRest = res[1];
+
+ while (serveurAndRest.contains("//"))
+ serveurAndRest = serveurAndRest.replace("//", "/");
+
+ if (serveurAndRest.startsWith("/"))
+ serveurAndRest.replaceFirst("/", "");
+
+ String serveurS =serveurAndRest;
+
+ if (serveurAndRest.contains("/")) {
+ serveurS = serveurAndRest.split("/")[0];
+ }
+
+ if (serveurS.matches("[\\w]+:[d]+"))
+ return serveurS.split(":")[0];
+
+ return serveurS ;
+ }
+
+ public static int getPortAttributRemoteConfig(String url) {
+ if (!url.contains("://"))
+ return 21;
+
+ String[] res = url.split("://");
+
+ String serveurAndRest = res[1];
+
+ while (serveurAndRest.contains("//"))
+ serveurAndRest = serveurAndRest.replace("//", "/");
+
+ if (serveurAndRest.startsWith("/"))
+ serveurAndRest.replaceFirst("/", "");
+
+ String serveurS =serveurAndRest;
+
+ if (serveurAndRest.contains("/")) {
+ serveurS = serveurAndRest.split("/")[0];
+ }
+
+ if (serveurS.matches("[\\w]+:[d]+"))
+ return Integer.valueOf(serveurS.split(":")[1]);
+
+ return 21;
+ }
+
+ public static String getFilePathAttributRemoteConfig(String url) {
+ if (!url.contains("://"))
+ return null;
+
+ String[] res = url.split("://");
+
+ String serveurAndRest = res[1];
+
+ while (serveurAndRest.contains("//"))
+ serveurAndRest = serveurAndRest.replace("//", "/");
+
+ if (serveurAndRest.startsWith("/"))
+ serveurAndRest.replaceFirst("/", "");
+
+ String serveurS =serveurAndRest;
+
+ if (serveurAndRest.contains("/")) {
+ serveurS = serveurAndRest.split("/")[0];
+ }
+ return serveurAndRest.replace(serveurS, "");
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteFile.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteFile.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RemoteFile.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,288 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPFile;
+import org.apache.commons.net.ftp.FTPReply;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class RemoteFile {
+
+ public static final Pattern patRemoteFile = Pattern.compile("name=([\\S]+),base=([\\S]*),link=([\\S]*),date=("+BiomajUtils.REGEXP_DATE_FORMAT_IN_USE+"),size=([\\d]+),isDir=([\\w]+)");
+ /**
+ * @uml.property name="name"
+ * @uml.associationEnd
+ */
+ private String name ="";
+
+ /**
+ * la base est la somme des repertoires qui matche avec l'expression reguliere remote.files
+ * @uml.property name="base"
+ */
+ private String base ="";
+ /**
+ * @uml.property name="linkName"
+ */
+ private String linkName ="";
+
+ /**
+ * @uml.property name="date"
+ */
+ private Date date = new Date(0);
+ /**
+ * @uml.property name="size"
+ */
+ private Long size = new Long(-1);
+
+ /**
+ * @uml.property name="isDir"
+ */
+ private boolean isDir = false;
+
+ public RemoteFile(String base,FTPClient client,FTPFile file) throws BiomajException {
+ setAttributes(client,file);
+ setBase(base);
+ }
+
+ /**
+ * @param base
+ * @param file
+ */
+ public RemoteFile(String base,File file) {
+ this.base = base;
+ name = file.getName();
+ date = new Date(file.lastModified());
+ size = file.length();
+ isDir = file.isDirectory();
+ }
+
+ public RemoteFile(String lineToParse) throws BiomajException,ParseException {
+ Matcher match = patRemoteFile.matcher(lineToParse);
+ if (!match.find()) {
+ BiomajLogger.getInstance().log("Can't parse Remote File with this line:"+lineToParse);
+ throw new BiomajException("remote.file.error","Can't parse Remote File with this line:"+lineToParse);
+ }
+
+ name = match.group(1);
+ base = match.group(2);
+ linkName = match.group(3);
+ date = BiomajUtils.stringToDate(match.group(4));
+ size = Long.valueOf(match.group(5));
+ isDir = Boolean.valueOf(match.group(6));
+ }
+
+
+ public RemoteFile() {
+
+ }
+
+ @Override
+ public String toString() {
+ return "name="+name+",base="+base+",link="+linkName+",date="+BiomajUtils.dateToString(date, Locale.US)+",size="+Long.toString(size)+",isDir="+Boolean.toString(isDir)+";";
+ }
+
+
+ public void setAttributes(FTPClient client,FTPFile file) throws BiomajException {
+
+
+ if (file.isSymbolicLink()){
+ linkName = file.getLink();
+ try {
+ if(!FTPReply.isPositiveCompletion(client.getReplyCode())) {
+ throw new BiomajException("ftp.error",client.getReplyString());
+ }
+ FTPFile[] l = client.listFiles(BiomajUtils.getRelativeDirectory(file.getLink()));
+ FTPFile f = null;
+ for (FTPFile i :l)
+ if (i.getName().compareTo(BiomajUtils.getNameFile(file.getLink()))==0)
+ {
+ f = i;
+ break;
+ }
+
+ if (f == null) {
+ //On a pas reussi a trouver le link.....
+ date = new Date(file.getTimestamp().getTime().getTime());
+ size = file.getSize();
+ } else {
+ size = f.getSize();
+ date = new Date(f.getTimestamp().getTime().getTime());
+ }
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ throw new BiomajException("ftp.error",ioe.getMessage());
+ }
+ } else {
+ date = new Date(file.getTimestamp().getTime().getTime());
+ size = file.getSize();
+ }
+ isDir = file.isDirectory();
+ name = file.getName();
+ }
+
+
+ /**
+ * @return the date
+ * @uml.property name="date"
+ */
+ public Date getDate() {
+ return date;
+ }
+
+ /**
+ * @param date the date to set
+ * @uml.property name="date"
+ */
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ * @return the name
+ * @uml.property name="name"
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ * @uml.property name="name"
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the size
+ * @uml.property name="size"
+ */
+ public Long getSize() {
+ return size;
+ }
+
+ /**
+ * @param size the size to set
+ * @uml.property name="size"
+ */
+ public void setSize(Long size) {
+ this.size = size;
+ }
+
+ /**
+ * @return the linkName
+ * @uml.property name="linkName"
+ */
+ public String getLinkName() {
+ if (getBase().compareTo("")!=0)
+ return getBase()+"/"+linkName;
+
+ return linkName;
+ }
+
+ /**
+ * @param linkName the linkName to set
+ * @uml.property name="linkName"
+ */
+ public void setLinkName(String linkName) {
+ this.linkName = linkName;
+ }
+
+ public boolean isLink() {
+ return (this.linkName.compareTo("")!=0);
+ }
+
+ /**
+ * @return
+ * @uml.property name="isDir"
+ */
+ public boolean isDir() {
+ return isDir;
+ }
+
+ /**
+ * @param isDir the isDir to set
+ * @uml.property name="isDir"
+ */
+ public void setDir(boolean isDir) {
+ this.isDir = isDir;
+ }
+
+ /**
+ * @return the base
+ * @uml.property name="base"
+ */
+ public String getBase() {
+ return base;
+ }
+
+ public String getAbsolutePath() {
+ if (getBase().compareTo("")!=0)
+ return getBase()+"/"+getName();
+ return getName();
+ }
+
+ /**
+ * @param base the base to set
+ * @uml.property name="base"
+ */
+ public void setBase(String base) {
+ this.base = base;
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RsyncImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RsyncImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/RsyncImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,346 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.internal.ant.task.net;
+
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.text.ParseException;
+import java.util.Vector;
+import java.util.regex.Pattern;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+import org.inria.biomaj.ant.task.net.RSyncListingParser;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajException;
+
+public class RsyncImpl extends RemoteCommandImpl {
+
+ /**
+ * @uml.property name="server"
+ */
+ private String server;
+ /**
+ * @uml.property name="username"
+ */
+ private String username;
+ /**
+ * @uml.property name="password"
+ */
+ private String password;
+
+ public RsyncImpl(Task task) {
+ super(task);
+ }
+
+
+ @Override
+ public void init (
+ String server,
+ Integer port,
+ String username,
+ String password) throws BiomajBuildException {
+ super.init(server,port,username,password);
+ setServer(server);
+ setUsername(username);
+ setPassword(password);
+ }
+
+
+
+ /*
+
+ public void getListingFiles (String directory, String listingFile,String regexp, String regexpExcluded) throws BiomajException {
+ InputValidation.checkString(getTask().getProject(),directory, "remote directory");
+ InputValidation.checkString(getTask().getProject(),listingFile, "the listing file");
+ InputValidation.checkString(getTask().getProject(),regexp, "the remote file regular expression");
+
+ directory = checkRemoteDirectory(directory) ;
+
+ try {
+ BufferedWriter bw = new BufferedWriter(new FileWriter(listingFile));
+
+ Vector<String> listing = getOuptutListingRsync(directory);
+ log("nb file in remote directory:"+listing.size(),Project.MSG_DEBUG);
+ for (int i=0;i<listing.size();i++) {
+
+ RSyncListingParser lp = new RSyncListingParser(getTask().getProject());
+ lp.setLine(listing.get(i));
+ lp.parse();
+ String nameFile = lp.getFileName();
+ String[] regexps = regexp.split("\\s");
+
+ for (int j=0;j<regexps.length;j++) {
+ Pattern p = Pattern.compile(regexps[j]);
+ log("regexp:"+regexps[j],Project.MSG_DEBUG);
+ log("name:"+nameFile,Project.MSG_DEBUG);
+ if (p.matcher(nameFile).find())
+ {
+ if (checkWithExcludedFiles(regexpExcluded,listing.get(i))) {
+ log("ok match!"+regexps[j],Project.MSG_DEBUG);
+ bw.write(listing.get(i)+"\n");
+ } else {
+ log(listing.get(i) + " match with remote.files but is excluded by:"+regexpExcluded, Project.MSG_VERBOSE);
+ }
+ } else {
+ log("no match!",Project.MSG_DEBUG);
+ }
+ }
+
+ }
+ bw.flush();
+ bw.close();
+
+ } catch(IOException ioe) {
+ throw new BiomajException("remote.error.connect",ioe.getMessage());
+ } catch (Exception e) {
+ throw new BiomajException("unknown.error",e.getMessage());
+ }
+
+ }
+ */
+
+ @Override
+ public void disconnect() {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ public Vector<RemoteFile> getFilesRegExp(String remoteDirectory,String regexp) throws BiomajException {
+ Vector<RemoteFile> result = new Vector<RemoteFile>();
+ remoteDirectory = checkRemoteDirectory(remoteDirectory) ;
+
+ Vector<String> listing = getOuptutListingRsync(remoteDirectory);
+ for (int i=0;i<listing.size();i++) {
+ try {
+ RSyncListingParser lp = new RSyncListingParser(getTask().getProject());
+ lp.setLine(listing.get(i));
+ lp.parse();
+ RemoteFile file = lp.getRemoteFile();
+ Pattern p = Pattern.compile(regexp);
+ log("regexp:"+regexp,Project.MSG_DEBUG);
+ if (p.matcher(file.getName()).find())
+ {
+ log("ok match!"+regexp,Project.MSG_DEBUG);
+ result.add(file);
+ }
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getTask().getProject(),"io.error",e.getMessage(),e);
+ }
+ }
+ return result;
+ }
+
+
+ @Override
+ protected boolean getFileWithImpl(String remoteDirectory,String nameFile,String targetDirectory,String targetName) throws BiomajException {
+ remoteDirectory = checkRemoteDirectory(remoteDirectory) ;
+ String cmd = "rsync://"+getServer()+remoteDirectory+nameFile;
+
+ try {
+ Commandline mycmd = new Commandline();
+ String rsync = BiomajInformation.getInstance().getProperty(BiomajInformation.RSYNC);
+
+ mycmd.setExecutable(rsync);
+ mycmd.createArgument().setValue(cmd);
+ mycmd.createArgument().setValue(targetDirectory.trim()+"/"+targetName);
+ //Process proc = Runtime.getRuntime().exec(cmd);
+ //proc.waitFor();
+ Execute exe = new Execute(new LogStreamHandler(getTask(), Project.MSG_INFO,Project.MSG_ERR),null);
+ exe.setCommandline(mycmd.getCommandline());
+ exe.execute();
+
+ int code_retour = exe.getExitValue();
+
+ if (code_retour!=0) {
+ log("file:"+cmd,Project.MSG_WARN);
+ log("code retour:"+code_retour,Project.MSG_WARN);
+ return false;
+ }
+
+ } catch (Throwable t) {
+ log("Error with rsync!",Project.MSG_DEBUG);
+ log(t.getStackTrace().toString(),Project.MSG_ERR);
+ throw new BuildException(t);
+ }
+
+ return true;
+ }
+
+ /**
+ * Get a vector of each output line with the command rsync
+ * @param directory
+ * @param regexp
+ * @return
+ */
+ protected Vector<String> getOuptutListingRsync(String directory) throws BiomajException {
+ log("getOuptutListingRsync",Project.MSG_DEBUG);
+ Vector<String> result = new Vector<String>();
+
+ String rsync = BiomajInformation.getInstance().getProperty(BiomajInformation.RSYNC);
+
+ String cmd = rsync+" -t rsync://"+getServer()+directory ;
+
+ try {
+
+ Process proc = Runtime.getRuntime().exec(cmd);
+ BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
+ String line ;
+ while((line = br.readLine())!= null)
+ result.add(line);
+
+ } catch (Throwable t) {
+ log("Error with rsync!",Project.MSG_ERR);
+ BiomajLogger.getInstance().log(t.getMessage());
+ throw new BuildException(t);
+ }
+ return result;
+ }
+
+ /**
+ * @return the password
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+
+ /**
+ * @param password the password to set
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ /**
+ * @return the server
+ * @uml.property name="server"
+ */
+ public String getServer() {
+ return server;
+ }
+
+
+ /**
+ * @param server the server to set
+ * @uml.property name="server"
+ */
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+
+ /**
+ * @return the username
+ * @uml.property name="username"
+ */
+ public String getUsername() {
+ return username;
+ }
+
+
+ /**
+ * @param username the username to set
+ * @uml.property name="username"
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ private Vector<RemoteFile> list(String base, String directoryToApplyLs,boolean dir) throws BiomajBuildException {
+ Vector<RemoteFile> result = new Vector<RemoteFile>();
+ String where = checkRemoteDirectory(base+"/"+directoryToApplyLs) ;
+ try {
+ Vector<String> listing = getOuptutListingRsync(where);
+ RSyncListingParser lp = new RSyncListingParser(getTask().getProject());
+
+ for (int i=0;i<listing.size();i++) {
+ try {
+ String line = listing.get(i);
+
+ String regex = "^(d|-)r(w|-).*";
+ if ( !line.matches(regex) )
+ continue;
+
+ lp.setLine(line);
+ lp.parse();
+ RemoteFile file = lp.getRemoteFile();
+ file.setBase(directoryToApplyLs);
+ if (file.isDir()==dir) {
+ result.add(file);
+ }
+ } catch (ParseException e) {
+ throw new BiomajBuildException(getTask().getProject(),"io.error",e.getMessage(),e);
+ }
+ }
+ } catch (BiomajException be) {
+ throw new BiomajBuildException(getTask().getProject(),be);
+ }
+ return result;
+ }
+
+ @Override
+ public Vector<RemoteFile> listDir(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,true);
+ }
+
+
+ @Override
+ public Vector<RemoteFile> listFiles(String base, String directoryToApplyLs) throws BiomajBuildException {
+ return list(base,directoryToApplyLs,false);
+ }
+
+
+
+}
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/SftpImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/SftpImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/SftpImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,301 @@
+package org.inria.biomaj.internal.ant.task.net;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Vector;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.inria.biomaj.utils.BiomajBuildException;
+import org.inria.biomaj.utils.BiomajConst;
+
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.SftpException;
+import com.jcraft.jsch.ChannelSftp.LsEntry;
+
+/**
+ * Implementation of the sftp protocol based on the
+ * JSch library (JCraft implementation of ssh2).
+ *
+ * @author rsabas
+ *
+ */
+public class SftpImpl extends RemoteCommandImpl {
+
+ public static final int DEFAULT_TIMEOUT = 100000;
+ public static final int DEFAULT_MAX_TRIES = 5;
+
+ /**
+ * Server address
+ */
+ private String server;
+
+ /**
+ * Listening port
+ */
+ private int port;
+
+ /**
+ * User login
+ */
+ private String username;
+
+ /**
+ * User password
+ */
+ private String password;
+
+ /**
+ * Sftp connexion
+ */
+ private ChannelSftp sftpChannel;
+
+ /**
+ * User defined timeout (DEFAULT_TIMEOUT if none)
+ */
+ private int timeout;
+
+ /**
+ * User defined max connection tries number
+ */
+ private int maxTries;
+
+ public SftpImpl(Task task) {
+ super(task);
+ }
+
+ /**
+ * Initializes the remote host and connection parameters.
+ */
+ @Override
+ public void init(String server, Integer port, String username,
+ String password) throws BiomajBuildException {
+ this.server = server;
+ this.port = port;
+ this.username = username;
+ this.password = password;
+
+ // Initialisation timeout
+ if (getTask().getProject().getProperties().containsKey(BiomajConst.ftpTimeOut)) {
+ String ftpTimeout = getTask().getProject().getProperty(BiomajConst.ftpTimeOut);
+ try {
+ timeout = Integer.valueOf(ftpTimeout);
+
+ if ((timeout != -1) && (timeout < 0)) {
+ log("Bad value for [" + BiomajConst.ftpTimeOut + ":" + ftpTimeout + "] has to be positive or -1.", Project.MSG_WARN);
+ timeout = DEFAULT_TIMEOUT;
+ }
+
+ } catch (NumberFormatException nf) {
+ log("Bad value for [" + BiomajConst.ftpTimeOut + ":" + ftpTimeout + "]", Project.MSG_WARN);
+ timeout = DEFAULT_TIMEOUT;
+ }
+ }
+
+ // Initialisation tentatives connexion
+ if (getTask().getProject().getProperties().containsKey(BiomajConst.ftpTriesConnexion)) {
+ String tries = getTask().getProject().getProperty(BiomajConst.ftpTriesConnexion);
+ try {
+ maxTries = Integer.valueOf(tries);
+
+ if (maxTries < 0) {
+ log("Bad value for [" + BiomajConst.ftpTriesConnexion + ":" + tries + "] has to be positive.", Project.MSG_WARN);
+ maxTries = DEFAULT_MAX_TRIES;
+ }
+
+ } catch (NumberFormatException nf) {
+ log("Bad value for [" + BiomajConst.ftpTriesConnexion + ":" + tries + "]", Project.MSG_WARN);
+ maxTries = DEFAULT_MAX_TRIES;
+ }
+ }
+
+ connect();
+
+ }
+
+ /**
+ * Connects to the server and opens an sftp channel.
+ *
+ */
+ public void connect() {
+ JSch secureChannel = new JSch();
+ boolean fine = false;
+ Exception ex = null;
+ for (int tries = 0; tries < maxTries && !fine; tries++) {
+ try {
+ Session sftpSession = secureChannel.getSession(username, server, port);
+// sftpSession.setTimeout(timeout);
+ sftpSession.setPassword(password);
+ sftpSession.setConfig("StrictHostKeyChecking", "no");
+ sftpSession.connect();
+ sftpChannel = (ChannelSftp) sftpSession.openChannel("sftp");
+ sftpChannel.connect();
+ fine = true;
+ } catch (JSchException e) {
+ // Pas d'exception specialisees dans Jsch donc pas moyen d'identifier
+ // le type de probleme :(
+ log(e.getMessage(), Project.MSG_WARN);
+ ex = e;
+ }
+ }
+ if (!fine)
+ throw new BiomajBuildException(getTask().getProject(), "remote.error.autoreconnect", Integer.toString(maxTries), ex);
+ }
+
+ @Override
+ public void disconnect() {
+ if (sftpChannel != null) {
+ sftpChannel.disconnect();
+ try {
+ sftpChannel.getSession().disconnect();
+ } catch (JSchException e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+ /**
+ * Retrieves the remote file denoted by its directory and name.
+ *
+ * @param remoteDirectory
+ * remote directory
+ * @param nameFile
+ * remote file name
+ * @param targetDirectory
+ * local directory
+ * @param targetName
+ * local name
+ */
+ @Override
+ protected boolean getFileWithImpl(String remoteDirectory, String nameFile,
+ String targetDirectory, String targetName)
+ throws BiomajBuildException {
+
+ try {
+ sftpChannel.cd(remoteDirectory);
+ FileOutputStream out = new FileOutputStream(targetDirectory + "/" + targetName);
+ sftpChannel.get(nameFile, out);
+ out.close();
+
+ return true;
+ } catch (SftpException e) {
+ throw new BiomajBuildException(getTask().getProject(),
+ "sftp.error.remoteCommand", e);
+ } catch (FileNotFoundException e) {
+ throw new BiomajBuildException(getTask().getProject(),
+ "sftp.error.io.fileNotFound", e);
+ } catch (IOException e) {
+ throw new BiomajBuildException(getTask().getProject(), e);
+ }
+ }
+
+ /**
+ * Lists the files or directories in the given directory (base + directoryToApplyLs)
+ *
+ * @param base base directory
+ * @param directoryToApplyLs directory to be listed in the base directory
+ * @param isDir whether we list files or directory
+ * @return Listed items
+ * @throws BiomajBuildException
+ */
+ private Vector<RemoteFile> list(String base, String directoryToApplyLs, boolean isDir) throws BiomajBuildException {
+ String workingDirectory = base + "/" + directoryToApplyLs;
+ Vector<RemoteFile> files = new Vector<RemoteFile>();
+ try {
+ // Directory listing
+ Vector<?> entries = sftpChannel.ls(workingDirectory);
+ for (int i = 0; i < entries.size(); i++) {
+ LsEntry entry = (LsEntry) entries.get(i);
+ if (entry.getAttrs().isDir() == isDir &&
+ !entry.getFilename().equals(".") && !entry.getFilename().equals("..")) {
+ // Setting the remote file properties
+ RemoteFile file = new RemoteFile();
+ file.setName(entry.getFilename());
+ file.setBase(directoryToApplyLs);
+ file.setDate(new Date((long)entry.getAttrs().getMTime() * 1000));
+ file.setDir(isDir);
+ file.setSize(isDir ? 0 : entry.getAttrs().getSize());
+
+ files.add(file);
+ }
+ }
+ } catch (SftpException e) {
+ log(e.getMessage(), Project.MSG_WARN);
+ }
+
+ return files;
+ }
+
+ /**
+ * Lists the directories in the given directory.
+ */
+ @Override
+ public Vector<RemoteFile> listDir(String base, String directoryToApplyLs)
+ throws BiomajBuildException {
+ return list(base, directoryToApplyLs, true);
+ }
+
+ /**
+ * Lists the files in the given directory.
+ */
+ @Override
+ public Vector<RemoteFile> listFiles(String base, String directoryToApplyLs)
+ throws BiomajBuildException {
+ return list(base, directoryToApplyLs, false);
+ }
+
+ /*
+ * GETTERS // SETTERS
+ */
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public int getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
+ }
+
+ public int getMaxTries() {
+ return maxTries;
+ }
+
+ public void setMaxTries(int maxTries) {
+ this.maxTries = maxTries;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getServer() {
+ return server;
+ }
+
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/org.inria.biomaj.internal.ant.task.net.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/org.inria.biomaj.internal.ant.task.net.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/org.inria.biomaj.internal.ant.task.net.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.internal.ant.task.net" metadata="uml2-1.0" initialized="true" zoom="0.75" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="RemoteFile" location="360,19" size="281,446" id="org.inria.biomaj.internal.ant.task.net/RemoteFile" runTimeClassModel="isDir,getName(),RemoteFile(Ljava.lang.String;Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;),setAttributes(Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;),setLinkName(Ljava.lang.String;),date,getDate(),getSize(),base,getBase(),isDir(),patRemoteFile,setBase(Ljava.lang.String;),linkName,size,setName(Ljava.lang.String;),RemoteFile(Ljava.lang.String;Ljava.io.File;),isLink(),name,RemoteFile(Ljava.lang.String;),setSize(Ljava.lang.Long;),toString(),setDir(Z),setDate(Ljava.util.Date;),getAbsolutePath(),getLinkName(),RemoteFile()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="130,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="322,380">
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;Ljava.io.File;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteFile" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#RemoteFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="toString" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#toString()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setAttributes" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setAttributes(Lorg.apache.commons.net.ftp.FTPClient;Lorg.apache.commons.net.ftp.FTPFile;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDate" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getDate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDate" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setDate(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSize" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSize" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setSize(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinkName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getLinkName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLinkName" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setLinkName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isLink" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#isLink()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isDir" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#isDir()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDir" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setDir(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBase" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getBase()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAbsolutePath" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#getAbsolutePath()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBase" id="org.inria.biomaj.internal.ant.task.net/RemoteFile#setBase(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="RsyncImpl" location="670,510" size="414,291" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl" runTimeClassModel="password,listDir(Ljava.lang.String;Ljava.lang.String;),getOuptutListingRsync(Ljava.lang.String;),listFiles(Ljava.lang.String;Ljava.lang.String;),RsyncImpl(Lorg.apache.tools.ant.Task;),setUsername(Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),setServer(Ljava.lang.String;),setPassword(Ljava.lang.String;),list(Ljava.lang.String;Ljava.lang.String;Z),getPassword(),getUsername(),username,disconnect(),server,getServer(),getFilesRegExp(Ljava.lang.String;Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="101,57"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,285">
+ <children xsi:type="editmodel:MethodEditModel" name="RsyncImpl" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#RsyncImpl(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="disconnect" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#disconnect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFilesRegExp" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#getFilesRegExp(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPassword" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#getPassword()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPassword" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#setPassword(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getServer" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#getServer()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setServer" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#setServer(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUsername" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#getUsername()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUsername" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#setUsername(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listDir" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#listDir(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listFiles" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl#listFiles(Ljava.lang.String;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/RsyncImpl" source="//@children.1" target="//@children.2/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="206,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RsyncImpl->org.inria.biomaj.ant.task.net/RSyncListingParser" source="//@children.1" target="//@children.10" targetEnd="//@children.1/@sourceConnections.1/@children.2" label="//@children.1/@sourceConnections.1/@children.0" sourceEnd="//@children.1/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="195,291" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="205,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="HttpImpl" location="170,510" size="448,181" id="org.inria.biomaj.internal.ant.task.net/HttpImpl" runTimeClassModel="listDir(Ljava.lang.String;Ljava.lang.String;),list(Ljava.lang.String;Ljava.lang.String;Z),httpServer,listFiles(Ljava.lang.String;Ljava.lang.String;),init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),HttpImpl(Lorg.apache.tools.ant.Task;),disconnect()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="103,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,133">
+ <children xsi:type="editmodel:MethodEditModel" name="HttpImpl" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#HttpImpl(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="disconnect" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#disconnect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="list" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#list(Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listDir" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#listDir(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listFiles" id="org.inria.biomaj.internal.ant.task.net/HttpImpl#listFiles(Ljava.lang.String;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.5/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/HttpImpl" source="//@children.2" target="//@children.3" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="223,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="321,298" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.inria.biomaj.internal.ant.task.net/HttpImpl->org.inria.biomaj.ant.task.net/HttpListingParser" source="//@children.2" target="//@children.6" targetEnd="//@children.2/@sourceConnections.1/@children.2" label="//@children.2/@sourceConnections.1/@children.0" sourceEnd="//@children.2/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="245,181" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="130,-1"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0" name="RemoteCommandImpl" location="928,68" size="643,299" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl" runTimeClassModel="listDir(Ljava.lang.String;Ljava.lang.String;),getFilePathAttributRemoteConfig(Ljava.lang.String;),listFiles(Ljava.lang.String;Ljava.lang.String;),checkRemoteDirectory(Ljava.lang.String;),getResultBuffer(),log(Ljava.lang.String;I),writeListing(Ljava.util.Collection;),getTask(),init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),throwExceptionBiomaj(Ljava.lang.String;Ljava.lang.String;),setResultBuffer(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.util.Collection;),setTask(Lorg.apache.tools.ant.Task;),getPortAttributRemoteConfig(Ljava.lang.String;),getProtocolAttributRemoteConfig(Ljava.lang.String;),checkWithExcludedFiles(Ljava.lang.String;Ljava.lang.String;),disconnect(),server,getFilesMatchWithRegularExpression(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.util.TreeMap;Z),getListingFiles(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getFile(Lorg.apache.tools.ant.Task;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),bufferExist(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getListingFilesWithBufferFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),RemoteCommandImpl(Lorg.apache.tools.ant.Task;),getFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getServeurAttributRemoteConfig(Ljava.lang.String;),getFileUncompressed(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),match(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getFileUncompressed(Lorg.apache.tools.ant.Task;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),org.inria.biomaj.internal.ant.task.net.RemoteCommandImpl.ListingBuffer,lBuffer,bw,task">
+ <children xsi:type="editmodel:CompartmentEditModel" size="109,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="749,532">
+ <children xsi:type="editmodel:MethodEditModel" name="RemoteCommandImpl" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#RemoteCommandImpl(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="disconnect" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#disconnect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listFiles" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#listFiles(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listDir" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#listDir(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListingFilesWithBufferFile" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#getListingFilesWithBufferFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListingFiles" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#getListingFiles(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFile" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#getFile(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFileUncompressed" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#getFileUncompressed(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTask" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#getTask()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTask" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#setTask(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl#log(Ljava.lang.String;I)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="270,295"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl->org.inria.biomaj.internal.ant.task.net/RemoteFile" source="//@children.3" target="//@children.0" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,149" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="281,198"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="FtpImpl" location="1150,510" size="441,201" id="org.inria.biomaj.internal.ant.task.net/FtpImpl" runTimeClassModel="password,listDir(Ljava.lang.String;Ljava.lang.String;),connect(),listFiles(Ljava.lang.String;Ljava.lang.String;),cONNEX_TIME_OUT,activeMode,init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),client,port,nB_TRY,list(Ljava.lang.String;Ljava.lang.String;Z),cONNEX_TIME_OUT_STATIC,isFile(Ljava.lang.String;Lorg.apache.commons.net.ftp.FTPFile;),nB_TRY_STATIC,username,FtpImpl(Lorg.apache.tools.ant.Task;),disconnect(),server">
+ <children xsi:type="editmodel:CompartmentEditModel" size="188,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,171">
+ <children xsi:type="editmodel:MethodEditModel" name="FtpImpl" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#FtpImpl(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="connect" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#connect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="disconnect" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#disconnect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listDir" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#listDir(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listFiles" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#listFiles(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isFile" id="org.inria.biomaj.internal.ant.task.net/FtpImpl#isFile(Ljava.lang.String;Lorg.apache.commons.net.ftp.FTPFile;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/FtpImpl" source="//@children.4" target="//@children.2/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="220,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/FtpImpl->org.apache.commons.net.ftp/FTPClient" source="//@children.4" target="//@children.9" targetEnd="//@children.4/@sourceConnections.1/@children.2" label="//@children.4/@sourceConnections.1/@children.0" sourceEnd="//@children.4/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="260,201" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="170,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="LocalImpl" location="1653,515" size="421,171" id="org.inria.biomaj.internal.ant.task.net/LocalImpl" runTimeClassModel="listDir(Ljava.lang.String;Ljava.lang.String;),LocalImpl(Lorg.apache.tools.ant.Task;),listFiles(Ljava.lang.String;Ljava.lang.String;),init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;),getFileWithImpl(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),disconnect(),listFiles">
+ <children xsi:type="editmodel:CompartmentEditModel" size="76,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="594,114">
+ <children xsi:type="editmodel:MethodEditModel" name="LocalImpl" id="org.inria.biomaj.internal.ant.task.net/LocalImpl#LocalImpl(Lorg.apache.tools.ant.Task;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="init" id="org.inria.biomaj.internal.ant.task.net/LocalImpl#init(Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="disconnect" id="org.inria.biomaj.internal.ant.task.net/LocalImpl#disconnect()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listDir" id="org.inria.biomaj.internal.ant.task.net/LocalImpl#listDir(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="listFiles" id="org.inria.biomaj.internal.ant.task.net/LocalImpl#listFiles(Ljava.lang.String;Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/RemoteCommandImpl<-org.inria.biomaj.internal.ant.task.net/LocalImpl" source="//@children.5" target="//@children.2/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="210,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.internal.ant.task.net/LocalImpl->java.io/File" source="//@children.5" target="//@children.11" targetEnd="//@children.5/@sourceConnections.1/@children.2" label="//@children.5/@sourceConnections.1/@children.0" sourceEnd="//@children.5/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="148,171" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="137,0"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicMethods="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.1" name="HttpListingParser" location="219,893" size="404,61" id="org.inria.biomaj.ant.task.net/HttpListingParser" runTimeClassModel="getFileSize(),getFileName(),groupeSizeFile,groupDateDir,patternLineDirectory,rf,parse(),setLine(Ljava.lang.String;),groupDateFile,HttpListingParser(Ljava.lang.String;IILjava.lang.String;Ljava.lang.String;IIILjava.lang.String;),getTime(),lineToParse,getLinkName(),matches(Ljava.lang.String;),isLink(),groupNameDir,patternLineFile,getRemoteFile(),groupNameFile">
+ <children xsi:type="editmodel:CompartmentEditModel" size="157,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="1096,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="org.inria.biomaj.ant.task.net/ListingParser<-org.inria.biomaj.ant.task.net/HttpListingParser" source="//@children.6" target="//@children.7" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="403,39" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="71,-1" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.8/@sourceConnections.0 //@children.10/@sourceConnections.0 //@children.6/@sourceConnections.0" name="ListingParser" location="928,1019" size="328,291" id="org.inria.biomaj.ant.task.net/ListingParser" runTimeClassModel="parse(),getFileSize(),remoteFile,setLine(Ljava.lang.String;),fileName,getFileName(),getTime(),linkName,getLinkName(),getRemoteFile(),isLink()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="63,38">
+ <children xsi:type="editmodel:AttributeEditModel" name="fileName" id="org.inria.biomaj.ant.task.net/ListingParser#fileName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="linkName" id="org.inria.biomaj.ant.task.net/ListingParser#linkName"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="161,152">
+ <children xsi:type="editmodel:MethodEditModel" name="getFileName" id="org.inria.biomaj.ant.task.net/ListingParser#getFileName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFileSize" id="org.inria.biomaj.ant.task.net/ListingParser#getFileSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinkName" id="org.inria.biomaj.ant.task.net/ListingParser#getLinkName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteFile" id="org.inria.biomaj.ant.task.net/ListingParser#getRemoteFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTime" id="org.inria.biomaj.ant.task.net/ListingParser#getTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isLink" id="org.inria.biomaj.ant.task.net/ListingParser#isLink()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="parse" id="org.inria.biomaj.ant.task.net/ListingParser#parse()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLine" id="org.inria.biomaj.ant.task.net/ListingParser#setLine(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="164,1075" size="700,170" fontInfo="Arial-12-0" note="Certain protocole ont besoin de parser pour interpreter les resultats
d'une requete :
Ces parseurs permettent de définir des methodes recuperant les attributs d'un fichier 
ou d'interpreter d'autres données 
Les protocoles tel que ftp ou local ne necessite pas de parseur car il existe des librairies natives
(jar commons-net et classe Files)">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.8" target="//@children.7" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="700,84" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,140"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.4/@sourceConnections.1 //@children.12/@sourceConnections.0" name="FTPClient" location="1240,830" size="341,64" id="org.apache.commons.net.ftp/FTPClient">
+ <children xsi:type="editmodel:CompartmentEditModel" size="285,361"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="423,1539"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.1/@sourceConnections.1" name="RSyncListingParser" location="660,849" size="401,58" id="org.inria.biomaj.ant.task.net/RSyncListingParser">
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="179,171"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="org.inria.biomaj.ant.task.net/ListingParser<-org.inria.biomaj.ant.task.net/RSyncListingParser" source="//@children.10" target="//@children.7" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="400,36" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="147,-1" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.1 //@children.12/@sourceConnections.1" name="File" location="1664,824" size="275,65" id="java.io/File">
+ <children xsi:type="editmodel:CompartmentEditModel" size="158,228"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="358,1216"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" backgroundRGB="255,192,203" location="1409,965" size="431,85" fontInfo="Arial-12-0" note="Les protocoles FTP et LOCAL utilise des classes natives.
La librairie commons-net de Jakarta pour le protocole ftp
Les classes du package io pour le protocole local">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.12" target="//@children.9" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="85,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="254,64"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.12" target="//@children.11" targetEnd="//@children.12/@sourceConnections.1/@children.1" sourceEnd="//@children.12/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="342,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="87,65"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of Ant remote task BioMAJ.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/SftpImplTest.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/SftpImplTest.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/SftpImplTest.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,316 @@
+package org.inria.biomaj.internal.ant.task.net.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Random;
+import java.util.Set;
+import java.util.Vector;
+
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.internal.ant.task.net.SftpImpl;
+import org.inria.biomaj.utils.BiomajException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+
+/**
+ * JUnit test class for sftp implementation.
+ * It consists in :
+ * <ul>
+ * <li>testing the remote listing methods : ensures that the listed
+ * files and directories are the expected ones</li>
+ * <li>testing the download method : ensures that all the files are
+ * downloaded and that they are the same (md5 checksum)</li>
+ * </ul>
+ *
+ * Sftp server has to be running on localhost as we create need to create the
+ * tests files.
+ *
+ * @author rsabas
+ *
+ */
+public class SftpImplTest {
+
+ private final int FILE_COUNT = 5;
+ private final int DIR_COUNT = 2;
+
+ // Server address
+ private String server;
+ private int port;
+ private String login;
+ private String password;
+ // Remote directory to be accessed
+ private String remoteDirectory;
+ // Local directory where the files should be download to
+ private String localDirectory;
+
+ // Files to retrieve
+ private HashMap<String, File> remoteFiles;
+ // Remote directories to be checked after listing
+ private Vector<File> remoteDirectories;
+
+ private SftpImpl client;
+
+ public SftpImplTest() {
+ remoteFiles = new HashMap<String, File>(FILE_COUNT);
+ remoteDirectories = new Vector<File>(DIR_COUNT);
+ client = new SftpImpl(null);
+ localDirectory = "/home/romaric/sftpdl";
+ port = 22;
+ }
+
+ /**
+ * Sets up the test environment.
+ */
+ @Before
+ public void setUp() throws Exception {
+
+ server = "localhost";
+ login = "romaric";
+ password = "toto";
+
+
+ remoteDirectory = System.getProperty("user.home") + "/testsftp";
+ File testDir = new File(remoteDirectory);
+ if (testDir.exists())
+ removeDir(testDir);
+
+ testDir.mkdir();
+
+ File f = null;
+
+ // Dummy files
+ for (int i = 0; i < FILE_COUNT; i++) {
+ f = new File(testDir, "file" + i );
+ f.createNewFile();
+ createRemoteFile(f);
+ }
+
+ // Dummy directories
+ for (int i = 0; i < DIR_COUNT; i++) {
+ f = new File(remoteDirectory + "/dir" + i);
+ f.mkdir();
+ remoteDirectories.add(f);
+ }
+
+ /*
+ * Starts up the client
+ */
+
+ // As we can't call the client.init() method because it needs objects
+ // that are not initialized unless we run the whole biomaj application,
+ // we will manually initialize the fields that we need the work the
+ // tests out.
+ client.setServer(server);
+ client.setPort(port);
+ client.setUsername(login);
+ client.setPassword(password);
+ client.setTimeout(SftpImpl.DEFAULT_TIMEOUT);
+ client.setMaxTries(SftpImpl.DEFAULT_MAX_TRIES);
+
+ client.connect();
+ }
+
+
+ /**
+ * This method :
+ * - Writes a random sequence of bytes in the given file
+ * - Calcultates the md5 hash of the file
+ * - Adds the file to the map with the hash as the key
+ *
+ * @param file
+ */
+ private void createRemoteFile(File file) {
+ FileOutputStream out = null;
+ try {
+ // Writing in the file
+ out = new FileOutputStream(file);
+ byte[] buffer = new byte[100];
+ Random rnd = new Random();
+ rnd.nextBytes(buffer);
+ out.write(buffer);
+
+ // Getting the md5 hash
+ MessageDigest digest = MessageDigest.getInstance("MD5");
+ digest.update(buffer);
+ String hash = new String(digest.digest());
+
+ // Registering the file in the map
+ remoteFiles.put(hash, file);
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ finally {
+ if (out != null)
+ try {
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+ /**
+ * Recursively removes the given directory and its children.
+ * @param file dir to remove
+ */
+ private static void removeDir(File file) {
+ if (file.isDirectory()) {
+ File[] files = file.listFiles();
+ for (File f : files)
+ removeDir(f);
+ }
+ file.delete();
+ }
+
+ /**
+ * Tears down test environment.
+ */
+ @After
+ public void tearDown() throws Exception {
+ removeDir(new File(remoteDirectory));
+
+ client.disconnect();
+ }
+
+ /**
+ * Tests the file listing method.
+ */
+ @Test
+ public void testListFiles() {
+ Vector<RemoteFile> check = client.listFiles(remoteDirectory, "");
+ // All files are listed
+ assertEquals(remoteFiles.size(), check.size());
+ // The files are the same
+ Collection<File> files = remoteFiles.values();
+ for (RemoteFile rf : check)
+ assertTrue(contains(files, rf.getName()));
+ }
+
+ /**
+ * Tests whether a vector contains a file with the given filename.
+ * @param files file vector
+ * @param fileName file name to be found
+ * @return found ?
+ */
+ private static boolean contains(Collection<File> files, String fileName) {
+ for (File f : files)
+ if (f.getName().equals(fileName))
+ return true;
+ return false;
+ }
+
+ /**
+ * Tests the directory listing method.
+ */
+ @Test
+ public void testListDir() {
+ Vector<RemoteFile> check = client.listDir(remoteDirectory, "");
+
+ // All the directories are listed
+ assertEquals(remoteDirectories.size(), check.size());
+ // The files are the same
+ for (RemoteFile rf : check)
+ assertTrue(contains(remoteDirectories, rf.getName()));
+ }
+
+ /**
+ * Test the file retrieving method.
+ * Downloads each file and checks their md5 hash.
+ *
+ * @throws BiomajException
+ */
+ @Test
+ public void testGetFileWithImpl() throws BiomajException {
+ Set<String> keys = remoteFiles.keySet();
+ for (String key : keys) {
+ String fileName = remoteFiles.get(key).getName();
+ /*
+ * The method we need to test is protected, so we use some
+ * reflection to access it. The method is identified by its name
+ * and its parameters type.
+ */
+ Class<?>[] paramsType = new Class[]{String.class, String.class, String.class, String.class};
+ try {
+ // Method lookup
+ Method toTest = client.getClass().getDeclaredMethod("getFileWithImpl", paramsType);
+ // Access restriction suppression
+ toTest.setAccessible(true);
+ // Invocation
+ Object[] paramsValue = new Object[]{remoteDirectory, fileName, localDirectory, fileName};
+ toTest.invoke(client, paramsValue);
+ } catch (SecurityException e) {
+ System.err.println(e.getMessage());
+ } catch (NoSuchMethodException e) {
+ System.err.println(e.getMessage());
+ } catch (IllegalArgumentException e) {
+ System.err.println(e.getMessage());
+ } catch (IllegalAccessException e) {
+ System.err.println(e.getMessage());
+ } catch (InvocationTargetException e) {
+ System.err.println(e.getMessage());
+ }
+
+ File test = new File(localDirectory + "/" + fileName);
+ assertTrue(test.exists());
+ assertTrue(sameHash(key, test));
+ }
+ }
+
+ /**
+ * Tests whether the hash of the file is the same as
+ * the given one.
+ *
+ * @param hash reference hash
+ * @param file file whose hash has to be checked
+ * @return same hash ?
+ */
+ private boolean sameHash(String hash, File file) {
+ byte[] buffer = new byte[(int)file.length()];
+ FileInputStream in = null;
+ try {
+ in = new FileInputStream(file);
+ in.read(buffer);
+
+ MessageDigest digest = MessageDigest.getInstance("MD5");
+ digest.update(buffer);
+ String foo = new String(digest.digest());
+ return foo.equals(hash);
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if (in != null)
+ in.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return false;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/TestSftpImpl.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/TestSftpImpl.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/internal/ant/task/net/test/TestSftpImpl.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,316 @@
+package org.inria.biomaj.internal.ant.task.net.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Random;
+import java.util.Set;
+import java.util.Vector;
+
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.internal.ant.task.net.SftpImpl;
+import org.inria.biomaj.utils.BiomajException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+
+/**
+ * JUnit test class for sftp implementation.
+ * It consists in :
+ * <ul>
+ * <li>testing the remote listing methods : ensures that the listed
+ * files and directories are the expected ones</li>
+ * <li>testing the download method : ensures that all the files are
+ * downloaded and that they are the same (md5 checksum)</li>
+ * </ul>
+ *
+ * Sftp server has to be running on localhost as we create need to create the
+ * tests files.
+ *
+ * @author rsabas
+ *
+ */
+public class TestSftpImpl {
+
+ private final int FILE_COUNT = 5;
+ private final int DIR_COUNT = 2;
+
+ // Server address
+ private String server;
+ private int port;
+ private String login;
+ private String password;
+ // Remote directory to be accessed
+ private String remoteDirectory;
+ // Local directory where the files should be download to
+ private String localDirectory;
+
+ // Files to retrieve
+ private HashMap<String, File> remoteFiles;
+ // Remote directories to be checked after listing
+ private Vector<File> remoteDirectories;
+
+ private SftpImpl client;
+
+ public TestSftpImpl() {
+ remoteFiles = new HashMap<String, File>(FILE_COUNT);
+ remoteDirectories = new Vector<File>(DIR_COUNT);
+ client = new SftpImpl(null);
+ localDirectory = "/home/romaric/sftpdl";
+ port = 22;
+ }
+
+ /**
+ * Sets up the test environment.
+ */
+ @Before
+ public void setUp() throws Exception {
+
+ server = "localhost";
+ login = "romaric";
+ password = "toto";
+
+
+ remoteDirectory = System.getProperty("user.home") + "/testsftp";
+ File testDir = new File(remoteDirectory);
+ if (testDir.exists())
+ removeDir(testDir);
+
+ testDir.mkdir();
+
+ File f = null;
+
+ // Dummy files
+ for (int i = 0; i < FILE_COUNT; i++) {
+ f = new File(testDir, "file" + i );
+ f.createNewFile();
+ createRemoteFile(f);
+ }
+
+ // Dummy directories
+ for (int i = 0; i < DIR_COUNT; i++) {
+ f = new File(remoteDirectory + "/dir" + i);
+ f.mkdir();
+ remoteDirectories.add(f);
+ }
+
+ /*
+ * Starts up the client
+ */
+
+ // As we can't call the client.init() method because it needs objects
+ // that are not initialized unless we run the whole biomaj application,
+ // we will manually initialize the fields that we need the work the
+ // tests out.
+ client.setServer(server);
+ client.setPort(port);
+ client.setUsername(login);
+ client.setPassword(password);
+ client.setTimeout(SftpImpl.DEFAULT_TIMEOUT);
+ client.setMaxTries(SftpImpl.DEFAULT_MAX_TRIES);
+
+ client.connect();
+ }
+
+
+ /**
+ * This method :
+ * - Writes a random sequence of bytes in the given file
+ * - Calcultates the md5 hash of the file
+ * - Adds the file to the map with the hash as the key
+ *
+ * @param file
+ */
+ private void createRemoteFile(File file) {
+ FileOutputStream out = null;
+ try {
+ // Writing in the file
+ out = new FileOutputStream(file);
+ byte[] buffer = new byte[100];
+ Random rnd = new Random();
+ rnd.nextBytes(buffer);
+ out.write(buffer);
+
+ // Getting the md5 hash
+ MessageDigest digest = MessageDigest.getInstance("MD5");
+ digest.update(buffer);
+ String hash = new String(digest.digest());
+
+ // Registering the file in the map
+ remoteFiles.put(hash, file);
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ finally {
+ if (out != null)
+ try {
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+ /**
+ * Recursively removes the given directory and its children.
+ * @param file dir to remove
+ */
+ private static void removeDir(File file) {
+ if (file.isDirectory()) {
+ File[] files = file.listFiles();
+ for (File f : files)
+ removeDir(f);
+ }
+ file.delete();
+ }
+
+ /**
+ * Tears down test environment.
+ */
+ @After
+ public void tearDown() throws Exception {
+ removeDir(new File(remoteDirectory));
+
+ client.disconnect();
+ }
+
+ /**
+ * Tests the file listing method.
+ */
+ @Test
+ public void testListFiles() {
+ Vector<RemoteFile> check = client.listFiles(remoteDirectory, "");
+ // All files are listed
+ assertEquals(remoteFiles.size(), check.size());
+ // The files are the same
+ Collection<File> files = remoteFiles.values();
+ for (RemoteFile rf : check)
+ assertTrue(contains(files, rf.getName()));
+ }
+
+ /**
+ * Tests whether a vector contains a file with the given filename.
+ * @param files file vector
+ * @param fileName file name to be found
+ * @return found ?
+ */
+ private static boolean contains(Collection<File> files, String fileName) {
+ for (File f : files)
+ if (f.getName().equals(fileName))
+ return true;
+ return false;
+ }
+
+ /**
+ * Tests the directory listing method.
+ */
+ @Test
+ public void testListDir() {
+ Vector<RemoteFile> check = client.listDir(remoteDirectory, "");
+
+ // All the directories are listed
+ assertEquals(remoteDirectories.size(), check.size());
+ // The files are the same
+ for (RemoteFile rf : check)
+ assertTrue(contains(remoteDirectories, rf.getName()));
+ }
+
+ /**
+ * Test the file retrieving method.
+ * Downloads each file and checks their md5 hash.
+ *
+ * @throws BiomajException
+ */
+ @Test
+ public void testGetFileWithImpl() throws BiomajException {
+ Set<String> keys = remoteFiles.keySet();
+ for (String key : keys) {
+ String fileName = remoteFiles.get(key).getName();
+ /*
+ * The method we need to test is protected, so we use some
+ * reflection to access it. The method is identified by its name
+ * and its parameters type.
+ */
+ Class<?>[] paramsType = new Class[]{String.class, String.class, String.class, String.class};
+ try {
+ // Method lookup
+ Method toTest = client.getClass().getDeclaredMethod("getFileWithImpl", paramsType);
+ // Access restriction suppression
+ toTest.setAccessible(true);
+ // Invocation
+ Object[] paramsValue = new Object[]{remoteDirectory, fileName, localDirectory, fileName};
+ toTest.invoke(client, paramsValue);
+ } catch (SecurityException e) {
+ System.err.println(e.getMessage());
+ } catch (NoSuchMethodException e) {
+ System.err.println(e.getMessage());
+ } catch (IllegalArgumentException e) {
+ System.err.println(e.getMessage());
+ } catch (IllegalAccessException e) {
+ System.err.println(e.getMessage());
+ } catch (InvocationTargetException e) {
+ System.err.println(e.getMessage());
+ }
+
+ File test = new File(localDirectory + "/" + fileName);
+ assertTrue(test.exists());
+ assertTrue(sameHash(key, test));
+ }
+ }
+
+ /**
+ * Tests whether the hash of the file is the same as
+ * the given one.
+ *
+ * @param hash reference hash
+ * @param file file whose hash has to be checked
+ * @return same hash ?
+ */
+ private boolean sameHash(String hash, File file) {
+ byte[] buffer = new byte[(int)file.length()];
+ FileInputStream in = null;
+ try {
+ in = new FileInputStream(file);
+ in.read(buffer);
+
+ MessageDigest digest = MessageDigest.getInstance("MD5");
+ digest.update(buffer);
+ String foo = new String(digest.digest());
+ return foo.equals(hash);
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if (in != null)
+ in.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return false;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/AddLocalFilesTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/AddLocalFilesTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/AddLocalFilesTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,102 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * Cette classe n'est pas encore utiliser.....Devrait ajouter les fichier
+ * pour la tache COPY/LINK des fichiers reutilisable par biomaj des anciennes versions
+ * @author ofilangi
+ *
+ */
+public class AddLocalFilesTask extends GeneralWorkflowTask {
+
+ private Vector<FileDesc> files = new Vector<FileDesc>();
+
+ public AddLocalFilesTask(Session s) {
+ super(s);
+ }
+
+
+ public void addFile(String location) throws BiomajException {
+ FileDesc f = new FileDesc(location,false);
+ this.files.add(f);
+ }
+
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+ List<Map<String, String>> filz = BiomajSQLQuerier.getTaskFiles(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ addFilesInVector(filz, files);
+ }
+
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.copyTag;
+ }
+
+
+ @Override
+ public void fillElement(long taskId) {
+ String query = "UPDATE sessionTask set taskType='" + getProcessName() + "' WHERE " +
+ "idsessionTask=" + taskId + ";";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ addFilesInDB(files, taskId);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Bank.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Bank.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Bank.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,1238 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajVersionManagement;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * @author ofilangi 12/03/2007 : Bug vider la liste listeSession avant de la remplir dans l methode fill
+ */
+public class Bank {
+
+ /**
+ * @uml.property name="id"
+ */
+ private Long id ;
+
+ /**
+ * @uml.property name="config"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Configuration config = new Configuration();
+
+ /**
+ * @uml.property name="start"
+ */
+ private Date start = null ;
+
+ /**
+ * @uml.property name="end"
+ */
+ private Date end = null ;
+
+ private Vector<Session> listOldSession = new Vector<Session>();
+
+ /**
+ * @uml.property name="currentSession"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Session currentSession = new Session(this);
+
+ /**
+ * @uml.property name="update"
+ */
+ private boolean update = false ;
+
+ /**
+ * @uml.property name="remove"
+ */
+ private boolean remove = false ;
+
+ /**
+ * @uml.property name="removeOk"
+ */
+ private boolean removeOk = true ;
+
+ //Resultat du workflow
+ //--------------------
+ /**
+ * @uml.property name="workflowInfoProductionDir"
+ */
+ private String workflowInfoProductionDir;
+ /**
+ * @uml.property name="workflowInfoIsDeployed"
+ */
+ private Boolean workflowInfoIsDeployed = false;
+ /**
+ * @uml.property name="workflowInfoRelease"
+ */
+ private String workflowInfoRelease;
+ /**
+ * @uml.property name="workflowInfoSizeRelease"
+ */
+ private long workflowInfoSizeRelease;
+ /**
+ * @uml.property name="workflowInfoSizeDownload"
+ */
+ private long workflowInfoSizeDownload;
+ /**
+ * @uml.property name="workflowInfoRemovedRelease"
+ */
+ private String workflowInfoRemovedRelease;
+
+ private boolean isRebuilt = false;
+
+ //Etat de la banque en prod
+ //-------------------------
+ private Vector<ProductionDirectory> bankStateListProductionDirectories = new Vector<ProductionDirectory>();
+
+ private List<Map<String, String>> allExtractedFiles = null;
+
+ /**
+ * Speed up the bank loading if disabled.
+ */
+ private boolean loadMessages = true;
+
+
+ /**
+ * @uml.property name="errorOnWorkflow"
+ */
+ private Boolean errorOnWorkflow = false;
+
+ public Bank() {
+ setId(BiomajUtils.getUniqueNumericId());
+ currentSession.setId(BiomajUtils.getUniqueNumericId());
+ //listSession.add(session);
+ }
+
+ public void setRelease(String release) {
+ setWorkflowInfoRelease(release);
+ }
+
+ public void setOnlineDirectory(String online) {
+ setWorkflowInfoProductionDir(online);
+ }
+
+
+ public void setLogFile(String logfile) {
+ currentSession.setLogfile(logfile);
+ }
+
+ public String getLogFile() {
+ return currentSession.getLogfile();
+ }
+
+ public void setBankSize(Long id) {
+ currentSession.setId(id);
+ }
+
+ public void setStartProcess(String process) {
+ currentSession.setWorkflowTask(getIdProcess(process));
+ GeneralWorkflowTask proc = currentSession.getWorkflowTask(getIdProcess(process));
+ proc.setStart(new Date());
+ proc.setStatus(GeneralWorkflowTask.STATUS_KO);
+ }
+
+ public GeneralWorkflowTask setEndProcess(String process) throws BuildException {
+ GeneralWorkflowTask proc = currentSession.getWorkflowTask(getIdProcess(process));
+ if (proc == null)
+ throw new BuildException ("Can't initialize end process:"+process+" (Process not initialized)");
+
+ proc.setEnd(new Date());
+ proc.setStatus(GeneralWorkflowTask.STATUS_OK);
+ return proc;
+ }
+
+ public GeneralWorkflowTask getProcessRuntime(String process) throws BuildException {
+ return currentSession.getWorkflowTask(getIdProcess(process));
+ }
+
+ public void addWarnProcess(String process,String warn) {
+ GeneralWorkflowTask proc = currentSession.getWorkflowTask(getIdProcess(process));
+ if (proc == null)
+ currentSession.getWarn().add(warn);
+ else
+ proc.getWarn().add(warn);
+ }
+
+ public void addErrProcess(String process,String err) {
+ GeneralWorkflowTask proc = currentSession.getWorkflowTask(getIdProcess(process));
+ if (proc == null)
+ currentSession.getErr().add(err);
+ else
+ proc.getErr().add(err);
+ }
+
+ public void addFilesInExtraction(String locationUncomp,String refHash) throws BiomajException {
+ ExtractTask proc = (ExtractTask)currentSession.getWorkflowTask(Session.EXTRACT);
+ proc.addFile(locationUncomp,refHash);
+ }
+
+ public void addFilesInProduction(String location,String refHash,boolean copy) throws BiomajException {
+ MakeReleaseTask proc = (MakeReleaseTask) currentSession.getWorkflowTask(Session.MOVE);
+ proc.addFile(location,refHash,copy);
+ }
+
+ public void addDownloadFile(String location,long timeOnRemoteServer,long sizeOnRemoteServer) throws BiomajException {
+ DownloadTask proc = (DownloadTask) currentSession.getWorkflowTask(Session.DOWNLOAD);
+ proc.setEnd(new Date());
+ proc.addFile(location);
+ }
+
+ public FileDesc addLocalOfflineFile(String location) throws BiomajException {
+ CheckTask proc = (CheckTask) currentSession.getWorkflowTask(Session.CHECK);
+ return proc.addFile(location);
+ }
+
+ public void addLocalOnlineFile(String location) throws BiomajException {
+ AddLocalFilesTask proc = (AddLocalFilesTask) currentSession.getWorkflowTask(Session.COPY);
+ proc.addFile(location);
+ }
+
+ protected int getIdProcess(String process) {
+ if (BiomajConst.preprocessTarget.compareTo(process)==0)
+ return Session.PREPROCESS;
+ if (BiomajConst.releaseTarget.compareTo(process)==0)
+ return Session.RELEASE;
+ if (BiomajConst.checkTarget.compareTo(process)==0)
+ return Session.CHECK;
+ if (BiomajConst.downloadTarget.compareTo(process)==0)
+ return Session.DOWNLOAD;
+ if (BiomajConst.extractTarget.compareTo(process)==0)
+ return Session.EXTRACT;
+ if (BiomajConst.copyTarget.compareTo(process)==0)
+ return Session.COPY;
+ if (BiomajConst.postprocessTarget.compareTo(process)==0)
+ return Session.POSTPROCESS;
+ if (BiomajConst.moveTarget.compareTo(process)==0)
+ return Session.MOVE;
+ if (BiomajConst.deployTarget.compareTo(process)==0)
+ return Session.DEPLOYMENT;
+ if (BiomajConst.removeprocessTarget.compareTo(process)==0)
+ return Session.REMOVEPROCESS;
+
+ return -1;
+ }
+
+ /**
+ * @return the currentSession
+ * @uml.property name="currentSession"
+ */
+ public Session getCurrentSession() {
+ return currentSession;
+ }
+
+ /**
+ * @return the config
+ * @uml.property name="config"
+ */
+ public Configuration getConfig() {
+ return config;
+ }
+
+ /**
+ * @param config the config to set
+ * @uml.property name="config"
+ */
+ public void setConfig(Configuration config) {
+ this.config = config;
+ }
+
+ public void addProductionDirectory(String path) {
+ ProductionDirectory pd = new ProductionDirectory();
+ pd.setPath(path);
+ pd.setSession(getCurrentSession().getId());
+ pd.setState(ProductionDirectory.AVAILABLE);
+ pd.setCreationDate(new Date());
+ long size = BiomajUtils.computeDirectorySize(path);
+ setWorkflowInfoSizeRelease(size);
+ pd.setSize(size);
+ bankStateListProductionDirectories.add(pd);
+ Collections.sort(bankStateListProductionDirectories);
+
+
+
+ }
+
+ public void removeProductionDirectory(String path) {
+
+ if (path==null||path.compareTo("")==0)
+ return;
+
+ ProductionDirectory temp = new ProductionDirectory();
+ temp.setPath(path);
+ temp.setState(ProductionDirectory.AVAILABLE);
+
+ int i = bankStateListProductionDirectories.indexOf(temp);
+
+ if (i == -1) {
+ BiomajLogger.getInstance().log("Can't remove directory in statefile:["+path+"] (not present inside)");
+ return;
+ }
+ ProductionDirectory pd = bankStateListProductionDirectories.get(i);
+ pd.setState(ProductionDirectory.REMOVE);
+ pd.setRemoveDate(new Date());
+ }
+
+ /**
+ * @return the bankStateListProductionDirectories
+ * @uml.property name="bankStateListProductionDirectories"
+ */
+ public Vector<ProductionDirectory> getBankStateListProductionDirectories() {
+ return bankStateListProductionDirectories;
+ }
+
+ /**
+ * @param bankStateListProductionDirectories the bankStateListProductionDirectories to set
+ * @uml.property name="bankStateListProductionDirectories"
+ */
+ public void setBankStateListProductionDirectories(
+ List<ProductionDirectory> listProductionDirectories) {
+ this.bankStateListProductionDirectories = new Vector<ProductionDirectory>();
+ bankStateListProductionDirectories.addAll(listProductionDirectories);
+ Collections.sort(this.bankStateListProductionDirectories);
+ }
+
+ /**
+ * Get for oinformation, subtask available for this update
+ * @param process Constante from class Session
+ */
+ public GeneralWorkflowTask getAvailableProcess(int process) {
+ GeneralWorkflowTask res = null ;
+ for (int i=listOldSession.size()-1;i>=0;i--) {
+ res = listOldSession.get(i).getWorkflowTask(process);
+ if ( res!= null)
+ return res;
+ }
+ return null;
+ }
+
+
+ //pour les pre et post process, le status est contenu a l interieur des sous fichiers xml...
+ //la tache globale peut etre à status=ko mais un metaprocess peut s etre bien passe!
+ //Cette methode rend l'ensemble des metaProcess qui on un status ok!
+
+ public Collection<MetaProcess> getAvailableMetaProcess(int process) throws BiomajException {
+ HashMap<String, MetaProcess> inter = new HashMap<String, MetaProcess>();
+ if ((process != Session.POSTPROCESS)&&(process != Session.PREPROCESS)&&(process != Session.REMOVEPROCESS) ) {
+ BiomajLogger.getInstance().log("Internal error : Bank::getAllAvailableProcess Can't get MetaProcess from process preprocess/postprocess/removeprocess");
+ return new Vector<MetaProcess>();
+ }
+
+ listOldSession.add(currentSession);
+
+ for (int i=listOldSession.size()-1;i>=0;i--) {
+ GeneralWorkflowTask res = listOldSession.get(i).getWorkflowTask(process);
+
+ if (res == null)
+ continue;
+
+ if (res instanceof PreProcessTask) {
+ PreProcessTask pre = (PreProcessTask) res;
+
+ Vector<MetaProcess> value = pre.getMetaProcess(null);
+
+ for (MetaProcess mp : value) {
+
+ //System.out.print(mp.getBlock()+":"+mp.getName());
+ if (mp.getStatusStr().trim().compareTo("ok")!=0)
+ continue;
+ //Si deja inserer alors pas besoin de traiter (car on parcours la liste de session à l envers donc le premier entre et le dernier "ok".....)
+ if (!inter.containsKey(mp.getBlock()+mp.getName())) {
+ inter.put(mp.getBlock()+mp.getName(), mp);
+ //System.out.println(" --> ok");
+ } else {
+ //System.out.println("");
+ }
+ }
+
+
+ } else {
+ BiomajLogger.getInstance().log("Internal error : Bank::getAllAvailableProcess process ("+process+") derived not from PreProcess Task!");
+ }
+
+ }
+
+ listOldSession.remove(listOldSession.size()-1);
+
+ return inter.values();
+ }
+
+ public Collection<MetaProcess> getAvailableMetaProcessSql(int process) throws BiomajException {
+ HashMap<String, MetaProcess> inter = new HashMap<String, MetaProcess>();
+ if ((process != Session.POSTPROCESS)&&(process != Session.PREPROCESS)&&(process != Session.REMOVEPROCESS) ) {
+ BiomajLogger.getInstance().log("Internal error : Bank::getAllAvailableProcess Can't get MetaProcess from process preprocess/postprocess/removeprocess");
+ return new Vector<MetaProcess>();
+ }
+
+ listOldSession.add(currentSession);
+
+ for (int i=listOldSession.size()-1;i>=0;i--) {
+ GeneralWorkflowTask res = listOldSession.get(i).getWorkflowTask(process);
+
+ if (res == null)
+ continue;
+
+ if (res instanceof PreProcessTask) {
+ PreProcessTask pre = (PreProcessTask) res;
+
+ Vector<MetaProcess> value = pre.getMetaProcess(null);
+
+ for (MetaProcess mp : value) {
+
+ //System.out.print(mp.getBlock()+":"+mp.getName());
+ if (mp.getStatusStr().trim().compareTo("ok")!=0)
+ continue;
+ //Si deja inserer alors pas besoin de traiter (car on parcours la liste de session à l envers donc le premier entre et le dernier "ok".....)
+ if (!inter.containsKey(mp.getBlock()+mp.getName())) {
+ inter.put(mp.getBlock()+mp.getName(), mp);
+ //System.out.println(" --> ok");
+ } else {
+ //System.out.println("");
+ }
+ }
+
+
+ } else {
+ BiomajLogger.getInstance().log("Internal error : Bank::getAllAvailableProcess process ("+process+") derived not from PreProcess Task!");
+ }
+
+ }
+
+ listOldSession.remove(listOldSession.size()-1);
+
+ return inter.values();
+ }
+
+
+ /**
+ * @return the end
+ * @uml.property name="end"
+ */
+ public Date getEnd() {
+ return end;
+ }
+
+ /**
+ * @param end the end to set
+ * @uml.property name="end"
+ */
+ public void setEnd(Date end) {
+ currentSession.setEnd(end);
+ this.end = end;
+ }
+
+ /**
+ * @return the listOldSession
+ * @uml.property name="listOldSession"
+ */
+ public Vector<Session> getListOldSession() {
+ return listOldSession;
+ }
+
+ /**
+ * @param listOldSession the listOldSession to set
+ * @uml.property name="listOldSession"
+ */
+ public void setListOldSession(Vector<Session> listSession) {
+ this.listOldSession = listSession;
+ }
+
+ /**
+ * @return the start
+ * @uml.property name="start"
+ */
+ public Date getStart() {
+ return start;
+ }
+
+ /**
+ * @param start the start to set
+ * @uml.property name="start"
+ */
+ public void setStart(Date start) {
+ this.start = start;
+ }
+
+ public void setLoadMessages(boolean load) {
+ loadMessages = load;
+ }
+
+ /**
+ * @return the workflowInfoIsDeployed
+ * @uml.property name="workflowInfoIsDeployed"
+ */
+ public Boolean getWorkflowInfoIsDeployed() {
+ return workflowInfoIsDeployed;
+ }
+
+ /**
+ * @param workflowInfoIsDeployed the workflowInfoIsDeployed to set
+ * @uml.property name="workflowInfoIsDeployed"
+ */
+ public void setWorkflowInfoIsDeployed(Boolean workflowInfoIsDeployed) {
+ this.workflowInfoIsDeployed = workflowInfoIsDeployed;
+ }
+
+ /**
+ * @return the workflowInfoProductionDir
+ * @uml.property name="workflowInfoProductionDir"
+ */
+ public String getWorkflowInfoProductionDir() {
+ return workflowInfoProductionDir;
+ }
+
+ /**
+ * @param workflowInfoProductionDir the workflowInfoProductionDir to set
+ * @uml.property name="workflowInfoProductionDir"
+ */
+ public void setWorkflowInfoProductionDir(String workflowInfoProductionDir) {
+ this.workflowInfoProductionDir = workflowInfoProductionDir;
+ }
+
+ /**
+ * @return the workflowInfoRelease
+ * @uml.property name="workflowInfoRelease"
+ */
+ public String getWorkflowInfoRelease() {
+ return workflowInfoRelease;
+ }
+
+ /**
+ * @param workflowInfoRelease the workflowInfoRelease to set
+ * @uml.property name="workflowInfoRelease"
+ */
+ public void setWorkflowInfoRelease(String workflowInfoRelease) {
+ this.workflowInfoRelease = workflowInfoRelease;
+ }
+
+ /**
+ * @return the workflowInfoRemovedRelease
+ * @uml.property name="workflowInfoRemovedRelease"
+ */
+ public String getWorkflowInfoRemovedRelease() {
+ return workflowInfoRemovedRelease;
+ }
+
+ /**
+ * @param workflowInfoRemovedRelease the workflowInfoRemovedRelease to set
+ * @uml.property name="workflowInfoRemovedRelease"
+ */
+ public void setWorkflowInfoRemovedRelease(String workflowInfoRemovedRelease) {
+ this.workflowInfoRemovedRelease = workflowInfoRemovedRelease;
+ }
+
+ public void fill(Map<String, String> update, boolean loadSession) {
+ if (update != null) {
+ try {
+ setStart(BiomajUtils.stringToDate(update.get(BiomajSQLQuerier.UPDATE_START)));
+ String endDate = update.get(BiomajSQLQuerier.UPDATE_END);
+ if (endDate != null && !endDate.trim().isEmpty())
+ setEnd(BiomajUtils.stringToDate(endDate));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ String updateString = update.get(BiomajSQLQuerier.UPDATED);
+ if (updateString.equalsIgnoreCase("true") || updateString.equals("1"))
+ setUpdate(true);
+ else
+ setUpdate(false);
+
+ if (loadSession) {
+ List<Map<String, String>> sessions = BiomajSQLQuerier.getUpdateSessions(Integer.valueOf(update.get(BiomajSQLQuerier.UPDATE_ID)));
+ //O.Filangi Attention, Correction Bug, on efface la session initialisee dans le constructeur
+ if (listOldSession.size() > 0)
+ listOldSession.removeAllElements();
+
+
+ for (Map<String, String> session : sessions) {
+ Session s = new Session(this);
+ s.fill(session, loadMessages);
+ listOldSession.add(s);
+ }
+
+ Collections.sort(listOldSession);
+ }
+
+ setWorkflowInfoIsDeployed(Boolean.valueOf(update.get(BiomajSQLQuerier.PRODUCTION_DIR_DEPLOYED)));
+ setWorkflowInfoProductionDir(update.get(BiomajSQLQuerier.PRODUCTION_DIR_PATH));
+ setWorkflowInfoSizeRelease(BiomajUtils.stringToSize(update.get(BiomajSQLQuerier.SIZE_RELEASE)));
+ setWorkflowInfoRelease(update.get(BiomajSQLQuerier.UPDATE_RELEASE));
+ setWorkflowInfoSizeDownload(BiomajUtils.stringToSize(update.get(BiomajSQLQuerier.SIZE_DOWNLOAD)));
+ List<Map<String, String>> directories = BiomajSQLQuerier.getProductionDirectories(getConfig().getName());
+ for (Map<String, String> directory : directories) {
+ ProductionDirectory pd = new ProductionDirectory();
+ pd.setPath(directory.get(BiomajSQLQuerier.DIR_PATH));
+ pd.setSession(Long.valueOf(directory.get(BiomajSQLQuerier.DIR_SESSION)));
+ pd.setStateStr(directory.get(BiomajSQLQuerier.DIR_STATE));
+ try {
+ pd.setCreationDate(BiomajUtils.stringToDate(directory.get(BiomajSQLQuerier.DIR_CREATION)));
+ if (pd.getState() == ProductionDirectory.REMOVE) {
+ pd.setRemoveDate(BiomajUtils.stringToDate(directory.get(BiomajSQLQuerier.DIR_REMOVE)));
+ }
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ bankStateListProductionDirectories.add(pd);
+ }
+ }
+
+ }
+
+ public void fillWithDirectoryVersion(String dir) throws BiomajException {
+ //System.out.println(BiomajUtils.getAttribute(node,"idLastSession"));
+ setStart(new Date());
+ setEnd(new Date());
+ setUpdate(true);
+
+ currentSession.fillWithDirectoryVersion(dir);
+
+ File d = new File(dir);
+
+ if (!d.exists())
+ throw new BiomajException("directory.not.exist");
+ try {
+ setWorkflowInfoIsDeployed(true);
+ setWorkflowInfoProductionDir(d.getCanonicalPath());
+ setWorkflowInfoSizeRelease(BiomajUtils.computeDirectorySize(d.getCanonicalPath()));
+
+ //File current = new File(d.getCanonicalPath()+"/current");
+ String[] l = d.getCanonicalPath().split("/");
+ String nameDir = l[l.length-1];
+ setWorkflowInfoRelease(BmajVersionManagement.getRelease(nameDir));
+ setWorkflowInfoSizeDownload(getWorkflowInfoSizeRelease());
+
+
+ ProductionDirectory pd = new ProductionDirectory();
+ pd.setPath(d.getCanonicalPath());
+ pd.setSession(currentSession.getId());
+ pd.setState(ProductionDirectory.AVAILABLE);
+ pd.setCreationDate(new Date());
+
+ bankStateListProductionDirectories.add(pd);
+ } catch (IOException ioe) {
+ throw new BiomajException("io.error",ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * @return the id
+ * @uml.property name="id"
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * @param id the id to set
+ * @uml.property name="id"
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+
+ //To take decision, we need information about workflow task
+
+ /**
+ * Return true if task is ever executed and the status of this task is ok!
+ */
+ public boolean workflowTaskEverPast(int task) {
+ for (Session s : listOldSession) {
+// System.out.println("Session : "+s.getStart());
+ GeneralWorkflowTask wt = s.getWorkflowTask(task);
+ if (wt != null)
+ if (wt.getStatus() == GeneralWorkflowTask.STATUS_OK)
+ return true;
+ }
+
+ if (currentSession == null)
+ return false;
+
+ GeneralWorkflowTask wt = currentSession.getWorkflowTask(task);
+ if (wt!=null)
+ if (wt.getStatus()==GeneralWorkflowTask.STATUS_OK)
+ return true;
+
+ return false;
+ }
+
+ /**
+ * @return the update
+ * @uml.property name="update"
+ */
+ public boolean isUpdate() {
+ return update;
+ }
+
+ /**
+ * @param update the update to set
+ * @uml.property name="update"
+ */
+ public void setUpdate(boolean update) {
+ this.update = update;
+ }
+
+ /**
+ * @return has remove process been launched?
+ * @uml.property name="remove"
+ */
+ public boolean isRemove() {
+ return remove;
+ }
+
+ /**
+ * @param remove the remove to set
+ * @uml.property name="remove"
+ */
+ public void setRemove(boolean remove) {
+ this.remove = remove;
+ }
+
+ /**
+ * @return has remove process been launched successfully?
+ * @uml.property name="remove"
+ */
+ public boolean isRemoveOk() {
+ return removeOk;
+ }
+
+ /**
+ * @param remove the removeOk to set
+ * @uml.property name="removeOk"
+ */
+ public void setRemoveOk(boolean removeOk) {
+ this.removeOk = removeOk;
+ }
+
+ public boolean getStatus() {
+ //Si la derniere session s est deroule correctemment, alors la bank c'est ok!
+ if (listOldSession.size()<=0)
+ return false;
+ Collections.sort(listOldSession);
+ //System.out.println(BiomajUtils.dateToString(listSession.get(listSession.size()-2).getStart()));
+ return listOldSession.get(listOldSession.size()-1).getStatus();
+ }
+
+ /**
+ * @return the workflowInfoSizeRelease
+ * @uml.property name="workflowInfoSizeRelease"
+ */
+ public long getWorkflowInfoSizeRelease() {
+ return workflowInfoSizeRelease;
+ }
+
+ /**
+ * @param workflowInfoSizeRelease the workflowInfoSizeRelease to set
+ * @uml.property name="workflowInfoSizeRelease"
+ */
+ public void setWorkflowInfoSizeRelease(long workflowInfoSizeRelease) {
+ this.workflowInfoSizeRelease = workflowInfoSizeRelease;
+ }
+
+
+ /******************************************
+ * Methode d 'information general sur le cycle update
+ */
+
+ public int getNbFilesDownloaded() {
+ int nb = 0;
+
+ //Lors de la premiere session on obtient les infos exact du nbre de telechargement !
+
+ CheckTask dt = (CheckTask)currentSession.getWorkflowTask(Session.CHECK);
+ if (dt != null)
+ {
+ return dt.getNbFilesDownload();
+ }
+
+ for (Session s: listOldSession) {
+ CheckTask d = (CheckTask)s.getWorkflowTask(Session.CHECK);
+ if (d !=null)
+ return d.getNbFilesDownload();
+ }
+
+ return nb;
+ }
+
+ public int getNbFilesLocalOnline() {
+ int nb = 0;
+
+ CheckTask dt = (CheckTask)currentSession.getWorkflowTask(Session.CHECK);
+ if (dt != null)
+ {
+ return dt.getNbFilesLocalOnline();
+ }
+
+ for (Session s: listOldSession) {
+ CheckTask d = (CheckTask)s.getWorkflowTask(Session.CHECK);
+ if (d !=null)
+ return d.getNbFilesLocalOnline();
+ }
+
+ return nb;
+ }
+
+
+ public int getNbFilesLocalOffline() {
+ int nb = 0;
+
+ CheckTask dt = (CheckTask)currentSession.getWorkflowTask(Session.CHECK);
+ if (dt != null)
+ {
+ return dt.getNbFilesLocalOffline();
+ }
+
+ for (Session s: listOldSession) {
+ CheckTask d = (CheckTask)s.getWorkflowTask(Session.CHECK);
+ if (d !=null)
+ return d.getNbFilesLocalOffline();
+ }
+
+ return nb;
+ }
+
+
+ public float getBandWidth() {
+ float nb = 0;
+ int t = 0;
+ for (Session s: listOldSession) {
+ DownloadTask d = (DownloadTask)s.getWorkflowTask(Session.DOWNLOAD);
+ if (d !=null)
+ {
+ t++;
+ nb+=d.getBandWidth();
+ }
+ }
+ DownloadTask dt = (DownloadTask)currentSession.getWorkflowTask(Session.DOWNLOAD);
+ if (dt != null)
+ {
+ t++;
+ nb+=dt.getBandWidth();
+ }
+
+ return (nb/t);
+ }
+
+ /**
+ * Cas d un nouveau cycle :
+ * 1) update=true (une nouvelle version a traiter ) && le stage DEPLOYMENT est passe && DEPLOYMENT.status = ok
+ * 2) update=false et le stage CHECK est passe && CHECK.status = ok
+ *
+ * @return
+ */
+ public boolean needANewCycleUpdate() {
+ boolean isUpdate = isUpdate();
+
+ if (isUpdate) {
+ //le stage deployement n est pas encore passe
+ if (getAvailableProcess(Session.DEPLOYMENT)==null) {
+ return false;
+ }
+
+ if (getAvailableProcess(Session.DEPLOYMENT).getStatus()==GeneralWorkflowTask.STATUS_OK)
+ return true;
+ else
+ return false;
+ } else {
+// le stage deployement n est pas encore passe
+ if (getAvailableProcess(Session.CHECK)==null)
+ return false;
+
+ if (getAvailableProcess(Session.CHECK).getStatus()==GeneralWorkflowTask.STATUS_OK)
+ return true;
+ else
+ return false;
+
+ }
+
+ /*
+ arg0.getProject().log("Need A new Cycle Update : ",Project.MSG_DEBUG);
+ boolean avail = getAvailableProcess(Session.DEPLOYMENT)!=null;
+ arg0.getProject().log("A)Find Deployement : "+Boolean.toString(avail),Project.MSG_DEBUG);
+ boolean status = getStatus();
+ arg0.getProject().log("B)Status : "+Boolean.toString(status),Project.MSG_DEBUG);
+
+ arg0.getProject().log("(A&&B) : "+Boolean.toString(status&&status),Project.MSG_DEBUG);
+
+
+ boolean isUpdate = isUpdate();
+ arg0.getProject().log("C)isUpdate : "+Boolean.toString(isUpdate),Project.MSG_DEBUG);
+
+ arg0.getProject().log("(!C&&B) : "+Boolean.toString(!isUpdate&&status),Project.MSG_DEBUG);
+
+ boolean ret = ((avail)&&(status));//||(!isUpdate&&status));
+ arg0.getProject().log("(A&&B) || (!C&&B) : "+Boolean.toString(ret),Project.MSG_DEBUG);
+
+ return ret;
+ */
+ }
+
+ /**
+ * @return the errorOnWorkflow
+ * @uml.property name="errorOnWorkflow"
+ */
+ public Boolean getErrorOnWorkflow() {
+ return errorOnWorkflow;
+ }
+
+ /**
+ * @param errorOnWorkflow the errorOnWorkflow to set
+ * @uml.property name="errorOnWorkflow"
+ */
+ public void setErrorOnWorkflow(Boolean errorOnWorkflow) {
+ this.errorOnWorkflow = errorOnWorkflow;
+ }
+
+ /**
+ * @return the workflowInfoSizeDownload
+ * @uml.property name="workflowInfoSizeDownload"
+ */
+ public long getWorkflowInfoSizeDownload() {
+ return workflowInfoSizeDownload;
+ }
+
+ /**
+ * @param workflowInfoSizeDownload the workflowInfoSizeDownload to set
+ * @uml.property name="workflowInfoSizeDownload"
+ */
+ public void setWorkflowInfoSizeDownload(long workflowInfoSizeDownload) {
+ this.workflowInfoSizeDownload = workflowInfoSizeDownload;
+ }
+
+ public Vector<MetaProcess> getAllMetaProcessFromPhasePreprocess() throws BiomajException {
+ Vector<MetaProcess> res = new Vector<MetaProcess>();
+
+ for (Session s : listOldSession) {
+ PreProcessTask pp = (PreProcessTask)s.getWorkflowTask(Session.PREPROCESS);
+ if (pp!=null)
+ res.addAll(pp.getMetaProcess(null));
+ }
+
+ if (currentSession != null) {
+ PreProcessTask pp = (PreProcessTask)currentSession.getWorkflowTask(Session.PREPROCESS);
+ if (pp!=null)
+ res.addAll(pp.getMetaProcess(null));
+ }
+ return res;
+ }
+
+ public Vector<MetaProcess> getAllMetaProcessFromPhasePostprocess(String block) throws BiomajException {
+ Vector<MetaProcess> res = new Vector<MetaProcess>();
+ for (Session s : listOldSession) {
+ PostProcessTask pp = (PostProcessTask)(s.getWorkflowTask(Session.POSTPROCESS));
+ if (pp!=null)
+ {
+ /*for (MetaProcess mp : pp.getMetaProcess(block))
+ System.out.println("add:"+mp.getName()+" date_start:"+BiomajUtils.dateToString(mp.getStart()));*/
+ res.addAll(pp.getMetaProcess(block));
+ }
+ }
+
+ if (currentSession != null) {
+ PostProcessTask pp = (PostProcessTask)currentSession.getWorkflowTask(Session.POSTPROCESS);
+ if (pp!=null)
+ res.addAll(pp.getMetaProcess(block));
+ }
+
+ return res;
+ }
+
+ public Vector<MetaProcess> getAllMetaProcessFromPhaseRemoveprocess(String block) throws BiomajException {
+ Vector<MetaProcess> res = new Vector<MetaProcess>();
+ for (Session s : listOldSession) {
+ RemoveProcessTask pp = (RemoveProcessTask)(s.getWorkflowTask(Session.REMOVEPROCESS));
+ if (pp!=null)
+ res.addAll(pp.getMetaProcess(block));
+ }
+
+ if (currentSession != null) {
+ RemoveProcessTask pp = (RemoveProcessTask)currentSession.getWorkflowTask(Session.REMOVEPROCESS);
+ if (pp!=null)
+ res.addAll(pp.getMetaProcess(block));
+ }
+
+ return res;
+ }
+
+ public FileDesc findFile(String name,long time,long size,int typeSession) {
+
+ for (Session s : listOldSession) {
+ GeneralWorkflowTask task = s.getWorkflowTask(typeSession);
+ if (task == null)
+ continue;
+ if (typeSession == Session.DOWNLOAD) {
+ DownloadTask d = (DownloadTask)task;
+ for (FileDesc fd : d.getFiles()) {
+ if ((time == fd.getTime())&&(size == fd.getSize())&&(fd.getName().compareTo(name)==0))
+ return fd ;
+ }
+ }
+ else if (typeSession == Session.EXTRACT) {
+ ExtractTask d = (ExtractTask)task;
+ for (FileDesc fd : d.getFiles()) {
+ if ((time == fd.getTime())&&(size == fd.getSize())&&(fd.getName().compareTo(name)==0))
+ return fd ;
+ }
+ }
+ }
+ return null ;
+ }
+
+ public Vector<FileDesc> findDependancesFilesFromExtraction(String refHash) {
+ Vector<FileDesc> l = new Vector<FileDesc>();
+
+ for (Session s : listOldSession) {
+ ExtractTask task = (ExtractTask)s.getWorkflowTask(Session.EXTRACT);
+ if (task == null)
+ continue;
+ for (FileDesc fd : task.getFiles()) {
+ if (refHash.compareTo(fd.getRefHash())==0)
+ l.add(fd);
+ }
+ }
+/*
+ if (currentSession != null) {
+ ExtractTask task = (ExtractTask)currentSession.getWorkflowTask(Session.EXTRACT);
+ if (task != null)
+ for (FileDesc fd : task.getFiles()) {
+ if (refHash.compareTo(fd.getRefHash())==0)
+ l.add(fd);
+ }
+ }
+*/
+ return l;
+ }
+
+
+ public void setBankToRebuild(Bank b) throws BiomajException {
+ BiomajLogger.getInstance().log("******** setBankToRebuild *************** ");
+ config = b.config ;
+ end = null;
+
+ errorOnWorkflow = b.errorOnWorkflow;
+ id = b.id;
+
+ listOldSession.removeAllElements();
+ for (Session s : b.listOldSession) {
+
+ if (s.getWorkflowTask(Session.DEPLOYMENT)!=null) {
+ s.getWorkflowTasks().remove(Session.DEPLOYMENT);
+ }
+ if (s.getWorkflowTask(Session.POSTPROCESS)!=null) {
+ s.getWorkflowTask(Session.POSTPROCESS).setStatus(GeneralWorkflowTask.STATUS_KO);
+ }
+ listOldSession.add(s);
+ }
+
+ start = new Date();
+ update = true;
+ isRebuilt = true;
+ workflowInfoIsDeployed = false;
+ workflowInfoProductionDir = b.workflowInfoProductionDir;
+ workflowInfoRelease = b.workflowInfoRelease;
+ workflowInfoSizeDownload = b.workflowInfoSizeDownload;
+ workflowInfoSizeRelease = b.workflowInfoSizeRelease;
+
+ //if (bankStateListProductionDirectories.size()>0)
+ //bankStateListProductionDirectories.remove(bankStateListProductionDirectories.size()-1) ;
+
+ }
+
+ /**
+ *
+ * @param block peut etre null, dans ce cas cherche le metaprocess dans tous les blocks
+ * @param metaprocess peu etre null
+ * @return
+ */
+ public MetaProcess getLastMetaProcessExecuted(String block,String metaprocess) throws BiomajException {
+
+ Vector<PostProcessTask> listPostProcess = new Vector<PostProcessTask>();
+
+ for (Session s : listOldSession) {
+ if (s.getWorkflowTask(Session.POSTPROCESS)!=null)
+ listPostProcess.add(0, (PostProcessTask)s.getWorkflowTask(Session.POSTPROCESS));
+ }
+
+ for (PostProcessTask p : listPostProcess) {
+ Vector<MetaProcess> mps = p.getMetaProcess(block);
+
+ if (mps != null)
+ for (MetaProcess mp : mps)
+ if (mp.getName().compareTo(metaprocess)==0)
+ return mp;
+ }
+
+ return null;
+ }
+
+ /**
+ * Retourn les dernier metaProcess executer
+ * @return
+ * @throws BiomajException
+ */
+ public Vector<MetaProcess> getAllMetaprocess() throws BiomajException {
+ Vector<PostProcessTask> listPostProcess = new Vector<PostProcessTask>();
+
+ for (Session s : listOldSession) {
+ if (s.getWorkflowTask(Session.POSTPROCESS)!=null)
+ listPostProcess.add(0, (PostProcessTask)s.getWorkflowTask(Session.POSTPROCESS));
+ }
+
+ Vector<MetaProcess> res = new Vector<MetaProcess>();
+ for (PostProcessTask p : listPostProcess) {
+ res.addAll(p.getMetaProcess(null));
+ }
+
+ Vector<MetaProcess> trueRes = new Vector<MetaProcess>();
+
+ for (MetaProcess mp1 : res) {
+ boolean ok = true;
+ for (MetaProcess mp2 : trueRes)
+ if ((mp2.getName().compareTo(mp1.getName())==0)&&(mp2.getBlock().compareTo(mp1.getBlock())==0))
+ {
+ ok = false;
+ break;
+ }
+ if (ok)
+ trueRes.add(mp1);
+ }
+
+
+ return trueRes;
+ }
+
+
+ public void setCurrentSession(Session currentSession) {
+ this.currentSession = currentSession;
+ }
+
+ public Vector<FileDesc> getGeneratedFiles(Project project, RemoteFile rf) {
+ if (project == null)
+ return null;
+ //FileDesc res;
+ //res = lastUpdateSession.findFile(rf.getAbsolutePath(), rf.getDate().getTime(), rf.getSize(), Session.DOWNLOAD);
+ String refHash = BiomajUtils.getHashFromRemoteFile(rf);
+ //if (res == null)
+ //return null;
+ Vector<FileDesc> lFd = findDependancesFilesFromExtraction(refHash);
+
+ if (lFd == null || lFd.size() == 0) {
+ // Il se peut que le fichier provienne d'une mise a jour ancienne (a la courante....)
+ project.log("Search generated file in old session for ["+rf.toString()+"]....",Project.MSG_VERBOSE);
+
+ if (allExtractedFiles == null)
+ allExtractedFiles = BiomajSQLQuerier.getAllSessionsExtractedFiles(project.getProperty(BiomajConst.dbNameProperty));
+
+ Vector<FileDesc> res = new Vector<FileDesc>();
+ for (Map<String, String> file : allExtractedFiles) {
+ if (hashAreEquals(file.get(BiomajSQLQuerier.REF_HASH),refHash)) {
+ FileDesc f = new FileDesc(file.get(BiomajSQLQuerier.FILE_LOCATION),
+ Long.valueOf(file.get(BiomajSQLQuerier.FILE_SIZE)),
+ Long.valueOf(file.get(BiomajSQLQuerier.FILE_TIME)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_LINK)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_EXTRACT)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_VOLATILE)),
+ file.get(BiomajSQLQuerier.REF_HASH));
+ res.add(f);
+
+ project.log("Generated files find!",Project.MSG_VERBOSE);
+ project.log(f.toString(),Project.MSG_VERBOSE);
+ }
+ }
+
+// Vector<FileDesc> res = BiomajSQLQuerier.getUncompressedFilesWithArchive(refHash, project.getProperty(BiomajConst.dbNameProperty), "extract");
+
+// if (res != null && res.size() > 0) {
+// project.log("Generated files find!",Project.MSG_VERBOSE);
+// for (FileDesc f : res)
+// project.log(f.toString(),Project.MSG_VERBOSE);
+// }
+
+ return res;
+ }
+
+ return lFd ;
+ }
+
+ private boolean hashAreEquals(String localHash, String remoteHash) {
+ /*
+ * Compare a hash from a remote file and a hash from this remote file once downloaded.
+ * As the two can differ whithout being actually different, we have to :
+ *
+ * 1 -Ignore the last field of the hash which is the size because the announced size on the remote server
+ * can be different from the actual size of the file once downloaded.
+ * 2 - Make sure that the second field which is the date of the file is smaller for the remote file.
+ *
+ */
+ if (localHash == null)
+ return false;
+
+ String[] splitLocal = localHash.split("_ at _");
+ String[] splitRemote = remoteHash.split("_ at _");
+
+ return splitLocal[0].equals(splitRemote[0]) && Long.valueOf(splitLocal[1]) >= Long.valueOf(splitRemote[1]);
+ }
+
+ public boolean isRebuilt() {
+ return isRebuilt;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/BiomajSQLQuerier.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/BiomajSQLQuerier.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/BiomajSQLQuerier.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,2004 @@
+package org.inria.biomaj.session.bank;
+
+import java.io.File;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Class that requests various information from the database.
+ *
+ * @author rsabas
+ *
+ */
+public class BiomajSQLQuerier {
+
+
+ //Bank
+ public static final String BANK_ID = "idbank";
+ public static final String BANK_NAME = "name";
+
+ //Configuration
+ public static final String CONFIGURATION_ID = "idconfiguration";
+ public static final String DATE = "date";
+ public static final String FILE = "file";
+
+ //LocalInfo
+ public static final String OFFLINE_DIRECTORY = "offlineDirectory";
+ public static final String VERSION_DIRECTORY = "versionDirectory";
+ public static final String FREQUENCY = "frequency";
+ public static final String DO_LINKCOPY = "dolinkcopy";
+ public static final String HAS_LOG_FILE = "logFile";
+ public static final String RELEASE_FILE = "releaseFile";
+ public static final String RELEASE_REGEXP = "releaseRegexp";
+ public static final String REMOTE_FILES = "remoteFiles";
+ public static final String REMOTE_EXCLUDED_FILES = "remoteExcludedFiles";
+ public static final String LOCAL_FILES = "localFiles";
+ public static final String N_VERSIONS = "nversions";
+
+ //RemoteInfo
+ public static final String PROTOCOL = "protocol";
+ public static final String PORT = "port";
+ public static final String DB_NAME = "dbName";
+ public static final String DB_FULLNAME = "dbFullName";
+ public static final String DB_TYPE = "dbType";
+ public static final String SERVER = "server";
+ public static final String REMOTE_DIR = "remoteDir";
+
+ //Updatebank
+ public static final String UPDATE_ID = "idupdateBank";
+ public static final String UPDATE_RELEASE = "updateRelease";
+ public static final String PRODUCTION_DIR_PATH = "productionDirectoryPath";
+ public static final String PRODUCTION_DIR_DEPLOYED = "productionDirectoryDeployed";
+ public static final String SIZE_DOWNLOAD = "sizeDownload";
+ public static final String SIZE_RELEASE = "sizeRelease";
+ public static final String UPDATE_START = "startTime";
+ public static final String UPDATE_END = "endTime";
+ public static final String UPDATE_ELAPSED = "elapsedTime";
+ public static final String UPDATED = "isUpdated";
+ public static final String NB_SESSIONS = "nbSessions";
+ public static final String ID_LAST_SESSION = "idLastSession";
+
+ //Session
+ public static final String SESSION_ID = "idsession";
+ public static final String HREF = "href";
+ public static final String PARSE = "parse";
+ public static final String SESSION_STATUS = "status";
+ public static final String SESSION_START = "startTime";
+ public static final String SESSION_END = "endTime";
+ public static final String SESSION_ELAPSED = "elapsedTime";
+ public static final String LOG_FILE = "logfile";
+
+ //SessionTask
+ public static final String TASK_ID = "idsessionTask";
+ public static final String TASK_START = "startTime";
+ public static final String TASK_END = "endTime";
+ public static final String TASK_ELAPSED = "elapsedTime";
+ public static final String TASK_STATUS = "status";
+ public static final String VALUE = "value";
+ public static final String NB_EXTRACT = "nbExtract";
+ public static final String NB_LOCAL_ONLINE_FILES = "nbLocalOnlineFiles";
+ public static final String NB_LOCAL_OFFLINE_FILES = "nbLocalOfflineFiles";
+ public static final String NB_DOWNLOADED_FILES = "nbDownloadFiles";
+ public static final String BANDWIDTH = "bandwidth";
+ public static final String NB_FILES_MOVED = "nbFilesMoved";
+ public static final String NB_FILES_COPIED = "nbFilesCopied";
+ public static final String NBRE_METAPROCESS = "nbreMetaProcess";
+ public static final String TASK_TYPE = "taskType";
+
+ //Message
+ public static final String MESSAGE_ID = "idmessage";
+ public static final String MESSAGE = "message";
+ public static final String MESSAGE_TYPE = "type";
+
+ //Metaprocess
+ public static final String META_ID = "idmetaprocess";
+ public static final String META_NAME = "name";
+ public static final String META_START = "startTime";
+ public static final String META_END = "endTime";
+ public static final String META_ELAPSED = "elapsedTime";
+ public static final String META_STATUS = "status";
+ public static final String META_LOGFILE = "logfile";
+ public static final String BLOCK = "block";
+
+ //File
+ public static final String FILE_ID = "idfile";
+ public static final String FILE_LOCATION = "location";
+ public static final String FILE_SIZE = "size";
+ public static final String FILE_TIME = "time";
+ public static final String IS_LINK = "link";
+ public static final String IS_EXTRACT = "is_extract";
+ public static final String IS_VOLATILE = "volatile";
+ public static final String REF_HASH = "refHash";
+ public static final String FILE_TYPE = "fileType";
+
+ //ProductionDirectory
+ public static final String DIR_ID = "idproductionDirectory";
+ public static final String DIR_REMOVE = "remove";
+ public static final String DIR_CREATION = "creation";
+ public static final String DIR_SIZE = "size";
+ public static final String DIR_STATE = "state";
+ public static final String DIR_SESSION = "session";
+ public static final String DIR_PATH = "path";
+
+ //Process
+ public static final String PROC_ID = "idprocess";
+ public static final String PROC_NAME = "name";
+ public static final String PROC_KEYNAME = "keyname";
+ public static final String PROC_EXE = "exe";
+ public static final String PROC_ARGS = "args";
+ public static final String PROC_DESC = "description";
+ public static final String PROC_TYPE = "type";
+ public static final String PROC_START = "startTime";
+ public static final String PROC_END = "endTime";
+ public static final String PROC_ELAPSED = "elapsedTime";
+ public static final String PROC_ERROR = "biomaj_error";
+ public static final String PROC_TIMESTAMP = "timestamp";
+ public static final String PROC_VALUE = "value";
+
+
+ private static SQLConnection connection = SQLConnectionFactory.getConnection();
+// private static BiomajLogger logger = BiomajLogger.getInstance();
+
+// private static boolean connectionInit = false;
+// private static boolean testMode = false;
+
+
+ /*
+ * Methods from former BiomajQueryXMLStateFile class...
+ */
+
+ public static synchronized boolean getUpdateBank(String bankName, long idSession, Bank bank,boolean loadSession) throws BiomajException {
+ BiomajLogger.getInstance().log("["+bankName+"]"+"START sql request : getUpdateBank "+new SimpleDateFormat("HH:mm:ss").format(new Date()));
+
+ Map<String, String> update = getUpdateFromId(idSession);
+ if (update == null)
+ return false;
+
+ bank.fill(update, loadSession);
+ BiomajLogger.getInstance().log("END sql request : getUpdateBank "+new SimpleDateFormat("HH:mm:ss").format(new Date()));
+ return true;
+ }
+
+ public static synchronized boolean getFuturReleaseBankWithoutConfiguration(String bankName, Bank bank,boolean loadSession) throws BiomajException {
+
+ BiomajLogger.getInstance().log("START sql query : getFuturReleaseBankWithoutConfiguration "+new SimpleDateFormat("HH:mm:ss").format(new Date()));
+
+ Map<String, String> update = BiomajSQLQuerier.getLatestUpdate(bankName, true);
+ if (update == null)
+ return false;
+
+ bank.fill(update,loadSession);
+ BiomajLogger.getInstance().log("END sql query : getFuturReleaseBankWithoutConfiguration "+new SimpleDateFormat("HH:mm:ss").format(new Date()));
+
+ return true;
+ }
+
+ public static synchronized Vector<FileDesc> getUncompressedFilesWithArchive(String refHash,String bankName,String fromTag) throws BiomajException {
+
+ List<Map<String, String>> filz = BiomajSQLQuerier.getAllSessionsExtractedFiles(bankName);
+ if (filz == null)
+ return null;
+
+ Vector<FileDesc> res = new Vector<FileDesc>();
+ for (Map<String, String> file : filz) {
+ if (file.get(BiomajSQLQuerier.REF_HASH).equals(refHash)) {
+ res.add(new FileDesc(file.get(BiomajSQLQuerier.FILE_LOCATION),
+ Long.valueOf(file.get(BiomajSQLQuerier.FILE_SIZE)),
+ Long.valueOf(file.get(BiomajSQLQuerier.FILE_TIME)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_LINK)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_EXTRACT)),
+ Boolean.valueOf(file.get(BiomajSQLQuerier.IS_VOLATILE)),
+ file.get(BiomajSQLQuerier.REF_HASH)));
+ }
+ }
+
+ return res;
+ }
+
+ public static synchronized long getStatMoyenneUpdate(String bankName) throws BiomajException {
+
+ List<Map<String, String>> updates = getBankUpdates(bankName, true);
+
+ if (updates == null || updates.size() == 0)
+ return 0;
+
+ double avg = 0;
+ long[] data = new long[updates.size() - 1];
+
+ for (int i = 0; i < updates.size()-1; i++) {
+ Map<String, String> u1 = updates.get(i);
+ Map<String, String> u2 = updates.get(i+1);
+ long t1 = 0;
+ long t2 = 0;
+ try {
+ t1 = BiomajUtils.stringToDate(u1.get(UPDATE_END)).getTime();
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ try {
+ t2 = BiomajUtils.stringToDate(u2.get(UPDATE_END)).getTime();
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ data[i] = t2 - t1;
+ avg += (t2-t1);
+ }
+ avg = (double)(avg / (updates.size() - 1));
+
+ return (long)avg;
+ }
+ /*
+ * END
+ */
+
+ /**
+ * Returns the X latest messages.
+ *
+ * @param messageCount number of message to retrieve
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getLastMessages(int messageCount) {
+ String query = "SELECT * FROM message ORDER BY idmessage DESC LIMIT " + messageCount;
+
+ Statement stat = connection.getStatement();
+
+ List<Map<String, String>> messages = new ArrayList<Map<String,String>>();
+ try {
+
+ ResultSet rs = connection.executeQuery(query, stat);
+ while (rs.next()) {
+ Map<String, String> message = new HashMap<String, String>();
+ message.put(MESSAGE_ID, String.valueOf(rs.getInt(MESSAGE_ID)));
+ message.put(MESSAGE_TYPE, rs.getString(MESSAGE_TYPE));
+ message.put(MESSAGE, rs.getString(MESSAGE));
+
+ messages.add(message);
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return messages;
+ }
+
+
+ /**
+ * Returns the bank corresponding to this process.
+ *
+ * @param idProcess
+ * @return
+ */
+ public static synchronized List<String> getProcessBankAndDate(int idProcess) {
+ String query = "SELECT ref_idmetaprocess FROM process WHERE idprocess=" + idProcess;
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ String metaId = rs.getString(1);
+ SQLConnectionFactory.closeConnection(stat);
+ List<String> res = new ArrayList<String>();
+ res.add(getMetaprocessBankAndDate(metaId).get(0));
+ res.add(getDate("SELECT endTime FROM process WHERE idprocess=" + idProcess));
+ return res;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return null;
+
+ }
+
+ /**
+ * Returns the bank corresponding to this metaprocess.
+ *
+ * @param idMeta
+ * @return
+ */
+ public static synchronized List<String> getMetaprocessBankAndDate(String idMeta) {
+ String query = "SELECT ref_idsessionTask FROM metaprocess WHERE idmetaprocess='" + idMeta + "'";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ int taskId = rs.getInt(1);
+ SQLConnectionFactory.closeConnection(stat);
+ List<String> res = new ArrayList<String>();
+ res.add(getTaskBankAndDate(taskId).get(0));
+ res.add(getDate("SELECT endTime FROM metaprocess WHERE idmetaprocess='" + idMeta + "'"));
+ return res;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return null;
+ }
+
+ /**
+ * Returns the bank corresponding to this session.
+ *
+ * @param idSession
+ * @return
+ */
+ public static synchronized List<String> getSessionBankAndDate(long idSession) {
+ String query = "SELECT name FROM bank WHERE idbank=" +
+ "(SELECT ref_idbank FROM configuration WHERE idconfiguration=" +
+ "(SELECT ref_idconfiguration FROM updateBank WHERE idupdateBank=" +
+ "(SELECT ref_idupdateBank FROM session WHERE idsession=" + idSession + ")));";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ String bank = rs.getString(1);
+ SQLConnectionFactory.closeConnection(stat);
+ List<String> res = new ArrayList<String>();
+ res.add(bank);
+ res.add(getDate("SELECT endTime FROM session where idsession=" + idSession));
+ return res;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return null;
+ }
+
+ /**
+ * Returns the bank corresponding to this task.
+ *
+ * @param idTask
+ * @return
+ */
+ public static synchronized List<String> getTaskBankAndDate(int idTask) {
+ String query = "SELECT ref_idsession FROM session_has_sessionTask WHERE " +
+ "ref_idsessionTask=" + idTask;
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ long sessionId = rs.getLong(1);
+ SQLConnectionFactory.closeConnection(stat);
+ List<String> res = new ArrayList<String>();
+ res.add(getSessionBankAndDate(sessionId).get(0));
+ res.add(getDate("SELECT endTime FROM sessionTask WHERE idsessionTask=" + idTask));
+ return res;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return null;
+ }
+
+ private static String getDate(String query) {
+ Statement stat = connection.getStatement();
+ ResultSet rs = connection.executeQuery(query, stat);
+ String date = "";
+ try {
+ if (rs.next()) {
+ date = BiomajUtils.dateToString(new Date(rs.getTimestamp(1).getTime()), Locale.US);
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return date;
+ }
+
+
+ /**
+ * Returns a map that contains the latest configuratoin
+ * information about the given bank.
+ *
+ * @param bankName bank whose configuration is retrieved
+ * @return
+ */
+ public static synchronized Map<String, String> getBankInfo(String bankName) {
+ /*
+ String query = "SELECT * FROM bank,configuration,localinfo,remoteinfo WHERE idbank= " +
+ "(SELECT idbank FROM bank WHERE name='" + bankName + "') AND idconfiguration=" +
+ "(SELECT idconfiguration FROM configuration WHERE configuration.ref_idbank=idbank " +
+ "AND configuration.date=(SELECT max(date) FROM configuration WHERE ref_idbank=idbank)) " +
+ "AND idlocalinfo=(SELECT ref_idlocalinfo FROM configuration where ref_idbank=idbank) " +
+ "AND idremoteinfo=(SELECT ref_idremoteInfo FROM configuration WHERE ref_idbank=idbank)";*/
+
+
+ /*
+ * Information related to the latest update
+ */
+
+ /*
+ query = "SELECT max(startTime) FROM updateBank WHERE ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" + bankId + ")";
+ Statement stat = connection.getStatement();
+ ResultSet rs = connection.executeQuery(query, stat);
+ rs = connection.getResult();
+ String maxStart = null;
+ try {
+ if (rs.next())
+ maxStart = rs.getString(1);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ query = "SELECT * FROM bank,configuration,localinfo,remoteinfo WHERE idconfiguration IN " +
+ "(SELECT ref_idconfiguration FROM updateBank WHERE ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" + bankId + ") AND " +
+ "startTime='" + maxStart + "') " +
+ "AND idremoteinfo=ref_idremoteinfo " +
+ "AND idlocalinfo=ref_idlocalinfo " +
+ "AND idbank = ref_idbank";
+ */
+
+ int bankId = getBankId(bankName);
+ if (bankId < 0)
+ return null;
+
+ String query = "SELECT * FROM bank,configuration,localInfo,remoteInfo WHERE idconfiguration IN " +
+ "(SELECT ref_idconfiguration FROM updateBank WHERE ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" + bankId + ") AND " +
+ "startTime=(SELECT max(startTime) FROM updateBank WHERE ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" + bankId + "))) " +
+ "AND idremoteinfo=ref_idremoteinfo " +
+ "AND idlocalinfo=ref_idlocalinfo " +
+ "AND idbank = ref_idbank";
+
+ Statement stat = connection.getStatement();
+ ResultSet rs = connection.executeQuery(query, stat);
+ Map<String, String> res = getBankInfo(rs);
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+
+ /**
+ * Gets a bank's configurations.
+ *
+ * @param bankId
+ * @return
+ */
+ public static List<Map<String, String>> getConfigurations(int bankId) {
+ String query = "SELECT * FROM configuration, localInfo, remoteInfo WHERE ref_idbank=" + bankId +
+ " AND ref_idremoteInfo=idremoteInfo AND ref_idlocalInfo=idlocalInfo";
+ Statement stat = connection.getStatement();
+ List<Map<String, String>> configs = new ArrayList<Map<String,String>>();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(CONFIGURATION_ID, String.valueOf(result.getLong(CONFIGURATION_ID)));
+ map.put(DATE, BiomajUtils.dateToString(new Date(result.getTimestamp(DATE).getTime()), Locale.US));
+ map.put(FILE, result.getString(FILE));
+ map.put(OFFLINE_DIRECTORY, result.getString(OFFLINE_DIRECTORY));
+ map.put(VERSION_DIRECTORY, result.getString(VERSION_DIRECTORY));
+ map.put(FREQUENCY, String.valueOf(result.getInt(FREQUENCY)));
+ map.put(DO_LINKCOPY, String.valueOf(result.getBoolean(DO_LINKCOPY)));
+ map.put(HAS_LOG_FILE, String.valueOf(result.getBoolean(HAS_LOG_FILE)));
+ map.put(RELEASE_FILE, result.getString(RELEASE_FILE));
+ map.put(RELEASE_REGEXP, result.getString(RELEASE_REGEXP));
+ map.put(REMOTE_FILES, result.getString(REMOTE_FILES));
+ map.put(REMOTE_EXCLUDED_FILES, result.getString(REMOTE_EXCLUDED_FILES));
+ map.put(LOCAL_FILES, result.getString(LOCAL_FILES));
+ map.put(N_VERSIONS, String.valueOf(result.getInt(N_VERSIONS)));
+ map.put(PROTOCOL, result.getString(PROTOCOL));
+ map.put(PORT, String.valueOf(result.getInt(PORT)));
+ map.put(DB_NAME, result.getString(DB_NAME));
+ map.put(DB_FULLNAME, result.getString(DB_FULLNAME));
+ map.put(DB_TYPE, result.getString(DB_TYPE));
+ map.put(SERVER, result.getString(SERVER));
+ map.put(REMOTE_DIR, result.getString(REMOTE_DIR));
+
+ configs.add(map);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return configs;
+ }
+
+ /**
+ * Gets a configuration's updates.
+ *
+ * @param configId
+ * @return
+ */
+ public static List<Map<String, String>> getConfigUpdates(long configId) {
+ String query = "SELECT * FROM updateBank WHERE ref_idconfiguration=" + configId;
+ Statement stat = connection.getStatement();
+ List<Map<String, String>> updates = new ArrayList<Map<String,String>>();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ updates.add(getUpdate(result));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return updates;
+ }
+
+ /**
+ * Gets bank configuration for a given update.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized Map<String, String> getBankInfoForUpdate(int updateId) {
+
+ String query = "SELECT * FROM bank, configuration, localInfo, remoteInfo WHERE " +
+ "idlocalInfo=ref_idlocalInfo AND idremoteInfo=ref_idremoteInfo AND " +
+ "idbank=ref_idbank AND idconfiguration=(SELECT ref_idconfiguration FROM updateBank WHERE " +
+ "idupdateBank=" + updateId + ")";
+
+ Statement stat = connection.getStatement();
+
+ Map<String, String> res = null;
+ ResultSet result = connection.executeQuery(query, stat);
+ res = getBankInfo(result);
+
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+
+ /**
+ * Returns bank id from its name.
+ *
+ * @param bankName
+ * @return bankId, -1 if bank was not found
+ */
+ public static synchronized int getBankId(String bankName) {
+ String query = "SELECT idbank FROM bank WHERE name='" + bankName + "'";
+ Statement stat = connection.getStatement();
+
+ int bankId = -1;
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next())
+ bankId = rs.getInt(1);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return bankId;
+ }
+
+ private static Map<String, String> getBankInfo(ResultSet result) {
+
+ Map<String, String> map = new HashMap<String, String>();
+ try {
+ if (result.next()) {
+ map.put(BANK_ID, String.valueOf(result.getInt(BANK_ID)));
+ map.put(BANK_NAME, result.getString(BANK_NAME));
+ map.put(CONFIGURATION_ID, String.valueOf(result.getLong(CONFIGURATION_ID)));
+ map.put(DATE, BiomajUtils.dateToString(new Date(result.getTimestamp(DATE).getTime()), Locale.US));
+ map.put(FILE, result.getString(FILE));
+ map.put(OFFLINE_DIRECTORY, result.getString(OFFLINE_DIRECTORY));
+ map.put(VERSION_DIRECTORY, result.getString(VERSION_DIRECTORY));
+ map.put(FREQUENCY, String.valueOf(result.getInt(FREQUENCY)));
+ map.put(DO_LINKCOPY, String.valueOf(result.getBoolean(DO_LINKCOPY)));
+ map.put(HAS_LOG_FILE, String.valueOf(result.getBoolean(HAS_LOG_FILE)));
+ map.put(RELEASE_FILE, result.getString(RELEASE_FILE));
+ map.put(RELEASE_REGEXP, result.getString(RELEASE_REGEXP));
+ map.put(REMOTE_FILES, result.getString(REMOTE_FILES));
+ map.put(REMOTE_EXCLUDED_FILES, result.getString(REMOTE_EXCLUDED_FILES));
+ map.put(LOCAL_FILES, result.getString(LOCAL_FILES));
+ map.put(N_VERSIONS, String.valueOf(result.getInt(N_VERSIONS)));
+ map.put(PROTOCOL, result.getString(PROTOCOL));
+ map.put(PORT, String.valueOf(result.getInt(PORT)));
+ map.put(DB_NAME, result.getString(DB_NAME));
+ map.put(DB_FULLNAME, result.getString(DB_FULLNAME));
+ map.put(DB_TYPE, result.getString(DB_TYPE));
+ map.put(SERVER, result.getString(SERVER));
+ map.put(REMOTE_DIR, result.getString(REMOTE_DIR));
+ } else
+ return null;
+ // We expect only 1 row
+ if (result.next())
+ throw new SQLException("More than 1 row was returned");
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ return map;
+ }
+
+
+ /**
+ * Returns information about the latest update for the given bank.
+ *
+ * @param bankName
+ * @param checkUpdate check whether the process produced an update or not
+ */
+ public static synchronized Map<String, String> getLatestUpdate(String bankName, boolean checkUpdate) {
+
+
+ int bankId = getBankId(bankName);
+ if (bankId < 0)
+ return null;
+
+ long configId = getLatestConfigurationWithSession(bankId, checkUpdate);
+
+ if (configId < 0)
+ return null;
+
+ String query;
+ if (checkUpdate) {
+ query = "SELECT * FROM updateBank WHERE ref_idconfiguration=" + configId + " AND " +
+ "endTime = (SELECT max(endTime) FROM updateBank WHERE " +
+ "ref_idconfiguration=" + configId + " AND isUpdated=true)";
+ } else
+ query = "SELECT * FROM updateBank WHERE ref_idconfiguration=" + configId + " AND " +
+ "endTime = (SELECT max(endTime) FROM updateBank WHERE " +
+ "ref_idconfiguration=" + configId + ")";
+ Statement stat = connection.getStatement();
+
+ Map<String, String> info = null;
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ if (result.next()) {
+ info = getUpdate(result);
+
+ if (result.next()) {
+ SQLConnectionFactory.closeConnection(stat);
+ throw new SQLException("More than 1 row was returned");
+ }
+ }
+ } catch (SQLException ex) {
+ SQLConnectionFactory.closeConnection(stat);
+ ex.printStackTrace();
+ return null;
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return info;
+ }
+
+ /**
+ * Returns the id of the latest configuration that contains sessions.
+ *
+ * @param bankId
+ * @param withUpdate if true, search for sessions that updated the repository
+ *
+ * @return
+ */
+ public static synchronized long getLatestConfigurationWithSession(int bankId, boolean withUpdate) {
+ String query;
+ if (withUpdate)
+ query = "SELECT idconfiguration FROM configuration WHERE " +
+ "ref_idbank=" + bankId + " AND idconfiguration IN " +
+ "(SELECT ref_idconfiguration FROM updateBank WHERE isUpdated=true) " +
+ "AND date=(SELECT max(date) FROM configuration WHERE " +
+ "ref_idbank=" + bankId + " AND idconfiguration IN " +
+ "(SELECT ref_idconfiguration FROM updateBank WHERE isUpdated=true));";
+ else
+ query = "SELECT idconfiguration FROM configuration WHERE " +
+ "ref_idbank=" + bankId + " AND date=" +
+ "(SELECT max(date) FROM configuration WHERE " +
+ "ref_idbank=" + bankId + ");";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ long l = rs.getLong(1);
+ SQLConnectionFactory.closeConnection(stat);
+ return l;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return -1;
+ }
+
+ /**
+ * Returns information about the latest update for the given bank that produced
+ * a production directory.
+ *
+ * @param bankName
+ */
+ public static synchronized Map<String, String> getLatestUpdateWithProductionDirectory(String bankName) {
+// Map<String, String> bankInfo = getBankInfo(bankName);
+// if (bankInfo == null)
+// return null;
+//
+// String configId = bankInfo.get(CONFIGURATION_ID);
+ int bankId = getBankId(bankName);
+ if (bankId < 0)
+ return null;
+
+ long configId = getLatestConfigurationWithSession(bankId, true);
+ if (configId < 0)
+ return null;
+
+// String query = "SELECT * FROM updateBank WHERE ref_idconfiguration=" + configId + " AND endTime = " +
+// "(SELECT max(endTime) FROM updateBank WHERE ref_idconfiguration=" + configId + " AND isUpdated=true) " +
+// "AND isUpdated=true AND idlastSession IN (SELECT session FROM productionDirectory);";
+
+ String query = "SELECT * FROM updateBank WHERE ref_idconfiguration=" + configId + " AND endTime = " +
+ "(SELECT max(endTime) FROM updateBank WHERE ref_idconfiguration=" + configId + " AND isUpdated=true AND productionDirectoryDeployed=true) " +
+ "AND isUpdated=true AND productionDirectoryDeployed=true;";
+
+ Statement stat = connection.getStatement();
+
+ Map<String, String> info = null;
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ if (result.next())
+ info = getUpdate(result);
+
+ if (result.next()) {
+ SQLConnectionFactory.closeConnection(stat);
+ throw new SQLException("More than 1 row was returned");
+ }
+ } catch (SQLException ex) {
+ SQLConnectionFactory.closeConnection(stat);
+ ex.printStackTrace();
+ return null;
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return info;
+ }
+
+ /**
+ * Returns all the updates for a bank.
+ *
+ * @param bankName
+ * @param withUpdate if true, retrieve only sessions that produced an update
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getBankUpdates(String bankName, boolean withUpdate) {
+
+ String query;
+ if (withUpdate)
+ query = "SELECT * FROM updateBank WHERE isUpdated=true AND ";
+ else
+ query = "SELECT * FROM updateBank WHERE ";
+ query += "ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" +
+ "(SELECT idbank FROM bank WHERE name='" + bankName + "')) ORDER BY startTime DESC;";
+
+ Statement stat = connection.getStatement();
+
+ List<Map<String, String>> info = new ArrayList<Map<String,String>>();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next())
+ info.add(getUpdate(result));
+ } catch (SQLException ex) {
+ SQLConnectionFactory.closeConnection(stat);
+ ex.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return info;
+ }
+
+
+ private static Map<String, String> getUpdate(ResultSet result) {
+
+ Map<String, String> map = new HashMap<String, String>();
+ try {
+ map.put(UPDATE_ID, String.valueOf(result.getInt(UPDATE_ID)));
+ map.put(UPDATE_RELEASE, result.getString(UPDATE_RELEASE));
+ map.put(PRODUCTION_DIR_PATH, result.getString(PRODUCTION_DIR_PATH));
+ map.put(PRODUCTION_DIR_DEPLOYED, String.valueOf(result.getBoolean(PRODUCTION_DIR_DEPLOYED)));
+ map.put(SIZE_DOWNLOAD, result.getString(SIZE_DOWNLOAD));
+ map.put(SIZE_RELEASE, result.getString(SIZE_RELEASE));
+ map.put(UPDATE_START, BiomajUtils.dateToString(new Date(result.getTimestamp(UPDATE_START).getTime()), Locale.US));
+ if (result.getTimestamp(UPDATE_END) != null)
+ map.put(UPDATE_END, BiomajUtils.dateToString(new Date(result.getTimestamp(UPDATE_END).getTime()), Locale.US));
+ else
+ map.put(UPDATE_END, "null");
+ if (result.getString(UPDATE_ELAPSED) != null)
+ map.put(UPDATE_ELAPSED,result.getString(UPDATE_ELAPSED));
+ else
+ map.put(UPDATE_ELAPSED, "null");
+ map.put(UPDATED, result.getString(UPDATED));
+ map.put(NB_SESSIONS, String.valueOf(result.getInt(NB_SESSIONS)));
+ map.put(ID_LAST_SESSION, String.valueOf(result.getLong(ID_LAST_SESSION)));
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ return map;
+ }
+
+ /**
+ * Returns the update according to the given lastSession.
+ *
+ * @param lastSession
+ * @return
+ */
+ public static synchronized Map<String, String> getUpdateFromId(long lastSession) {
+
+ String query = "SELECT * FROM updateBank WHERE idLastSession=" + lastSession + ";";
+ Statement stat = connection.getStatement();
+
+ Map<String, String> info = null;
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ if (result.next())
+ info = getUpdate(result);
+
+ if (result.next()) {
+ SQLConnectionFactory.closeConnection(stat);
+ throw new SQLException("More than 1 row was returned");
+ }
+
+ } catch (SQLException ex) {
+ SQLConnectionFactory.closeConnection(stat);
+ ex.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return info;
+ }
+
+
+ /**
+ * Returns the session list for a given update.
+ *
+ * @param updateBankId updateBank whose sessions are searched
+ * @return list of sessions stored as maps
+ */
+ public static synchronized List<Map<String, String>> getUpdateSessions(int updateBankId) {
+
+ List<Map<String, String>> sessions = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT * FROM session WHERE ref_idupdateBank=" + updateBankId + " ORDER BY session.startTime DESC";
+ Statement stat = connection.getStatement();
+
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> session = new HashMap<String, String>();
+
+ session.put(SESSION_ID, String.valueOf(result.getLong(SESSION_ID)));
+ session.put(HREF, result.getString(HREF));
+ session.put(PARSE, result.getString(PARSE));
+ session.put(SESSION_STATUS, String.valueOf(result.getBoolean(SESSION_STATUS)));
+ session.put(SESSION_START, BiomajUtils.dateToString(new Date(result.getTimestamp(SESSION_START).getTime()), Locale.US));
+ if (result.getTimestamp(SESSION_END) != null)
+ session.put(SESSION_END, BiomajUtils.dateToString(new Date(result.getTimestamp(SESSION_END).getTime()), Locale.US));
+ else
+ session.put(SESSION_END, null);
+// session.put(SESSION_ELAPSED, BiomajUtils.dateToString(new Date(result.getTime(SESSION_ELAPSED).getTime()), Locale.FRANCE));
+ session.put(SESSION_ELAPSED, result.getString(SESSION_ELAPSED));
+ session.put(LOG_FILE, result.getString(LOG_FILE));
+
+ sessions.add(session);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return sessions;
+ }
+
+ /**
+ * Returns the latest session date for a given bank.
+ *
+ * @param bankId
+ * @return
+ */
+ public static synchronized String getLatestSessionDate(int bankId) {
+ String query = "SELECT max(startTime) FROM session WHERE ref_idupdateBank IN (" +
+ "SELECT idupdateBank FROM updateBank WHERE ref_idconfiguration IN (" +
+ "SELECT idconfiguration FROM configuration WHERE ref_idbank=" + bankId + "));";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ String res = BiomajUtils.dateToString(new Date(rs.getTimestamp(1).getTime()), Locale.US);
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the lists of tasks for a given session.
+ *
+ * @param sessionId
+ * @return list of tasks stored as maps
+ */
+ public static synchronized List<Map<String, String>> getSessionTasks(long sessionId) {
+
+ List<Map<String, String>> sessionTasks = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT * from sessionTask WHERE idsessionTask IN " +
+ "(SELECT ref_idsessionTask FROM session_has_sessionTask WHERE " +
+ "ref_idsession =" + sessionId + ");";
+ Statement stat = connection.getStatement();
+
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> sessionTask = new HashMap<String, String>();
+
+ sessionTask.put(TASK_ID, String.valueOf(result.getInt(TASK_ID)));
+ sessionTask.put(TASK_START, BiomajUtils.dateToString(new Date(result.getTimestamp(TASK_START).getTime()), Locale.US));
+ sessionTask.put(TASK_END, BiomajUtils.dateToString(new Date(result.getTimestamp(TASK_END).getTime()), Locale.US));
+ sessionTask.put(TASK_ELAPSED, result.getString(TASK_ELAPSED));
+ sessionTask.put(TASK_STATUS, result.getString(TASK_STATUS));
+ sessionTask.put(VALUE, result.getString(VALUE));
+ sessionTask.put(NB_EXTRACT, String.valueOf(result.getInt(NB_EXTRACT)));
+ sessionTask.put(NB_LOCAL_OFFLINE_FILES, String.valueOf(result.getInt(NB_LOCAL_OFFLINE_FILES)));
+ sessionTask.put(NB_LOCAL_ONLINE_FILES, String.valueOf(result.getInt(NB_LOCAL_ONLINE_FILES)));
+ sessionTask.put(NB_DOWNLOADED_FILES, String.valueOf(result.getInt(NB_DOWNLOADED_FILES)));
+ sessionTask.put(BANDWIDTH, String.valueOf(result.getFloat(BANDWIDTH)));
+ sessionTask.put(NB_FILES_MOVED, String.valueOf(result.getInt(NB_FILES_MOVED)));
+ sessionTask.put(NB_FILES_COPIED, String.valueOf(result.getInt(NB_FILES_COPIED)));
+ sessionTask.put(NBRE_METAPROCESS, String.valueOf(result.getInt(NBRE_METAPROCESS)));
+ sessionTask.put(TASK_TYPE, result.getString(TASK_TYPE));
+
+ sessionTasks.add(sessionTask);
+ }
+
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return sessionTasks;
+ }
+
+ /**
+ * Returns the files of a process.
+ *
+ * @param processId
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getProcessFiles(int processId) {
+
+ String query = "SELECT * from file WHERE ref_idprocess=" + processId;
+ Statement stat = connection.getStatement();
+
+ ResultSet result = connection.executeQuery(query, stat);
+ List<Map<String, String>> res = getFiles(result);
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+
+ /**
+ * Returns the files of a task.
+ *
+ * @param taskId
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getTaskFiles(int taskId) {
+
+ List<Map<String, String>> res = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT ref_idfile FROM sessionTask_has_file WHERE " +
+ "ref_idsessionTask=" + taskId;
+ Statement stat = connection.getStatement();
+
+ /*
+ * Some sessiontask can return a resultset tens of thousands rows large,
+ * which hsqldb seems to poorly handle.
+ * To speedup the thing we try to build a request in the form : SELECT ... WHERE idfile between x AND y
+ * instead of running several times the same SELECT ... WHERE idfile = z.
+ * To do so, we have to ensure that each file id is such as id(i+1) = id(i) + 1
+ */
+ int first = -1;
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (!rs.next()) {
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+
+ first = rs.getInt(1);
+
+ int last = first;
+ while (rs.next() && rs.getInt(1) == (last++) + 1);
+
+
+ if (rs.next()) { // Not good, we have to do it the old way
+ rs.first();
+ try {
+ Statement st = connection.getStatement();
+ while (rs.next()) {
+ res.add(getFile(connection.executeQuery("SELECT * FROM file WHERE idfile=" + rs.getInt(1), st)));
+ }
+ SQLConnectionFactory.closeConnection(st);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ } else { // All the ids are consecutive
+ query = "SELECT * FROM file WHERE idfile>=" + first + " AND idfile<=" + last;
+ Statement stat2 = connection.getStatement();
+ List<Map<String, String>> filz = getFiles(connection.executeQuery(query, stat2));
+ SQLConnectionFactory.closeConnection(stat2);
+ SQLConnectionFactory.closeConnection(stat);
+ return filz;
+ }
+ } catch (SQLException e1) {
+ SQLConnectionFactory.closeConnection(stat);
+ e1.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return res;
+ }
+
+
+ /**
+ * Returns the files that were processed during the extract task
+ * of all the sessions.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getAllSessionsExtractedFiles(String bankName) {
+// Map<String, String> info = getLatestUpdate(bankName, true);
+//
+// if (info == null)
+// return null;
+//
+// int updateId = Integer.valueOf(info.get(UPDATE_ID));
+//
+// String query = "SELECT * FROM file WHERE idfile IN (SELECT ref_idfile FROM sessionTask_has_file WHERE " +
+// "ref_idsessionTask=(SELECT idsessionTask FROM sessionTask WHERE taskType='extract' AND idsessionTask IN " +
+// "(SELECT ref_idsessionTask FROM session_has_sessionTask WHERE ref_idsession=" +
+// "(SELECT idsession FROM session WHERE startTime=(SELECT max(startTime) FROM session WHERE " +
+// "ref_idupdateBank=" + updateId + ") AND ref_idupdateBank = " + updateId + "))))";
+//
+// Statement stat = connection.getStatement();
+// ResultSet rs = connection.executeQuery(query, stat);
+// ResultSet result = stat.getResultSet();
+//
+// return getFiles(result);
+
+ List<Map<String, String>> updates = getBankUpdates(bankName, true);
+ List<Map<String, String>> filz = new ArrayList<Map<String,String>>();
+
+ for (Map<String, String> update : updates) {
+// Map<String, String> update = getLatestUpdate(bankName, true);
+ String query = "SELECT * FROM file WHERE idfile IN (SELECT ref_idfile FROM sessionTask_has_file WHERE " +
+ "ref_idsessionTask IN (SELECT idsessionTask FROM sessionTask WHERE taskType='makeRelease' AND idsessionTask IN " +
+ "(SELECT ref_idsessionTask FROM session_has_sessionTask WHERE ref_idsession IN " +
+ "(SELECT idsession FROM session WHERE ref_idupdateBank=" + update.get(UPDATE_ID) + "))))";
+
+ Statement stat = connection.getStatement();
+ ResultSet rs = connection.executeQuery(query, stat);
+ filz = getFiles(rs);
+ SQLConnectionFactory.closeConnection(stat);
+ if (filz.size() > 0)
+ return filz;
+ }
+
+ return filz;
+
+ }
+
+ /**
+ * Returns the files from the resultset.
+ *
+ * @param result
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getFiles(ResultSet result) {
+ List<Map<String, String>> files = new ArrayList<Map<String,String>>();
+
+ if (result != null) {
+ try {
+ while (result.next()) {
+ Map<String, String> file = new HashMap<String, String>();
+
+ file.put(FILE_ID, String.valueOf(result.getInt(FILE_ID)));
+ file.put(FILE_LOCATION, result.getString(FILE_LOCATION));
+ file.put(FILE_SIZE, String.valueOf(result.getLong(FILE_SIZE)));
+ file.put(FILE_TIME, String.valueOf(result.getLong(FILE_TIME)));
+ file.put(IS_LINK, String.valueOf(result.getBoolean(IS_LINK)));
+ file.put(IS_EXTRACT, String.valueOf(result.getBoolean(IS_EXTRACT)));
+ file.put(IS_VOLATILE, String.valueOf(result.getBoolean(IS_VOLATILE)));
+ file.put(REF_HASH, result.getString(REF_HASH));
+ file.put(FILE_TYPE, result.getString(FILE_TYPE));
+
+ files.add(file);
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ } else
+ return null;
+
+ return files;
+ }
+
+ private static Map<String, String> getFile(ResultSet result) {
+ Map<String, String> file = null;
+
+ try {
+ if (result.next()) {
+ file = new HashMap<String, String>();
+ file.put(FILE_ID, String.valueOf(result.getInt(FILE_ID)));
+ file.put(FILE_LOCATION, result.getString(FILE_LOCATION));
+ file.put(FILE_SIZE, String.valueOf(result.getLong(FILE_SIZE)));
+ file.put(FILE_TIME, String.valueOf(result.getLong(FILE_TIME)));
+ file.put(IS_LINK, String.valueOf(result.getBoolean(IS_LINK)));
+ file.put(IS_EXTRACT, String.valueOf(result.getBoolean(IS_EXTRACT)));
+ file.put(IS_VOLATILE, String.valueOf(result.getBoolean(IS_VOLATILE)));
+ file.put(REF_HASH, result.getString(REF_HASH));
+ file.put(FILE_TYPE, result.getString(FILE_TYPE));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return file;
+ }
+
+
+ /**
+ * Returns the messages for a given task.
+ * Can be either ERROR message or WARNING message.
+ *
+ * @param taskId
+ * @return list that contains first the warnings then the errors.
+ */
+ public static synchronized List<List<String>> getTaskMessages(int taskId) {
+
+ String query = "SELECT * from message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM sessionTask_has_message WHERE " +
+ "ref_idsessionTask =" + taskId + ");";
+ Statement stat = connection.getStatement();
+
+ ResultSet result = connection.executeQuery(query, stat);
+ List<List<String>> mess = getMessages(result);
+ SQLConnectionFactory.closeConnection(stat);
+ return mess;
+
+ }
+
+
+ /**
+ * Returns the messages for a given process.
+ * Can be either ERROR message or WARNING message.
+ *
+ * @param processId
+ * @return list that contains first the warnings then the errors.
+ */
+ public static synchronized List<List<String>> getProcessMessages(int processId) {
+
+ String query = "SELECT * from message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM process_has_message WHERE " +
+ "ref_idprocess =" + processId + ");";
+ Statement stat = connection.getStatement();
+
+ ResultSet result = connection.executeQuery(query, stat);
+ List<List<String>> mess = getMessages(result);
+ SQLConnectionFactory.closeConnection(stat);
+ return mess;
+
+ }
+
+
+ /**
+ * Returns the metaprocesses for the given task.
+ *
+ * @param taskId
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getTaskMetaprocesses(int taskId) {
+
+ List<Map<String, String>> metaprocesses = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT * from metaprocess WHERE ref_idsessionTask=" + taskId;
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> metaprocess = new HashMap<String, String>();
+
+ metaprocess.put(META_ID, result.getString(META_ID));
+ metaprocess.put(META_NAME, result.getString(META_NAME));
+ metaprocess.put(META_START, BiomajUtils.dateToString(new Date(result.getTimestamp(META_START).getTime()), Locale.US));
+ metaprocess.put(META_END, BiomajUtils.dateToString(new Date(result.getTimestamp(META_END).getTime()), Locale.US));
+ metaprocess.put(META_ELAPSED, result.getString(META_ELAPSED));
+ metaprocess.put(META_STATUS, result.getString(META_STATUS));
+ metaprocess.put(META_LOGFILE, result.getString(META_LOGFILE));
+ metaprocess.put(BLOCK, result.getString(BLOCK));
+
+ metaprocesses.add(metaprocess);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return metaprocesses;
+ }
+
+
+ /**
+ * Returns the messages for a given session.
+ * Can be either ERROR message or WARNING message.
+ *
+ * @param sessionId
+ * @return list that contains first the warnings then the errors.
+ */
+ public static synchronized List<List<String>> getSessionMessages(long sessionId) {
+
+ String query = "SELECT * from message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM session_has_message WHERE " +
+ "ref_idsession =" + sessionId + ");";
+ Statement stat = connection.getStatement();
+
+ ResultSet result = connection.executeQuery(query, stat);
+ List<List<String>> mess = getMessages(result);
+ SQLConnectionFactory.closeConnection(stat);
+ return mess;
+
+ }
+
+
+ /**
+ * Gets the messages from a resultset.
+ *
+ * @param result sql object that contains the messages
+ * @return
+ */
+ private static List<List<String>> getMessages(ResultSet result) {
+
+ List<List<String>> messages = new ArrayList<List<String>>();
+ List<String> errors = new ArrayList<String>();
+ List<String> warnings = new ArrayList<String>();
+
+ if (result != null) {
+ try {
+ while (result.next()) {
+ String type = result.getString(MESSAGE_TYPE);
+ if (type.equals("error"))
+ errors.add(result.getString(MESSAGE));
+ else if (type.equals("warning"))
+ warnings.add(result.getString(MESSAGE));
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ } else
+ return null;
+
+ messages.add(warnings);
+ messages.add(errors);
+
+ return messages;
+
+ }
+
+ /**
+ * Returns the messages for a given metaprocess.
+ * Can be either ERROR message or WARNING message.
+ *
+ * @param metaId
+ * @return list that contains first the warnings then the errors.
+ */
+ public static synchronized List<List<String>> getMetaprocessMessages(String metaId) {
+
+ String query = "SELECT * from message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM metaprocess_has_message WHERE " +
+ "ref_idmetaprocess='" + metaId + "');";
+ Statement stat = connection.getStatement();
+
+ ResultSet result = connection.executeQuery(query, stat);
+ List<List<String>> mess = getMessages(result);
+ SQLConnectionFactory.closeConnection(stat);
+ return mess;
+
+ }
+
+
+ /**
+ * Returns the processes of a given metaprocess.
+ *
+ * @param metaId
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getMetaprocessProcesses(String metaId) {
+
+ List<Map<String, String>> directories = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT * from process WHERE ref_idmetaprocess='" + metaId + "';";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> process = new HashMap<String, String>();
+
+ process.put(PROC_ID, result.getString(PROC_ID));
+ process.put(PROC_NAME, result.getString(PROC_NAME));
+ process.put(PROC_KEYNAME, result.getString(PROC_KEYNAME));
+ process.put(PROC_EXE, result.getString(PROC_EXE));
+ process.put(PROC_ARGS, result.getString(PROC_ARGS));
+ process.put(PROC_DESC, result.getString(PROC_DESC));
+ process.put(PROC_TYPE, result.getString(PROC_TYPE));
+ process.put(PROC_START, BiomajUtils.dateToString(new Date(result.getTimestamp(PROC_START).getTime()), Locale.US));
+ if (result.getTimestamp(PROC_END) != null)
+ process.put(PROC_END, BiomajUtils.dateToString(new Date(result.getTimestamp(PROC_END).getTime()), Locale.US));
+ else
+ process.put(PROC_END, "null");
+ if (result.getString(PROC_ELAPSED) != null)
+ process.put(PROC_ELAPSED, "null");
+// process.put(PROC_ELAPSED, BiomajUtils.timeToString(result.getTime(PROC_ELAPSED).getTime()));
+ process.put(PROC_ELAPSED, result.getString(PROC_ELAPSED));
+ process.put(PROC_ERROR, String.valueOf(result.getBoolean(PROC_ERROR)));
+ process.put(PROC_TIMESTAMP, String.valueOf(result.getLong(PROC_TIMESTAMP)));
+ process.put(PROC_VALUE, result.getString(PROC_VALUE));
+
+ directories.add(process);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return directories;
+ }
+
+
+ /**
+ * Returns the list of production directories for the given bank.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized List<Map<String, String>> getProductionDirectories(String bankName) {
+
+ List<Map<String, String>> directories = new ArrayList<Map<String,String>>();
+
+ String query = "SELECT * from productionDirectory WHERE ref_idbank=" +
+ "(SELECT idBank FROM bank WHERE name='" + bankName + "');";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ Map<String, String> directory = new HashMap<String, String>();
+
+ directory.put(DIR_ID, String.valueOf(result.getInt(DIR_ID)));
+ if (result.getTimestamp(DIR_REMOVE) != null)
+ directory.put(DIR_REMOVE, BiomajUtils.dateToString(new Date(result.getTimestamp(DIR_REMOVE).getTime()), Locale.US));
+ else
+ directory.put(DIR_REMOVE, "null");
+ directory.put(DIR_CREATION, BiomajUtils.dateToString(new Date(result.getTimestamp(DIR_CREATION).getTime()), Locale.US));
+ directory.put(DIR_SIZE, result.getString(DIR_SIZE));
+ directory.put(DIR_STATE, result.getString(DIR_STATE));
+ directory.put(DIR_SESSION, String.valueOf(result.getLong(DIR_SESSION)));
+ directory.put(DIR_PATH, result.getString(DIR_PATH));
+
+ directories.add(directory);
+ }
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return directories;
+ }
+
+ public static synchronized List<ProductionDirectory> getAvailableProductionDirectories(String bankName) {
+ List<Map<String, String>> directories = getProductionDirectories(bankName);
+ List<ProductionDirectory> res = new ArrayList<ProductionDirectory>();
+
+ for (Map<String, String> directory : directories) {
+ ProductionDirectory pd = new ProductionDirectory(directory);
+
+ if (pd.getState() != ProductionDirectory.REMOVE)
+ res.add(pd);
+ }
+
+ Collections.sort(res);
+ return res;
+
+ }
+
+ /**
+ * Returns all the directories as a list of production directories.
+ * Same as getProductionDirectories method.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized List<ProductionDirectory> getAllProductionDirectories(String bankName) {
+
+ List<Map<String, String>> directories = getProductionDirectories(bankName);
+
+ List<ProductionDirectory> res = new ArrayList<ProductionDirectory>();
+
+ for (Map<String, String> directory : directories)
+ res.add(new ProductionDirectory(directory));
+
+ Collections.sort(res);
+
+ return res;
+ }
+
+
+ /**
+ * Returns the names of the banks in the database.
+ *
+ * @return
+ */
+ public static synchronized List<String> getBanks() {
+ List<String> banks = new ArrayList<String>();
+ String query = "SELECT name FROM bank ORDER BY name";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ while (rs.next())
+ banks.add(rs.getString(1));
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ return null;
+ }
+
+ SQLConnectionFactory.closeConnection(stat);
+ return banks;
+ }
+
+ /**
+ * Returns the number of configuration for the given bank.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized int getConfigCount(String bankName) {
+ String query = "SELECT count(idconfiguration) FROM configuration WHERE ref_idbank=" +
+ "(SELECT idbank FROM bank WHERE name='" + bankName + "')";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rs = connection.executeQuery(query, stat);
+ if (rs.next()) {
+ int i = rs.getInt(1);
+ SQLConnectionFactory.closeConnection(stat);
+ return i;
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return -1;
+ }
+
+ /**
+ * Returns lastest production directory for the given bank based on its
+ * creation date.
+ *
+ * @param bankName
+ * @return
+ */
+ public static synchronized ProductionDirectory getLatestProductionDirectory(String bankName) {
+ List<ProductionDirectory> pds = getAvailableProductionDirectories(bankName);
+ ProductionDirectory ref = null;
+ if (pds.size() > 0)
+ ref = pds.get(0);
+ for (ProductionDirectory pd : pds) {
+ if (ref.getCreationDate().compareTo(pd.getCreationDate()) < 0)
+ ref = pd;
+ }
+
+ return ref;
+ }
+
+
+ /**
+ * Renames the bank
+ *
+ * @param oldName bank to rename
+ * @param newName new name
+ */
+ public static synchronized void renameBank(String oldName, String newName) {
+ String query = "UPDATE bank SET name='" + newName + "' WHERE name='" + oldName + "';";
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ }
+
+
+ /**
+ * Updates the production directory path.
+ *
+ * @param bankName
+ * @param oldPath path to change
+ * @param dir
+ */
+ public static synchronized void updateProductionDirectory(String bankName, String oldPath, ProductionDirectory dir) {
+ String query = "UPDATE productionDirectory " +
+ "SET path='" + dir.getPath() +
+ "' WHERE path='" + oldPath +
+ "' AND ref_idBank=(SELECT idbank FROM bank WHERE name='" + bankName + "');";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ }
+
+ /**
+ * Updates the versiondirectory path.
+ *
+ * @param bankName
+ * @param oldPath
+ * @param newPath
+ */
+ public static synchronized void updateVersionDirectory(String bankName, String oldPath, String newPath) {
+ String query = "UPDATE localInfo SET versionDirectory='" + newPath + "' WHERE " +
+ "idlocalInfo IN (SELECT ref_idlocalInfo FROM configuration WHERE ref_idbank=" +
+ "(SELECT idbank FROM bank WHERE name='" + bankName + "')) AND versionDirectory='" +
+ oldPath + "';";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ public static synchronized void moveFiles(String oldDir, String newDir) {
+
+ /*
+ String query = "UPDATE file set path='...' WHERE " +
+ "idfile = (SELECT idfile FROM file WHERE ref_idprocess=" +
+ "(SELECT idprocess FROM process WHERE ref_idmetaprocess=" +
+ "(SELECT idmetaprocess FROM metaprocess WHERE ref_idsessionTask=" +
+ "(SELECT ref_idsessionTask FROM session_has_sessionTask WHERE ref_idsession=" +
+ "(SELECT idsession FROM session WHERE ref_idupdateBank=" +
+ "(SELECT idupdateBank FROM updateBank WHERE ref_idconfiguration=" +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank=" +
+ "(SELECT idbank FROM bank WHERE name='" + bankName + "'))))))));";*/
+
+
+ // Retrieval of the files according to location
+ String query = "SELECT location FROM file WHERE location like '" + oldDir + "%'";
+ Statement stat = connection.getStatement();
+ List<List<String>> paths = new ArrayList<List<String>>();
+
+ // Building new locations
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ List<String> list = new ArrayList<String>();
+ String old = result.getString(1);
+ list.add(old);
+ list.add(newDir + old.substring(oldDir.length()));
+ paths.add(list);
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+
+ // Setting new locations
+ for (List<String> path : paths) {
+ query = "UPDATE file SET location='" + path.get(1) + "' WHERE location='" + path.get(0) + "'";
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+ }
+
+ public static synchronized int setDirectoryStateToDeleted(ProductionDirectory pd) {
+
+ String query = "UPDATE productionDirectory SET state='" + ProductionDirectory.REMOVE_STR + "'," +
+ "remove='" + BiomajUtils.dateToString(new Date(), Locale.US) + "' WHERE path='" +
+ pd.getPath() + "' AND session=" + pd.getSession();
+
+ Statement stat = connection.getStatement();
+ int i = connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ return i;
+ }
+
+
+ /*
+ *
+ * DELETION METHODS
+ *
+ *
+ */
+
+ /**
+ * Deletes files that no longer exist.
+ */
+ public static synchronized void deleteObsoleteFiles() {
+
+ String query = "SELECT idfile, location FROM file";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next()) {
+ String path = result.getString(2);
+ if (!(new File(path).exists())) {
+ query = "DELETE FROM file WHERE idfile=" + result.getInt(1);
+ Statement stat2 = connection.getStatement();
+ connection.executeUpdate(query, stat2);
+
+ query = "DELETE FROM sessionTask_has_file WHERE ref_idfile=" + result.getInt(1);
+ connection.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+ }
+ }
+ } catch (SQLException e) {
+ new BiomajException(e);
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ public static synchronized List<String> getBankTypes() {
+
+ List<String> types = new ArrayList<String>();
+ String query = "SELECT DISTINCT dbType FROM remoteInfo";
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet result = connection.executeQuery(query, stat);
+ while (result.next())
+ types.add(result.getString(1));
+ } catch (SQLException ex) {
+ SQLConnectionFactory.closeConnection(stat);
+ ex.printStackTrace();
+ return null;
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ return types;
+
+ }
+
+ /**
+ * Completely removes a bank from the database.
+ *
+ * @param bankName
+ */
+ public static synchronized void deleteAllFromBank(String bankName) {
+ deleteBank(bankName);
+
+ int bankId = getBankId(bankName);
+
+ String query = "DELETE FROM productionDirectory WHERE ref_idbank=" + bankId;
+
+ query = "DELETE FROM localInfo WHERE idlocalInfo IN (SELECT ref_idlocalInfo FROM configuration WHERE ref_idbank=" +
+ bankId + ")";
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "DELETE FROM remoteInfo WHERE idremoteInfo=(SELECT ref_idremoteInfo FROM configuration WHERE ref_idbank=" +
+ bankId + ")";
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "DELETE FROM configuration WHERE ref_idbank=" + bankId;
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ query = "DELETE FROM bank WHERE name='" + bankName + "'";
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ }
+
+
+ /**
+ * Removes a bank from the database (all its updates and production directories).
+ * Bank, configuration, remoteinfo, localinfo records are kept.
+ * Production directories state are changed to 'deleted'.
+ *
+ * @param bankName name of the bank to remove
+ */
+ public static synchronized void deleteBank(String bankName) {
+
+ /*
+ * - supprimer updatebank > cascade session
+ * - supprimer sessiontasks > cascade metaprocess > process > file
+ * - supprimer files sessiontasks
+ * - supprimer messages metaprocess
+ * - supprimer messages process
+ * - supprimer messages sessiontasks
+ * - supprimer messages session
+ * - supprimer productiondirectories
+ */
+
+ String query = "SELECT idupdateBank FROM updateBank WHERE ref_idconfiguration IN " +
+ "(SELECT idconfiguration FROM configuration WHERE ref_idbank = " +
+ "(SELECT idbank FROM bank WHERE name = '" + bankName + "'));";
+
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rsUpdateBank = connection.executeQuery(query, stat);
+ while (rsUpdateBank.next()) { // UPDATEBANK
+ int idUpdate = rsUpdateBank.getInt(1);
+ deleteUpdate(idUpdate);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ // Delete productionDirectories
+// query = "DELETE FROM productionDirectory WHERE ref_idbank=(" +
+// "SELECT idbank FROM bank WHERE name='" + bankName + "');";
+ query = "UPDATE productionDirectory SET remove='" + BiomajUtils.dateToString(new Date(), Locale.US) + "'," +
+ "state='" + ProductionDirectory.REMOVE_STR + "' WHERE ref_idbank=(" +
+ "SELECT idbank FROM bank WHERE name='" + bankName + "') AND state='" + ProductionDirectory.AVAILABLE_STR + "';";
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Deletes an update and all its related elements : session, sessiontask,
+ * metaprocess, process, file, message.
+ *
+ * @param updateId
+ */
+ public static synchronized void deleteUpdate(int updateId) {
+
+ String query = "SELECT idsession,logfile FROM session WHERE ref_idupdateBank = " + updateId;
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rsSession = connection.executeQuery(query, stat);
+ while (rsSession.next()) { // SESSION
+ long idSession = rsSession.getLong(1);
+ deleteSession(idSession, rsSession.getString(2));
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ // Delete updateBank > cascade session
+ query = "DELETE FROM updateBank WHERE idupdateBank = " + updateId;
+ stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(stat);
+ new BiomajException(e);
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ /**
+ * Delete session identified by its sessionId.
+ *
+ * @param sessionId
+ */
+ public static synchronized int deleteSession(long sessionId, String logFile) {
+
+ String query = "SELECT ref_idsessionTask FROM session_has_sessionTask WHERE " +
+ "ref_idsession = " + sessionId;
+ Statement stat = connection.getStatement();
+ try {
+ ResultSet rsSessionTask = connection.executeQuery(query, stat);
+ while (rsSessionTask.next()) { // SESSIONTASK
+ int idTask = rsSessionTask.getInt(1);
+ query = "SELECT logfile,idmetaprocess FROM metaprocess WHERE " +
+ "ref_idsessionTask=" + idTask ;
+ Statement stat2 = connection.getStatement();
+ ResultSet rsMetaprocess = connection.executeQuery(query, stat2);
+ while (rsMetaprocess.next()) { // METAPROCESS
+ String idMeta = rsMetaprocess.getString(2);
+ query = "SELECT idprocess FROM process WHERE " +
+ "ref_idmetaprocess='" + idMeta + "'";
+ Statement stat3 = connection.getStatement();
+ ResultSet rsProcess = connection.executeQuery(query, stat3);
+ while (rsProcess.next()) { // PROCESS
+ int idProcess = rsProcess.getInt(1);
+ // Messages process
+ deleteProcessMessages(idProcess);
+ deleteProcessFiles(idProcess);
+ }
+ SQLConnectionFactory.closeConnection(stat3);
+ // Messages metaprocess
+ deleteMetaprocessMessages(idMeta);
+
+ if (rsMetaprocess.getString(1) != null) {
+ File file = new File(rsMetaprocess.getString(1));
+ if (file.exists())
+ file.delete();
+ }
+ }
+ SQLConnectionFactory.closeConnection(stat2);
+
+ // Messages sessiontask
+ deleteTaskMessages(idTask);
+ // Delete files sessiontask on db
+ deleteTaskFiles(idTask);
+ // Delete files on disk
+ query = "SELECT location FROM file WHERE idfile IN " +
+ "(SELECT ref_idfile FROM sessionTask_has_file WHERE " +
+ "ref_idsessionTask=" + idTask + ")";
+ Statement stat4 = connection.getStatement();
+ deleteFiles(connection.executeQuery(query, stat4));
+ SQLConnectionFactory.closeConnection(stat4);
+
+ // Delete sessionTask
+ query = "DELETE FROM sessionTask WHERE idsessionTask=" + idTask + ";";
+ stat4 = connection.getStatement();
+ connection.executeUpdate(query, stat4);
+ SQLConnectionFactory.closeConnection(stat4);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ } catch (SQLException ex) {
+ new BiomajException(ex);
+ ex.printStackTrace();
+ }
+ // Delete messages session
+ deleteSessionMessages(sessionId);
+
+ // Delete log
+ if (logFile != null) {
+ File log = new File(logFile);
+ if (log.exists()) {
+ log.delete();
+ // Delete directory
+ new File(log.getParent()).delete();
+ }
+ }
+
+ query = "DELETE FROM session WHERE idsession=" + sessionId;
+ Statement st = connection.getStatement();
+ int count = connection.executeUpdate(query, st);
+ SQLConnectionFactory.closeConnection(st);
+ return count;
+
+ }
+
+ /**
+ * Deletes the files related to the given process.
+ *
+ * @param processId
+ */
+ private static void deleteProcessFiles(int processId) {
+ String query = "SELECT location FROM file WHERE ref_idprocess=" + processId;
+ Statement stat = connection.getStatement();
+ deleteFiles(connection.executeQuery(query, stat));
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ /**
+ * Deletes the files related to the task identified by
+ * the given id.
+ *
+ * @param idTask
+ */
+ public static synchronized void deleteTaskFiles(long idTask) {
+ String query = "DELETE FROM file WHERE idfile IN " +
+ "(SELECT ref_idfile FROM sessionTask_has_file " +
+ "WHERE ref_idsessionTask=" + idTask + ");";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ /**
+ * Deletes file from the file system.
+ *
+ * @param result
+ */
+ private static void deleteFiles(ResultSet result) {
+ try {
+ while (result.next()) {
+ File file = new File(result.getString(1));
+ if (file.exists())
+ file.delete();
+ }
+ } catch (SQLException ex) {
+ new BiomajException(ex);
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * Deletes the messages that are related to the metaprocess identified by
+ * the given id and that are not related to any other table.
+ *
+ * @param idMeta
+ */
+ private static void deleteMetaprocessMessages(String idMeta) {
+ String query = "DELETE FROM message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM metaprocess_has_message " +
+ "WHERE ref_idmetaprocess='" + idMeta + "');";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+
+ /**
+ * Deletes the messages that are related to the process identified by
+ * the given id and that are not related to any other table.
+ *
+ * @param idMeta
+ */
+ public static synchronized void deleteProcessMessages(long idProcess) {
+ String query = "DELETE FROM message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM process_has_message " +
+ "WHERE ref_idprocess=" + idProcess + ");";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ /**
+ * Deletes the messages that are related to the sessionTask identified by
+ * the given id and that are not related to any other table.
+ *
+ * @param idMeta
+ */
+ public static synchronized void deleteTaskMessages(long idTask) {
+ String query = "DELETE FROM message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM sessionTask_has_message " +
+ "WHERE ref_idsessionTask=" + idTask + ");";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+ public static synchronized void deleteSessionMessages(long idSession) {
+ String query = "DELETE FROM message WHERE idmessage IN " +
+ "(SELECT ref_idmessage FROM session_has_message " +
+ "WHERE ref_idsession=" + idSession + ");";
+
+ Statement stat = connection.getStatement();
+ connection.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/CheckTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/CheckTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/CheckTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,182 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+public class CheckTask extends GeneralWorkflowTask {
+
+ public CheckTask(Session s) {
+ super(s);
+ }
+ /**
+ * @uml.property name="nbFilesExtract"
+ */
+ private int nbFilesExtract ;
+ /**
+ * @uml.property name="nbFilesLocalOnline"
+ */
+ private int nbFilesLocalOnline ;
+ /**
+ * @uml.property name="nbFilesLocalOffline"
+ */
+ private int nbFilesLocalOffline ;
+ /**
+ * @uml.property name="nbFilesDownload"
+ */
+ private int nbFilesDownload ;
+
+ private Vector<FileDesc> files = new Vector<FileDesc>();
+
+ /**
+ *
+ * @param location
+ * @return Added file
+ * @throws BiomajException
+ */
+ public FileDesc addFile(String location) throws BiomajException {
+ FileDesc f = new FileDesc(location,false);
+ this.files.add(f);
+ return f;
+ }
+
+
+ /**
+ * @return the nbFilesDownload
+ * @uml.property name="nbFilesDownload"
+ */
+ public int getNbFilesDownload() {
+ return nbFilesDownload;
+ }
+ /**
+ * @param nbFilesDownload the nbFilesDownload to set
+ * @uml.property name="nbFilesDownload"
+ */
+ public void setNbFilesDownload(int nbFileDownload) {
+ this.nbFilesDownload = nbFileDownload;
+ }
+ /**
+ * @return the nbFilesExtract
+ * @uml.property name="nbFilesExtract"
+ */
+ public int getNbFilesExtract() {
+ return nbFilesExtract;
+ }
+ /**
+ * @param nbFilesExtract the nbFilesExtract to set
+ * @uml.property name="nbFilesExtract"
+ */
+ public void setNbFilesExtract(int nbFilesExtract) {
+ this.nbFilesExtract = nbFilesExtract;
+ }
+ /**
+ * @return the nbFilesLocalOffline
+ * @uml.property name="nbFilesLocalOffline"
+ */
+ public int getNbFilesLocalOffline() {
+ return nbFilesLocalOffline;
+ }
+ /**
+ * @param nbFilesLocalOffline the nbFilesLocalOffline to set
+ * @uml.property name="nbFilesLocalOffline"
+ */
+ public void setNbFilesLocalOffline(int nbFilesLocalOffline) {
+ this.nbFilesLocalOffline = nbFilesLocalOffline;
+ }
+ /**
+ * @return the nbFilesLocalOnline
+ * @uml.property name="nbFilesLocalOnline"
+ */
+ public int getNbFilesLocalOnline() {
+ return nbFilesLocalOnline;
+ }
+ /**
+ * @param nbFilesLocalOnline the nbFilesLocalOnline to set
+ * @uml.property name="nbFilesLocalOnline"
+ */
+ public void setNbFilesLocalOnline(int nbFilesLocalOnline) {
+ this.nbFilesLocalOnline = nbFilesLocalOnline;
+ }
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+ nbFilesDownload = Integer.valueOf(task.get(BiomajSQLQuerier.NB_DOWNLOADED_FILES));
+ nbFilesExtract = Integer.valueOf(task.get(BiomajSQLQuerier.NB_EXTRACT));
+ nbFilesLocalOffline = Integer.valueOf(task.get(BiomajSQLQuerier.NB_LOCAL_OFFLINE_FILES));
+
+ if (loadMessages) { // If we dont look for performance then we can load the files.
+ List<Map<String, String>> filz = BiomajSQLQuerier.getTaskFiles(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ addFilesInVector(filz, files);
+ }
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.checkTag;
+ }
+
+ @Override
+ public void fillElement(long taskId) {
+
+ String query = "UPDATE sessionTask SET nbExtract=" + nbFilesExtract + ",nbLocalOnlineFiles=" +
+ nbFilesLocalOnline + ",nbLocalOfflineFiles=" + nbFilesLocalOffline + ",nbDownloadFiles=" +
+ nbFilesDownload + ",taskType='" + getProcessName() + "' WHERE idsessionTask=" + taskId + ";";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ addFilesInDB(files, taskId);
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Configuration.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Configuration.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Configuration.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,688 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+
+public class Configuration {
+
+ /**
+ * Initializes a configuration from a map.
+ *
+ * @param info
+ */
+ public Configuration(Map<String, String> info) {
+
+ setName(info.get(BiomajSQLQuerier.BANK_NAME));
+ setFullName(info.get(BiomajSQLQuerier.DB_FULLNAME));
+ setDate(info.get(BiomajSQLQuerier.DATE));
+ setUrl(info.get(BiomajSQLQuerier.SERVER));
+ setProtocol(info.get(BiomajSQLQuerier.PROTOCOL));
+ setRemoteDirectory(info.get(BiomajSQLQuerier.REMOTE_DIR));
+ setRemoteFilesRegexp(info.get(BiomajSQLQuerier.REMOTE_FILES));
+ setRemoteExcludedFiles(info.get(BiomajSQLQuerier.REMOTE_EXCLUDED_FILES));
+ setLocalFilesRegexp(info.get(BiomajSQLQuerier.LOCAL_FILES));
+ setVersionDirectory(info.get(BiomajSQLQuerier.VERSION_DIRECTORY));
+ setOfflineDirectory(info.get(BiomajSQLQuerier.OFFLINE_DIRECTORY));
+ setLogFiles(info.get(BiomajSQLQuerier.LOG_FILE));
+ setFrequencyUpdate(info.get(BiomajSQLQuerier.FREQUENCY));
+ setDoLinkCopy(info.get(BiomajSQLQuerier.DO_LINKCOPY));
+ setPort(info.get(BiomajSQLQuerier.PORT));
+ setTypeBank(info.get(BiomajSQLQuerier.DB_TYPE));
+ setReleaseRegExp(info.get(BiomajSQLQuerier.RELEASE_REGEXP));
+ setReleaseFile(info.get(BiomajSQLQuerier.RELEASE_FILE));
+ setNbVersionManagement(info.get(BiomajSQLQuerier.N_VERSIONS));
+ setId(Long.valueOf(info.get(BiomajSQLQuerier.CONFIGURATION_ID)));
+ setPropertyFile(info.get(BiomajSQLQuerier.FILE));
+ setLogFiles(info.get(BiomajSQLQuerier.HAS_LOG_FILE));
+ }
+
+ public Configuration() {
+ }
+
+
+ /**
+ * @uml.property name="id"
+ */
+ private Long id = new Long(-1);
+
+ /**
+ * Getter of the property <tt>id</tt>
+ * @return Returns the id.
+ * @uml.property name="id"
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * Setter of the property <tt>id</tt>
+ * @param id The id to set.
+ * @uml.property name="id"
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * @uml.property name="date"
+ */
+ private String date = "";
+
+ /**
+ * Getter of the property <tt>date</tt>
+ * @return Returns the date.
+ * @uml.property name="date"
+ */
+ public String getDate() {
+ return date;
+ }
+
+ /**
+ * Setter of the property <tt>date</tt>
+ * @param date The date to set.
+ * @uml.property name="date"
+ */
+ public void setDate(String date) {
+ this.date = date;
+ }
+
+ /**
+ * @uml.property name="propertyFile"
+ */
+ private String propertyFile = "";
+
+ /**
+ * Getter of the property <tt>propertyFile</tt>
+ * @return Returns the propertyFile.
+ * @uml.property name="propertyFile"
+ */
+ public String getPropertyFile() {
+ return propertyFile;
+ }
+
+ /**
+ * Setter of the property <tt>propertyFile</tt>
+ * @param propertyFile The propertyFile to set.
+ * @uml.property name="propertyFile"
+ */
+ public void setPropertyFile(String propertyFile) {
+ this.propertyFile = propertyFile;
+ }
+
+ /**
+ * @uml.property name="fullName"
+ */
+ private String fullName = "";
+
+ /**
+ * Getter of the property <tt>fullName</tt>
+ * @return Returns the fullName.
+ * @uml.property name="fullName"
+ */
+ public String getFullName() {
+ return fullName;
+ }
+
+ /**
+ * Setter of the property <tt>fullName</tt>
+ * @param fullName The fullName to set.
+ * @uml.property name="fullName"
+ */
+ public void setFullName(String fullName) {
+ this.fullName = fullName;
+ }
+
+ /**
+ * @uml.property name="protocol"
+ */
+ private String protocol = "";
+
+ /**
+ * Getter of the property <tt>protocol</tt>
+ * @return Returns the protocol.
+ * @uml.property name="protocol"
+ */
+ public String getProtocol() {
+ return protocol;
+ }
+
+ /**
+ * Setter of the property <tt>protocol</tt>
+ * @param protocol The protocol to set.
+ * @uml.property name="protocol"
+ */
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * @uml.property name="port"
+ */
+ private String port = "";
+
+ /**
+ * @uml.property name="username"
+ */
+ private String username = "";
+
+ /**
+ * @uml.property name="password"
+ */
+ private String password = "";
+
+ /**
+ * @uml.property name="fileNumThread"
+ */
+ private String fileNumThread = "";
+
+ /**
+ * @uml.property name="doLinkCopy"
+ */
+ private String doLinkCopy = "";
+
+ /**
+ * @uml.property name="logFiles"
+ */
+ private String logFiles = "";
+
+ /**
+ * @uml.property name="noExtract"
+ */
+ private String noExtract = "";
+
+ /**
+ * @uml.property name="remoteExcludedFiles"
+ */
+ private String remoteExcludedFiles = "";
+
+ private Vector<String> blocks = new Vector<String>();
+
+ private HashMap<String,Vector<String>> metaProcess = new HashMap<String,Vector<String>>();
+
+ private HashMap<String,Vector<String>> process = new HashMap<String,Vector<String>>();
+
+ private Vector<String> formats = new Vector<String>();
+
+ /**
+ * @uml.property name="url"
+ */
+ private String url = "";
+
+ /**
+ * Getter of the property <tt>url</tt>
+ * @return Returns the url.
+ * @uml.property name="url"
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * Setter of the property <tt>url</tt>
+ * @param url The url to set.
+ * @uml.property name="url"
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * @uml.property name="typeBank"
+ */
+ private String typeBank = "";
+
+ /**
+ * Getter of the property <tt>typeBank</tt>
+ * @return Returns the typeBank.
+ * @uml.property name="typeBank"
+ */
+ public String getTypeBank() {
+ return typeBank;
+ }
+
+ /**
+ * Setter of the property <tt>typeBank</tt>
+ * @param typeBank The typeBank to set.
+ * @uml.property name="typeBank"
+ */
+ public void setTypeBank(String typeBank) {
+ this.typeBank = typeBank;
+ }
+
+ /**
+ * @uml.property name="remoteDirectory"
+ */
+ private String remoteDirectory = "";
+
+ /**
+ * Getter of the property <tt>remoteDirectory</tt>
+ * @return Returns the remoteDirectory.
+ * @uml.property name="remoteDirectory"
+ */
+ public String getRemoteDirectory() {
+ return remoteDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>remoteDirectory</tt>
+ * @param remoteDirectory The remoteDirectory to set.
+ * @uml.property name="remoteDirectory"
+ */
+ public void setRemoteDirectory(String remoteDirectory) {
+ this.remoteDirectory = remoteDirectory;
+ }
+
+ /**
+ * @uml.property name="offlineDirectory"
+ */
+ private String offlineDirectory = "";
+
+ /**
+ * Getter of the property <tt>offlineDirectory</tt>
+ * @return Returns the offlineDirectory.
+ * @uml.property name="offlineDirectory"
+ */
+ public String getOfflineDirectory() {
+ return offlineDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>offlineDirectory</tt>
+ * @param offlineDirectory The offlineDirectory to set.
+ * @uml.property name="offlineDirectory"
+ */
+ public void setOfflineDirectory(String offlineDirectory) {
+ this.offlineDirectory = offlineDirectory;
+ }
+
+ /**
+ * @uml.property name="versionDirectory"
+ */
+ private String versionDirectory = "";
+
+ /**
+ * Getter of the property <tt>versionDirectory</tt>
+ * @return Returns the versionDirectory.
+ * @uml.property name="versionDirectory"
+ */
+ public String getVersionDirectory() {
+ return versionDirectory;
+ }
+
+ /**
+ * Setter of the property <tt>versionDirectory</tt>
+ * @param versionDirectory The versionDirectory to set.
+ * @uml.property name="versionDirectory"
+ */
+ public void setVersionDirectory(String versionDirectory) {
+ this.versionDirectory = versionDirectory;
+ }
+
+ /**
+ * @uml.property name="frequencyUpdate"
+ */
+ private String frequencyUpdate = "";
+
+ /**
+ * Getter of the property <tt>frequencyUpdate</tt>
+ * @return Returns the frequencyUpdate.
+ * @uml.property name="frequencyUpdate"
+ */
+ public String getFrequencyUpdate() {
+ return frequencyUpdate;
+ }
+
+ /**
+ * Setter of the property <tt>frequencyUpdate</tt>
+ * @param frequencyUpdate The frequencyUpdate to set.
+ * @uml.property name="frequencyUpdate"
+ */
+ public void setFrequencyUpdate(String frequencyUpdate) {
+ this.frequencyUpdate = frequencyUpdate;
+ }
+
+ /**
+ * @uml.property name="releaseFile"
+ */
+ private String releaseFile = "";
+
+ /**
+ * Getter of the property <tt>releaseFile</tt>
+ * @return Returns the releaseFile.
+ * @uml.property name="releaseFile"
+ */
+ public String getReleaseFile() {
+ return releaseFile;
+ }
+
+ /**
+ * Setter of the property <tt>releaseFile</tt>
+ * @param releaseFile The releaseFile to set.
+ * @uml.property name="releaseFile"
+ */
+ public void setReleaseFile(String releaseFile) {
+ this.releaseFile = releaseFile;
+ }
+
+ /**
+ * @uml.property name="releaseRegExp"
+ */
+ private String releaseRegExp = "";
+
+ /**
+ * Getter of the property <tt>releaseRegExp</tt>
+ * @return Returns the releaseRegExp.
+ * @uml.property name="releaseRegExp"
+ */
+ public String getReleaseRegExp() {
+ return releaseRegExp;
+ }
+
+ /**
+ * Setter of the property <tt>releaseRegExp</tt>
+ * @param releaseRegExp The releaseRegExp to set.
+ * @uml.property name="releaseRegExp"
+ */
+ public void setReleaseRegExp(String releaseRegExp) {
+ this.releaseRegExp = releaseRegExp;
+ }
+
+ /**
+ * @uml.property name="nbVersionManagement"
+ */
+ private String nbVersionManagement = "";
+
+ /**
+ * Getter of the property <tt>nbVersionManagement</tt>
+ * @return Returns the nbVersionManagement.
+ * @uml.property name="nbVersionManagement"
+ */
+ public String getNbVersionManagement() {
+ return nbVersionManagement;
+ }
+
+ /**
+ * Setter of the property <tt>nbVersionManagement</tt>
+ * @param nbVersionManagement The nbVersionManagement to set.
+ * @uml.property name="nbVersionManagement"
+ */
+ public void setNbVersionManagement(String nbVersionManagement) {
+ this.nbVersionManagement = nbVersionManagement;
+ }
+
+ /**
+ * @uml.property name="name"
+ */
+ private String name = "";
+
+ /**
+ * Getter of the property <tt>name</tt>
+ * @return Returns the name.
+ * @uml.property name="name"
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Setter of the property <tt>name</tt>
+ * @param name The name to set.
+ * @uml.property name="name"
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @uml.property name="remoteFilesRegexp"
+ */
+ private String remoteFilesRegexp = "";
+
+ /**
+ * Getter of the property <tt>remoteFilesRegexp</tt>
+ * @return Returns the remoteFilesRegexp.
+ * @uml.property name="remoteFilesRegexp"
+ */
+ public String getRemoteFilesRegexp() {
+ return remoteFilesRegexp;
+ }
+
+ /**
+ * Setter of the property <tt>remoteFilesRegexp</tt>
+ * @param remoteFilesRegexp The remoteFilesRegexp to set.
+ * @uml.property name="remoteFilesRegexp"
+ */
+ public void setRemoteFilesRegexp(String remoteFilesRegexp) {
+ this.remoteFilesRegexp = remoteFilesRegexp;
+ }
+
+ /**
+ * @uml.property name="localFilesRegexp"
+ */
+ private String localFilesRegexp = "";
+
+ /**
+ * Getter of the property <tt>localFilesRegexp</tt>
+ * @return Returns the localFilesRegexp.
+ * @uml.property name="localFilesRegexp"
+ */
+ public String getLocalFilesRegexp() {
+ return localFilesRegexp;
+ }
+
+ /**
+ * Setter of the property <tt>localFilesRegexp</tt>
+ * @param localFilesRegexp The localFilesRegexp to set.
+ * @uml.property name="localFilesRegexp"
+ */
+ public void setLocalFilesRegexp(String localFilesRegexp) {
+ this.localFilesRegexp = localFilesRegexp;
+ }
+
+ /**
+ * @return the port
+ * @uml.property name="port"
+ */
+ public String getPort() {
+ return port;
+ }
+
+ /**
+ * @param port the port to set
+ * @uml.property name="port"
+ */
+ public void setPort(String port) {
+ this.port = port;
+ }
+
+ public Vector<String> getBlocks() {
+ return blocks;
+ }
+
+ public void setBlocks(Vector<String> blocks) {
+ this.blocks = blocks;
+ }
+
+ /**
+ * @return the doLinkCopy
+ * @uml.property name="doLinkCopy"
+ */
+ public String getDoLinkCopy() {
+ return doLinkCopy;
+ }
+
+ /**
+ * @param doLinkCopy the doLinkCopy to set
+ * @uml.property name="doLinkCopy"
+ */
+ public void setDoLinkCopy(String doLinkCopy) {
+ this.doLinkCopy = doLinkCopy;
+ }
+
+ /**
+ * @return the fileNumThread
+ * @uml.property name="fileNumThread"
+ */
+ public String getFileNumThread() {
+ return fileNumThread;
+ }
+
+ /**
+ * @param fileNumThread the fileNumThread to set
+ * @uml.property name="fileNumThread"
+ */
+ public void setFileNumThread(String fileNumThread) {
+ this.fileNumThread = fileNumThread;
+ }
+
+ /**
+ * @return the logFiles
+ * @uml.property name="logFiles"
+ */
+ public String getLogFiles() {
+ return logFiles;
+ }
+
+ /**
+ * @param logFiles the logFiles to set
+ * @uml.property name="logFiles"
+ */
+ public void setLogFiles(String logFiles) {
+ this.logFiles = logFiles;
+ }
+
+ public HashMap<String, Vector<String>> getMetaProcess() {
+ return metaProcess;
+ }
+
+ public void setMetaProcess(HashMap<String, Vector<String>> metaProcess) {
+ this.metaProcess = metaProcess;
+ }
+
+ /**
+ * @return the noExtract
+ * @uml.property name="noExtract"
+ */
+ public String getNoExtract() {
+ return noExtract;
+ }
+
+ /**
+ * @param noExtract the noExtract to set
+ * @uml.property name="noExtract"
+ */
+ public void setNoExtract(String noExtract) {
+ this.noExtract = noExtract;
+ }
+
+ /**
+ * @return the password
+ * @uml.property name="password"
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * @param password the password to set
+ * @uml.property name="password"
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public HashMap<String, Vector<String>> getProcess() {
+ return process;
+ }
+
+ public void setProcess(HashMap<String, Vector<String>> process) {
+ this.process = process;
+ }
+
+ /**
+ * @return the remoteExcludedFiles
+ * @uml.property name="remoteExcludedFiles"
+ */
+ public String getRemoteExcludedFiles() {
+ return remoteExcludedFiles;
+ }
+
+ /**
+ * @param remoteExcludedFiles the remoteExcludedFiles to set
+ * @uml.property name="remoteExcludedFiles"
+ */
+ public void setRemoteExcludedFiles(String remoteExcludedFiles) {
+ if (remoteExcludedFiles != null && remoteExcludedFiles.equals("null"))
+ this.remoteExcludedFiles = "";
+ else
+ this.remoteExcludedFiles = remoteExcludedFiles;
+ }
+
+ /**
+ * @return the username
+ * @uml.property name="username"
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * @param username the username to set
+ * @uml.property name="username"
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public Vector<String> getFormats() {
+ return formats;
+ }
+
+ public void setFormats(Vector<String> formats) {
+ this.formats = formats;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DeploymentTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DeploymentTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DeploymentTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,75 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+
+import java.sql.Statement;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+
+public class DeploymentTask extends GeneralWorkflowTask {
+
+
+ public DeploymentTask(Session s) {
+ super(s);
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.deploymentTag;
+ }
+
+ @Override
+ public void fillElement(long taskId) {
+
+ String query = "UPDATE sessionTask set taskType='" + getProcessName() + "'" +
+ " WHERE idsessionTask=" + taskId;
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DownloadTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DownloadTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/DownloadTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,145 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class DownloadTask extends GeneralWorkflowTask {
+
+ public DownloadTask(Session s) {
+ super(s);
+ }
+
+ private Vector<FileDesc> files = new Vector<FileDesc>();
+
+ /**
+ * @uml.property name="bandWidth"
+ */
+ private double bandWidth = 0;
+
+ public void addFile(String location) throws BiomajException {
+ FileDesc f = new FileDesc(location,true);
+ this.files.add(f);
+ }
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+ String val = task.get(BiomajSQLQuerier.BANDWIDTH);
+
+ if (!val.isEmpty())
+ bandWidth = Double.valueOf(val);
+
+ if (loadMessages) { // If we dont look for performance then we can load the files.
+ List<Map<String, String>> filz = BiomajSQLQuerier.getTaskFiles(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ addFilesInVector(filz, files);
+ }
+ }
+
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.downloadTag;
+ }
+
+
+ @Override
+ public void fillElement(long taskId) {
+ String query = "UPDATE sessionTask SET taskType='" + getProcessName() + "',bandwidth=" + bandWidth + " WHERE " +
+ "idsessionTask=" + taskId + ";";
+
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ addFilesInDB(files, taskId);
+ }
+
+
+ /**
+ * @return the bandWidth
+ * @uml.property name="bandWidth"
+ */
+ public double getBandWidth() {
+ return bandWidth;
+ }
+
+ /**
+ * @param bandWidth the bandWidth to set
+ * @uml.property name="bandWidth"
+ */
+ public void setBandWidth(double bandWidth) {
+ this.bandWidth = bandWidth;
+ }
+
+
+ /**
+ * @return the files
+ * @uml.property name="files"
+ */
+ public Vector<FileDesc> getFiles() {
+ return files;
+ }
+
+ public long getSizeDownloaded() {
+ long count = 0;
+ for (FileDesc f : files)
+ count+=f.getSize();
+ return count;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ExtractTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ExtractTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ExtractTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,125 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+public class ExtractTask extends GeneralWorkflowTask {
+
+ public ExtractTask(Session s) {
+ super(s);
+ }
+
+
+ private Vector<FileDesc> files = new Vector<FileDesc>();
+ private Vector<FileDesc> filesToMove = null;
+
+
+ public void addFile(String locationUncomp,String refHash) throws BiomajException {
+ FileDesc f = new FileDesc(locationUncomp,false,refHash);
+ this.files.add(f);
+ }
+
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+
+ List<Map<String, String>> filz = BiomajSQLQuerier.getTaskFiles(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ addFilesInVector(filz, files);
+ }
+
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.extractTag;
+ }
+
+
+ @Override
+ public void fillElement(long taskId) {
+
+ String query = "UPDATE sessionTask SET taskType='" + getProcessName() + "' WHERE" +
+ " idsessionTask=" + taskId + ";";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ addFilesInDB(files, taskId);
+ }
+
+ public Vector<FileDesc> getFiles() {
+ return files;
+ }
+
+ public String getFileRefHash(String location) {
+ if (filesToMove == null) {
+ filesToMove = new Vector<FileDesc>();
+ filesToMove.addAll(files);
+ }
+
+ String offline = getSession().getBank().getConfig().getOfflineDirectory();
+
+ String res = null;
+ for (FileDesc fd : filesToMove) {
+ if (location.contains(fd.getLocation().substring(fd.getLocation().indexOf(offline) + offline.length()))) {
+ res = fd.getRefHash();
+ filesToMove.remove(fd);
+ break;
+ }
+ }
+
+ return res;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/FileDesc.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/FileDesc.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/FileDesc.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,307 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.io.File;
+import java.io.IOException;
+import org.inria.biomaj.ant.task.BmajExtract;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * This class is used for created a File Description (location and hash) ans insert into a xml file or to initialized a FileDesc from xml File. Behaviour of this classe change according the contexte (create to xml file or initialize from xml file)
+ * @author ofilangi
+ */
+
+public class FileDesc {
+ /** Localtion of file
+ *
+ * local file : location is the absolute
+ * */
+ /**
+ * Path of file
+ * @uml.property name="location"
+ */
+ private String location;
+ /**
+ * hash value
+ * @uml.property name="hash"
+ */
+ private String hash=null;
+ /**
+ * Local size
+ * @uml.property name="size"
+ */
+ private long size=-1;
+ /**
+ * Local tile
+ * @uml.property name="time"
+ */
+ private long time=-1;
+ /**
+ * Reference to the file father
+ * @uml.property name="refHash"
+ */
+ private String refHash =null;
+ /**
+ * Tag if file is an extract file (gz,tar,etc...)
+ * @uml.property name="extract"
+ */
+ private boolean extract = false;
+ /**
+ * Tag if file is a link
+ * @uml.property name="link"
+ */
+ private boolean link = false;
+ /**
+ * Tag if file is a volatile file
+ * @uml.property name="volatil"
+ */
+ private boolean volatil = false;
+
+ /**
+ * File id in db
+ */
+ private long fileId = -1;
+
+// ---------------------------------------- Constructor for CREATE A FILEDESC DURING THE WORKFLOW -------------------------------------------
+ /**
+ * Create a file desc with a local file
+ * Use when a FileDesc is created
+ * @param f
+ * @param volatil
+ */
+ public FileDesc(File f,boolean volatil) throws BiomajException {
+ set(f,volatil);
+
+ }
+
+ public FileDesc(String location,boolean volatil) throws BiomajException {
+ File f = new File(location);
+ set(f,volatil);
+ }
+
+ public FileDesc(String location,boolean volatil, String refHash) throws BiomajException {
+ File f = new File(location);
+ set(f,volatil);
+ this.refHash = refHash;
+ }
+
+ /*
+ * Initialized a Remote File Desc
+ */
+ public FileDesc(String location,long size, long time, boolean link,boolean extract) {
+ this.location = location;
+ this.hash = BiomajUtils.getHash(location, time, size);
+ this.size = size;
+ this.time = time;
+ this.extract = extract;
+ this.link = link;
+ }
+
+ /*
+ * Initialized a Remote File Desc
+ */
+ public FileDesc(String location,long size, long time, boolean link,boolean extract,boolean volatil,String refHash) {
+ this.location = location;
+ this.hash = BiomajUtils.getHash(location, time, size);
+ this.size = size;
+ this.time = time;
+ this.extract = extract;
+ this.link = link;
+ this.volatil = volatil;
+ this.refHash = refHash;
+ }
+
+ //-------------------------------------------------------------------------------------------------------------------------------------------
+
+ /**
+ * True if hash is same that the calcul of hash in this instant!
+ * False otherwise
+ *
+ */
+ public boolean isIntegre() {
+ try {
+ String h = BiomajUtils.getHash(location);
+ if (h!=null)
+ return (h.compareTo(hash)==0);
+ } catch (IOException ioe) {
+ return false;
+ }
+
+ return false;
+ }
+
+ private void set(File f,boolean volatil) throws BiomajException {
+ if (!f.exists()) {
+ BiomajLogger.getInstance().log("FileDesc::set(File f,boolean volatil) fichier:"+f.getAbsolutePath()+" n'existe pas...");
+ throw new BiomajException("filedesc.error","file:"+f.getAbsolutePath()+" does not exist !");
+ }
+ try {
+ //location = f.getCanonicalPath();
+ location = f.getAbsolutePath() ;
+ size = f.length();
+ time = f.lastModified();
+ hash = BiomajUtils.getHash(f.getAbsolutePath());
+ link = false; // forcement car on a pris la forme canonique du chemin
+ String r = BmajExtract.removeExtension(location);
+ this.extract = location.compareTo(r)!=0;
+ } catch (IOException ioe) {
+ BiomajLogger.getInstance().log(ioe);
+ throw new BiomajException("filedesc.error",ioe.getMessage());
+ }
+ this.volatil = volatil;
+ }
+
+ /**
+ * @return the extract
+ * @uml.property name="extract"
+ */
+ public boolean isExtract() {
+ return extract;
+ }
+
+ /**
+ * @return the hash
+ * @uml.property name="hash"
+ */
+ public String getHash() {
+ return hash;
+ }
+
+ /**
+ * @return the link
+ * @uml.property name="link"
+ */
+ public boolean isLink() {
+ return link;
+ }
+
+ /**
+ * @return the location
+ * @uml.property name="location"
+ */
+ public String getLocation() {
+ return location;
+ }
+
+ /**
+ * @return the refHash
+ * @uml.property name="refHash"
+ */
+ public String getRefHash() {
+ return refHash;
+ }
+
+ /**
+ * @return the size
+ * @uml.property name="size"
+ */
+ public long getSize() {
+ return size;
+ }
+
+ /**
+ * @return the time
+ * @uml.property name="time"
+ */
+ public long getTime() {
+ return time;
+ }
+
+ /**
+ * @return the volatil
+ * @uml.property name="volatil"
+ */
+ public boolean isVolatil() {
+ return volatil;
+ }
+
+ /**
+ * @param extract the extract to set
+ * @uml.property name="extract"
+ */
+ public void setExtract(boolean extract) {
+ this.extract = extract;
+ }
+
+ /**
+ * @param link the link to set
+ * @uml.property name="link"
+ */
+ public void setLink(boolean link) {
+ this.link = link;
+ }
+
+ public long getFileId() {
+ return fileId;
+ }
+
+ public void setFileId(long id) {
+ fileId = id;
+ }
+
+ /**
+ * @param volatil the volatil to set
+ * @uml.property name="volatil"
+ */
+ public void setVolatil(boolean volatil) {
+ this.volatil = volatil;
+ }
+
+ public String getName() {
+ String[] t = location.split("/");
+ if (t.length>0)
+ return t[t.length-1];
+
+ return "";
+ }
+
+ @Override
+ public String toString() {
+ return location;
+ }
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/GeneralWorkflowTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/GeneralWorkflowTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/GeneralWorkflowTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,500 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.ant.logger.DBWriter;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+/**
+ * Tache generique du workflow. Une tache est definie par sa date de commencement,sa date de fin,
+ * son temps d execution et son status une liste d'erreur et de warning y est egalement attachee!
+ * @author ofilangi
+ */
+
+public abstract class GeneralWorkflowTask {
+
+ public static final int STATUS_OK = 0;
+ public static final int STATUS_KO = 1;
+
+ /**
+ * @uml.property name="_session"
+ * @uml.associationEnd multiplicity="(1 1)" inverse="workflowtasks:org.inria.biomaj.session.bank.Session"
+ */
+ private Session _session ;
+
+ // Task id in the database
+ private int taskId;
+
+ /**
+ * If disabled speed up the loading.
+ */
+ protected boolean loadMessages = true;
+
+
+ public GeneralWorkflowTask(Session s) {
+ _session = s;
+ }
+
+ /**
+ * @uml.property name="processName"
+ */
+ public abstract String getProcessName() ;
+
+ /**
+ * @uml.property name="start"
+ */
+ private Date start = new Date();
+
+ /**
+ * @uml.property name="end"
+ */
+ private Date end = new Date();
+
+ /**
+ * @uml.property name="elapsedTime"
+ */
+// private Long elapsedTime = new Long(0);
+
+ /**
+ * @uml.property name="status"
+ */
+ private int status = STATUS_KO;
+
+ /**
+ * @uml.property name="warn"
+ */
+ private Vector<String> warn = new Vector<String>();
+
+ /**
+ * @uml.property name="err"
+ */
+ private Vector<String> err = new Vector<String>();
+
+ private Vector<String> oldErr = null;
+ private Vector<String> oldWarn = null;
+
+ /**
+ * @return the err
+ * @uml.property name="err"
+ */
+ public Vector<String> getErr() {
+ return err;
+ }
+
+ public Vector<String> getNewErr() {
+ if (oldErr == null) {
+ oldErr = new Vector<String>();
+ oldErr.addAll(err);
+
+ return err;
+ }
+
+ Vector<String> res = new Vector<String>();
+
+ if (oldErr.size() == err.size()) // Nothing new
+ return res;
+ else if (err.size() > oldErr.size()) {
+ for (String s : err) {
+ boolean found = false;
+ for (String sOld : oldErr) {
+ if (s == sOld) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ oldErr.add(s);
+ res.add(s);
+ }
+ }
+ } else {
+ throw new RuntimeException("Somehow, some message have been deleted since the previous call.");
+ }
+
+ return res;
+ }
+
+ /**
+ * @param err the err to set
+ * @uml.property name="err"
+ */
+ public void setErr(Vector<String> err) {
+ this.err = err;
+ }
+
+ /**
+ * @return the warn
+ * @uml.property name="warn"
+ */
+ public Vector<String> getWarn() {
+ return warn;
+ }
+
+ public Vector<String> getNewWarn() {
+ if (oldWarn == null) {
+ oldWarn = new Vector<String>();
+ oldWarn.addAll(warn);
+
+ return warn;
+ }
+
+ Vector<String> res = new Vector<String>();
+
+ if (oldWarn.size() == warn.size()) // Nothing new
+ return res;
+ else if (warn.size() > oldWarn.size()) {
+ for (String s : warn) {
+ boolean found = false;
+ for (String sOld : oldWarn) {
+ if (s == sOld) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ oldWarn.add(s);
+ res.add(s);
+ }
+ }
+ } else {
+ throw new RuntimeException("Somehow, some message have been deleted since the previous call.");
+ }
+
+ return res;
+ }
+
+ /**
+ * @param warn the warn to set
+ * @uml.property name="warn"
+ */
+ public void setWarn(Vector<String> warn) {
+ this.warn = warn;
+ }
+
+
+ public void setLoadMessages(boolean load) {
+ loadMessages = load;
+ }
+
+ /**
+ * @return the elapsedTime
+ * @uml.property name="elapsedTime"
+ */
+ public long getElapsedTime() {
+ if ( (end != null) && (start != null) )
+ return end.getTime() - start.getTime();
+ return 0;
+ }
+
+
+ /**
+ * @return the end
+ * @uml.property name="end"
+ */
+ public Date getEnd() {
+ return end;
+ }
+
+
+ /**
+ * @param end the end to set
+ * @uml.property name="end"
+ */
+ public void setEnd(Date end) {
+ this.end = end;
+ }
+
+ public int getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(int taskId) {
+ this.taskId = taskId;
+ }
+
+ /**
+ * @return the start
+ * @uml.property name="start"
+ */
+ public Date getStart() {
+ return start;
+ }
+
+
+ /**
+ * @param start the start to set
+ * @uml.property name="start"
+ */
+ public void setStart(Date start) {
+ this.start = start;
+ }
+
+
+ /**
+ * @return the status
+ * @uml.property name="status"
+ */
+ public int getStatus() {
+ return status;
+ }
+
+
+ public String getStatusStr() {
+ switch (status) {
+ case GeneralWorkflowTask.STATUS_KO :return "ko";
+ case GeneralWorkflowTask.STATUS_OK:return "ok";
+ default:
+ return "no_value";
+ }
+ }
+
+ /**
+ * @param status the status to set
+ * @uml.property name="status"
+ */
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ public void setStatusStr(String status) {
+ if ("ok".compareTo(status)==0)
+ this.status = GeneralWorkflowTask.STATUS_OK;
+ else if ("ko".compareTo(status)==0)
+ this.status = GeneralWorkflowTask.STATUS_KO;
+ else {
+ BiomajLogger.getInstance().log("internal error, can't set status in GeneralWorkflowTask :"+status);
+ }
+ }
+
+
+ public void fill(Map<String, String> task) {
+ try {
+ setStart(BiomajUtils.stringToDate(task.get(BiomajSQLQuerier.TASK_START)));
+ String end = task.get(BiomajSQLQuerier.TASK_END);
+
+ if (end != null && end.trim().isEmpty())
+ setEnd(BiomajUtils.stringToDate(end));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ return ;
+ }
+
+ setTaskId(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ setStatusStr(task.get(BiomajSQLQuerier.TASK_STATUS));
+
+ if (loadMessages) {
+ List<List<String>> messages = BiomajSQLQuerier.getTaskMessages(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ getWarn().addAll(messages.get(0));
+ getErr().addAll(messages.get(1));
+ }
+ }
+
+ public int compareTo(String nameTag) {
+ return getProcessName().compareTo(nameTag);
+ }
+
+ /**
+ * Two type tag file:
+ * file download : attributs name,hash,time,size
+ * file extract and prod : attributs name,hash,refhash
+ * refhash is the hash of the origine file (downloaded)
+ *
+ * @param files
+ * @param taskId
+ */
+ protected static void addFilesInDB(Vector<FileDesc> files, long taskId) {
+ if (files.size() == 0)
+ return;
+
+ for (FileDesc file : files) {
+ setLocalFile(file, taskId, "file");
+ }
+
+ }
+
+ protected static void setLocalFile(FileDesc fd, long taskId, String fileType) {
+
+ if (fd.getFileId() < 0) // If file has not yet been inserted
+ DBWriter.addFileToTask(fd, taskId, fileType);
+ /*
+ SQLConnection connection = DBWriter.getConnection();
+
+ String query = "SELECT idfile FROM file WHERE location='" + fd.getLocation() + "' AND " +
+ "refHash";
+ if (fd.getRefHash() == null)
+ query += " IS null";
+ else
+ query += "='" + fd.getRefHash() + "'";
+
+ connection.executeQuery(query, true);
+
+ try {
+ long id;
+ if (connection.getResult().next()) {
+ id = connection.getResult().getInt(1);
+ connection.closeStatement();
+
+ query = "UPDATE file SET " +
+ "size='" + fd.getSize() + "'," +
+ "time='" + fd.getTime() + "'," +
+ "is_extract=" + fd.isExtract() + "," +
+ "volatile=" + fd.isVolatil() + ",";
+ if (fd.getRefHash() == null)
+ query += "refHash=null,";
+ else
+ query += "refHash='" + fd.getRefHash() + "',";
+ query += "fileType='" + fileType + "' WHERE idfile=" + id;
+
+ connection.executeQuery(query, false);
+ connection.closeStatement();
+ } else {
+ String query = "INSERT INTO file(location, size, time, link, is_extract, volatile, refHash, fileType) " +
+ "values('" + fd.getLocation() + "','" + fd.getSize() + "','" + fd.getTime() + "'," + fd.isLink() +
+ "," + fd.isExtract() + "," + fd.isVolatil() + ",";
+ if (fd.getRefHash() == null)
+ query += "null";
+ else
+ query += "'" + fd.getRefHash() + "'";
+ query += ",'" + fileType + "');";
+
+ connection.executeQuery(query, false);
+ connection.closeStatement();
+
+ long id = DBWriter.getConnection().getLastInsertedId();
+ }
+
+ query = "INSERT INTO sessionTask_has_file(ref_idsessionTask,ref_idfile) " +
+ "VALUES(" + taskId + "," + id + ");";
+ connection.executeQuery(query, false);
+ connection.closeStatement();
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }*/
+ }
+
+
+ protected static void addFilesInVector(List<Map<String, String>> files, Vector<FileDesc> destination) {
+
+ for (Map<String, String> file : files) {
+
+ String type = file.get(BiomajSQLQuerier.FILE_TYPE);
+
+ String location, refHash=null;
+ long time, size;
+ boolean extract, link, volatil;
+
+ String value = file.get(BiomajSQLQuerier.FILE_LOCATION);
+
+ if (isInitialized(value))
+ location = value;
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.FILE_SIZE);
+ if (isInitialized(value))
+ size = Long.valueOf(value);
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.FILE_TIME);
+ if (isInitialized(value))
+ time = Long.valueOf(value);
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.IS_LINK);
+ if (isInitialized(value))
+ link = Boolean.valueOf(value);
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.IS_EXTRACT);
+ if (isInitialized(value))
+ extract = Boolean.valueOf(value);
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.IS_VOLATILE);
+ if (isInitialized(value))
+ volatil = Boolean.valueOf(value);
+ else
+ continue;
+
+ value = file.get(BiomajSQLQuerier.REF_HASH);
+ if ((value!=null)&&(value.compareTo("") != 0))
+ refHash = value;
+
+ FileDesc fd ;
+ if (type != null) {
+ if (type.compareTo("remote") == 0)
+ fd = new FileDesc(location, size, time, link, extract);
+ else
+ fd = new FileDesc(location, size, time, link, extract, volatil, refHash);
+ } else {
+ BiomajLogger.getInstance().log("GeneralWorkflowTask::addFileInVector Can't find type of file!");
+ continue;
+ }
+
+ destination.add(fd);
+
+ }
+ }
+
+ private static boolean isInitialized(String value) {
+ return (value!=null)&&(value.compareTo("")!=0);
+ }
+
+ public abstract void fillElement(long taskId);
+
+ public Session getSession() {
+ return _session;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/MakeReleaseTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/MakeReleaseTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/MakeReleaseTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,162 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class MakeReleaseTask extends GeneralWorkflowTask {
+
+ private Vector<FileDesc> filesCopy = new Vector<FileDesc>();
+ private Vector<FileDesc> filesMove = new Vector<FileDesc>();
+
+ public MakeReleaseTask(Session s) {
+ super(s);
+ }
+
+ public void addFile(String location,String refHash,boolean copy) throws BiomajException {
+ FileDesc f = new FileDesc(location,false,refHash);
+ if (copy)
+ this.filesCopy.add(f);
+ else
+ this.filesMove.add(f);
+ }
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+
+ List<Map<String, String>> filz = BiomajSQLQuerier.getTaskFiles(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ List<Map<String, String>> filzCopy = new ArrayList<Map<String,String>>();
+ List<Map<String, String>> filzMove = new ArrayList<Map<String,String>>();
+
+ for (Map<String, String> file : filz) {
+ String type = file.get(BiomajSQLQuerier.FILE_TYPE);
+ if (type.equals("copy"))
+ filzCopy.add(file);
+ else if (type.equals("move"))
+ filzMove.add(file);
+ }
+ addFilesInVector(filzCopy, filesCopy);
+ addFilesInVector(filzMove, filesMove);
+
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.moveTag;
+ }
+
+ @Override
+ public void fillElement(long taskId) {
+ String query = "UPDATE sessionTask SET taskType='" + getProcessName() + "',nbFilesMoved=" +
+ filesMove.size() + ",nbFilesCopied=" + filesCopy.size() + " WHERE idsessionTask=" + taskId + ";";
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ addFilesInElement("copy",filesCopy, taskId);
+ addFilesInElement("move",filesMove, taskId);
+
+ }
+
+ protected static void addFilesInElement(String nameTag, Vector<FileDesc> files, long taskId){
+ if (files.size() == 0)
+ return;
+
+ for (FileDesc file : files) {
+ setLocalFile(file, taskId, nameTag);
+ }
+ }
+
+ /**
+ * @return the filesCopy
+ * @uml.property name="filesCopy"
+ */
+ public Vector<FileDesc> getFilesCopy() {
+ return filesCopy;
+ }
+
+ /**
+ * @param filesCopy the filesCopy to set
+ * @uml.property name="filesCopy"
+ */
+ public void setFilesCopy(Vector<FileDesc> filesCopy) {
+ this.filesCopy = filesCopy;
+ }
+
+ /**
+ * @return the filesMove
+ * @uml.property name="filesMove"
+ */
+ public Vector<FileDesc> getFilesMove() {
+ return filesMove;
+ }
+
+ /**
+ * @param filesMove the filesMove to set
+ * @uml.property name="filesMove"
+ */
+ public void setFilesMove(Vector<FileDesc> filesMove) {
+ this.filesMove = filesMove;
+ }
+
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PostProcessTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PostProcessTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PostProcessTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,57 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import org.inria.biomaj.utils.BiomajConst;
+
+
+public class PostProcessTask extends PreProcessTask {
+
+ public PostProcessTask(Session s) {
+ super(s);
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.postProcessTag;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PreProcessTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PreProcessTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/PreProcessTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,161 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.sql.Statement;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+
+public class PreProcessTask extends GeneralWorkflowTask {
+
+ protected Vector<String> metaProcessName = new Vector<String> ();
+ protected Vector<String> metaProcessblock = new Vector<String> ();
+
+ public PreProcessTask(Session s) {
+ super(s);
+ }
+
+ public void addMetaProcess(String name,String block) {
+ metaProcessName.add(name);
+ metaProcessblock.add(block);
+ }
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+
+ List<Map<String, String>> metas = BiomajSQLQuerier.getTaskMetaprocesses(Integer.valueOf(task.get(BiomajSQLQuerier.TASK_ID)));
+ for (Map<String, String> meta : metas) {
+ metaProcessName.add(meta.get(BiomajSQLQuerier.META_NAME));
+ metaProcessblock.add(meta.get(BiomajSQLQuerier.BLOCK));
+ }
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.preProcessTag;
+ }
+
+ @Override
+ public void fillElement(long taskId) {
+
+ String query = "UPDATE sessionTask SET nbreMetaProcess=" + metaProcessName.size() +
+ ",taskType='" + getProcessName() + "' WHERE idsessionTask=" + taskId;
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+
+ /*
+ for (int i=0; i< metaProcessName.size(); i++) {
+
+ String id = getSession().getId() + "." + metaProcessName.get(i);
+ query = "SELECT * FROM metaprocess WHERE idmetaprocess='" + id + "';";
+ stat = conn.getStatement();
+
+ try {
+ ResultSet rs = conn.executeQuery(query, stat);
+ if (!rs.next()) {
+ query = "INSERT INTO metaprocess(idmetaprocess, ref_idsessionTask, startTime, endTime) " +
+ "values ('" + id + "'," + taskId + ",'" + BiomajUtils.dateToString(new Date(), Locale.US) +
+ "','" + BiomajUtils.dateToString(new Date(), Locale.US) + "');";
+
+ Statement stat2 = conn.getStatement();
+ conn.executeUpdate(query, stat2);
+ SQLConnectionFactory.closeConnection(stat2);
+ DBWriter.addMetaId(id);
+ }
+ } catch (SQLException e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ SQLConnectionFactory.closeConnection(stat);
+ }*/
+
+ }
+
+
+ public String getNameProcess(int i) {
+ if (i<metaProcessName.size())
+ return metaProcessName.get(i);
+
+ return null;
+ }
+
+ public int getNbMetaProcess() {
+ return metaProcessName.size();
+ }
+
+ public Vector<MetaProcess> getMetaProcess(String block) throws BiomajException {
+ Vector<MetaProcess> res = new Vector<MetaProcess>();
+
+ if (getSession().getBank().getConfig()== null)
+ System.err.println("error dev: config is not set : PreProcessTask::getMetaProcess");
+
+ List<Map<String, String>> metas = BiomajSQLQuerier.getTaskMetaprocesses(getTaskId());
+ if (block == null || block.trim().isEmpty()) {
+ for (Map<String, String> meta : metas) {
+ MetaProcess mp = new MetaProcess();
+ mp.fill(meta);
+ res.add(mp);
+ }
+ } else {
+ for (Map<String, String> meta : metas) {
+ if (meta.get(BiomajSQLQuerier.BLOCK).equals(block)) {
+ MetaProcess mp = new MetaProcess();
+ mp.fill(meta);
+ res.add(mp);
+ }
+ }
+ }
+
+ return res;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ProductionDirectory.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ProductionDirectory.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ProductionDirectory.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,244 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.Map;
+
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+public class ProductionDirectory implements Comparable<ProductionDirectory> {
+
+ /** Const definition */
+ public static final int REMOVE = 0;
+ public static final int AVAILABLE = 1;
+ public static final String REMOVE_STR = "deleted";
+ public static final String AVAILABLE_STR = "available";
+
+ /**
+ * REMOVE or AVAILABLE
+ * @uml.property name="state"
+ */
+ private int state = -1;
+ /**
+ * Date of creation
+ * @uml.property name="creationDate"
+ */
+ private Date creationDate ;
+ /**
+ * Date of destruction
+ * @uml.property name="removeDate"
+ */
+ private Date removeDate ;
+ /**
+ * Absolute path
+ * @uml.property name="path"
+ */
+ private String path;
+ /**
+ * Session id that create the prod dir
+ * @uml.property name="session"
+ */
+ private long session;
+
+ /**
+ * Total size of prod dir
+ * @uml.property name="size"
+ */
+ private long size;
+
+ public ProductionDirectory() {
+
+ }
+
+ public ProductionDirectory(Map<String, String> directory) {
+ setStateStr(directory.get(BiomajSQLQuerier.DIR_STATE));
+ if (getState() == ProductionDirectory.REMOVE) {
+ try {
+ setRemoveDate(BiomajUtils.stringToDate(directory.get(BiomajSQLQuerier.DIR_REMOVE)));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ }
+ setPath(directory.get(BiomajSQLQuerier.DIR_PATH));
+ setSession(Long.valueOf(directory.get(BiomajSQLQuerier.DIR_SESSION)));
+ setSize(BiomajUtils.stringToSize(directory.get(BiomajSQLQuerier.DIR_SIZE)));
+
+ try {
+ setCreationDate(BiomajUtils.stringToDate(directory.get(BiomajSQLQuerier.DIR_CREATION)));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ }
+
+
+ /**
+ * @return the size
+ * @uml.property name="size"
+ */
+ public long getSize() {
+ return size;
+ }
+ /**
+ * @param size the size to set
+ * @uml.property name="size"
+ */
+ public void setSize(long size) {
+ this.size = size;
+ }
+ /**
+ * @return the creationDate
+ * @uml.property name="creationDate"
+ */
+ public Date getCreationDate() {
+ return creationDate;
+ }
+ /**
+ * @param creationDate the creationDate to set
+ * @uml.property name="creationDate"
+ */
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+ /**
+ * @return the path
+ * @uml.property name="path"
+ */
+ public String getPath() {
+ return path;
+ }
+ /**
+ * @param path the path to set
+ * @uml.property name="path"
+ */
+ public void setPath(String path) {
+ this.path = path;
+ }
+ /**
+ * @return the removeDate
+ * @uml.property name="removeDate"
+ */
+ public Date getRemoveDate() {
+ return removeDate;
+ }
+ /**
+ * @param removeDate the removeDate to set
+ * @uml.property name="removeDate"
+ */
+ public void setRemoveDate(Date removeDate) {
+ this.removeDate = removeDate;
+ }
+ /**
+ * @return the state
+ * @uml.property name="state"
+ */
+ public int getState() {
+ return state;
+ }
+ /**
+ * @param state the state to set
+ * @uml.property name="state"
+ */
+ public void setState(int state) {
+ this.state = state;
+ }
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null)
+ return false;
+
+ ProductionDirectory pd;
+ if (obj instanceof ProductionDirectory)
+ pd = (ProductionDirectory)obj;
+ else
+ return false;
+
+ if (pd == null)
+ return false;
+
+ if ((pd.path==null)||(this.path==null))
+ return false;
+
+ return ((pd.path.compareTo(this.path)==0)&&(pd.state==this.state));
+
+ }
+
+ public String getStateStr() {
+ switch (state) {
+ case AVAILABLE : return AVAILABLE_STR;
+ case REMOVE : return REMOVE_STR;
+ }
+ return "";
+ }
+
+ public void setStateStr(String state) {
+ if (AVAILABLE_STR.compareTo(state)==0)
+ this.state = AVAILABLE;
+ else if (REMOVE_STR.compareTo(state)==0)
+ this.state = REMOVE;
+ }
+
+ public int compareTo(ProductionDirectory o) {
+ if (creationDate.getTime()<o.getCreationDate().getTime())
+ return -1;
+ else if (creationDate.getTime()==o.getCreationDate().getTime())
+ return 0;
+ return 1;
+ }
+ /**
+ * @return the session
+ * @uml.property name="session"
+ */
+ public long getSession() {
+ return session;
+ }
+ /**
+ * @param session the session to set
+ * @uml.property name="session"
+ */
+ public void setSession(long session) {
+ this.session = session;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ReleaseTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ReleaseTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/ReleaseTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,106 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+
+import java.sql.Statement;
+import java.util.Map;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.inria.biomaj.utils.BiomajConst;
+
+public class ReleaseTask extends GeneralWorkflowTask {
+
+ public ReleaseTask(Session s) {
+ super(s);
+ }
+
+
+ /**
+ * @uml.property name="value"
+ */
+ private String value=" ";
+
+ /**
+ * @return the value
+ * @uml.property name="value"
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ * @uml.property name="value"
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.releaseTag;
+ }
+
+ @Override
+ public void fill(Map<String, String> task) {
+ super.fill(task);
+ value = task.get(BiomajSQLQuerier.VALUE);
+ }
+
+
+ @Override
+ public void fillElement(long taskId) {
+ if (value == null)
+ value="";
+
+ String query = "UPDATE sessionTask set taskType='" + getProcessName() + "',value='" +
+ value + "' WHERE idsessionTask=" + taskId;
+
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ Statement stat = conn.getStatement();
+ conn.executeUpdate(query, stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/RemoveProcessTask.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/RemoveProcessTask.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/RemoveProcessTask.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,58 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import org.inria.biomaj.utils.BiomajConst;
+
+
+public class RemoveProcessTask extends PreProcessTask {
+
+ public RemoveProcessTask(Session s) {
+ super(s);
+ }
+
+ @Override
+ public String getProcessName() {
+ return BiomajConst.removeProcessTag;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Session.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Session.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/Session.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,704 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Vector;
+import org.inria.biomaj.session.process.BiomajProcess;
+import org.inria.biomaj.session.process.MetaProcess;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class Session implements Comparable<Session>{
+
+ public static final int PREPROCESS = 0 ;
+ public static final int RELEASE = 1 ;
+ public static final int CHECK = 2 ;
+ public static final int DOWNLOAD = 3 ;
+ public static final int EXTRACT = 4 ;
+ public static final int COPY = 5 ;
+ public static final int MOVE = 6 ;
+ public static final int POSTPROCESS= 7 ;
+ public static final int DEPLOYMENT = 8 ;
+ public static final int REMOVEPROCESS= 9 ;
+
+ /**
+ * @uml.property name="_bank"
+ * @uml.associationEnd multiplicity="(1 1)" inverse="currentSession:org.inria.biomaj.session.bank.Bank"
+ */
+ private Bank _bank ;
+
+ public Session(Bank bank) {
+ _bank = bank;
+ }
+
+
+ public static GeneralWorkflowTask createWorkflowTask(int proc,Session s) {
+
+ switch(proc) {
+ case Session.PREPROCESS :
+ return new PreProcessTask(s);
+ case Session.RELEASE:
+ return new ReleaseTask(s);
+ case Session.CHECK:
+ return new CheckTask(s);
+ case Session.COPY:
+ return new AddLocalFilesTask(s);
+ case Session.DOWNLOAD:
+ return new DownloadTask(s);
+ case Session.EXTRACT:
+ return new ExtractTask(s);
+ case Session.MOVE:
+ return new MakeReleaseTask(s);
+ case Session.POSTPROCESS:
+ return new PostProcessTask(s);
+ case Session.REMOVEPROCESS:
+ return new RemoveProcessTask(s);
+ case Session.DEPLOYMENT:
+ return new DeploymentTask(s);
+ default:
+ {
+ BiomajLogger.getInstance().log(String.valueOf(proc)+" unknown value for create a task...");
+ //Arret brutale, car erreur de dev!
+ System.exit(-1);
+ return null;
+ }
+ }
+
+ }
+
+ public static String getNameTagWorkflowTask(int proc) {
+
+ switch(proc) {
+ case Session.PREPROCESS :
+ return BiomajConst.preProcessTag;
+ case Session.CHECK:
+ return BiomajConst.checkTag;
+ case Session.COPY:
+ return BiomajConst.copyTag;
+ case Session.DOWNLOAD:
+ return BiomajConst.downloadTag;
+ case Session.EXTRACT:
+ return BiomajConst.extractTag;
+ case Session.MOVE:
+ return BiomajConst.moveTag;
+ case Session.POSTPROCESS:
+ return BiomajConst.postProcessTag;
+ case Session.REMOVEPROCESS:
+ return BiomajConst.removeProcessTag;
+ case Session.RELEASE:
+ return BiomajConst.releaseTag;
+ case Session.DEPLOYMENT:
+ return BiomajConst.deploymentTag;
+ default:
+ return "unknown tag:"+Integer.toString(proc);
+ }
+
+ }
+
+ /**
+ * @uml.property name="workflowtasks"
+ * @uml.associationEnd qualifier="valueOf:java.lang.Integer org.inria.biomaj.session.bank.GeneralWorkflowTask"
+ */
+ private HashMap<Integer,GeneralWorkflowTask> workflowtasks = new HashMap<Integer,GeneralWorkflowTask>();
+
+ private GeneralWorkflowTask activeTask = null;
+
+
+ /**
+ * id session
+ * @uml.property name="id"
+ */
+ private Long id = new Long(-1);
+
+ /**
+ * @uml.property name="logfile"
+ */
+ private String logfile = "";
+
+
+ /**
+ * @uml.property name="start"
+ */
+ private Date start = new Date();
+
+ /**
+ * @uml.property name="end"
+ */
+ private Date end = null ;
+
+ /**
+ * @uml.property name="warn"
+ */
+ private Vector<String> warn = new Vector<String>();
+
+ private Vector<String> oldWarn = null;
+ private Vector<String> oldErr = null;
+
+ /**
+ * @uml.property name="err"
+ */
+ private Vector<String> err = new Vector<String>();
+
+ public void fill(Map<String, String> session, boolean loadMessages) {
+
+ setId(Long.valueOf(session.get(BiomajSQLQuerier.SESSION_ID)));
+
+ try {
+ setStart(BiomajUtils.stringToDate(session.get(BiomajSQLQuerier.SESSION_START)));
+ String end = session.get(BiomajSQLQuerier.SESSION_END);
+ if (end != null && !end.isEmpty())
+ setEnd(BiomajUtils.stringToDate(end));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ }
+ setLogfile(session.get(BiomajSQLQuerier.LOG_FILE));
+
+ long sessionId = Long.valueOf(session.get(BiomajSQLQuerier.SESSION_ID));
+
+ loadWorkflowTasks(sessionId, loadMessages);
+
+ if (loadMessages) {
+ List<List<String>> messages = BiomajSQLQuerier.getSessionMessages(sessionId);
+
+ getWarn().addAll(messages.get(0));
+ getErr().addAll(messages.get(1));
+ }
+ }
+
+ public void fillWithDirectoryVersion(String dir) throws BiomajException {
+ setId(BiomajUtils.getUniqueNumericId());
+ setStart(new Date());
+ setEnd(new Date());
+ setLogfile("");
+
+ workflowtasks.put(PREPROCESS, new PreProcessTask(this));
+ workflowtasks.get(PREPROCESS).setStart(new Date());
+ workflowtasks.get(PREPROCESS).setEnd(new Date());
+ workflowtasks.get(PREPROCESS).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(RELEASE, new ReleaseTask(this));
+ workflowtasks.get(RELEASE).setStart(new Date());
+ workflowtasks.get(RELEASE).setEnd(new Date());
+ workflowtasks.get(RELEASE).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(CHECK, new CheckTask(this));
+ workflowtasks.get(CHECK).setStart(new Date());
+ workflowtasks.get(CHECK).setEnd(new Date());
+ workflowtasks.get(CHECK).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(DOWNLOAD, new DownloadTask(this));
+ workflowtasks.get(DOWNLOAD).setStart(new Date());
+ workflowtasks.get(DOWNLOAD).setEnd(new Date());
+ workflowtasks.get(DOWNLOAD).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(COPY, new AddLocalFilesTask(this));
+ workflowtasks.get(COPY).setStart(new Date());
+ workflowtasks.get(COPY).setEnd(new Date());
+ workflowtasks.get(COPY).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(EXTRACT, new ExtractTask(this));
+ workflowtasks.get(EXTRACT).setStart(new Date());
+ workflowtasks.get(EXTRACT).setEnd(new Date());
+ workflowtasks.get(EXTRACT).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(POSTPROCESS, new PostProcessTask(this));
+ workflowtasks.get(POSTPROCESS).setStart(new Date());
+ workflowtasks.get(POSTPROCESS).setEnd(new Date());
+ workflowtasks.get(POSTPROCESS).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+// workflowtasks.put(REMOVEPROCESS, new RemoveProcessTask(this));
+// workflowtasks.get(REMOVEPROCESS).setStart(new Date());
+// workflowtasks.get(REMOVEPROCESS).setEnd(new Date());
+// workflowtasks.get(REMOVEPROCESS).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ workflowtasks.put(MOVE, new MakeReleaseTask(this));
+ workflowtasks.get(MOVE).setStart(new Date());
+ workflowtasks.get(MOVE).setEnd(new Date());
+ workflowtasks.get(MOVE).setStatus(GeneralWorkflowTask.STATUS_OK);
+ Vector<FileDesc> result = new Vector<FileDesc>();
+ BiomajUtils.getListFilesFromDir(dir,result);
+ ((MakeReleaseTask)workflowtasks.get(MOVE)).setFilesCopy(result);
+
+ workflowtasks.put(DEPLOYMENT, new DeploymentTask(this));
+ workflowtasks.get(DEPLOYMENT).setStart(new Date());
+ workflowtasks.get(DEPLOYMENT).setEnd(new Date());
+ workflowtasks.get(DEPLOYMENT).setStatus(GeneralWorkflowTask.STATUS_OK);
+
+ }
+
+ /**
+ * @return the err
+ * @uml.property name="err"
+ */
+ public Vector<String> getErr() {
+ return err;
+ }
+
+ public Vector<String> getNewErr() {
+ if (oldErr == null) {
+ oldErr = new Vector<String>();
+ oldErr.addAll(err);
+
+ return err;
+ }
+
+ Vector<String> res = new Vector<String>();
+
+ if (oldErr.size() == err.size()) // Nothing new
+ return res;
+ else if (err.size() > oldErr.size()) {
+ for (String s : err) {
+ boolean found = false;
+ for (String sOld : oldErr) {
+ if (s == sOld) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ oldErr.add(s);
+ res.add(s);
+ }
+ }
+ } else {
+ throw new RuntimeException("Somehow, some message have been deleted since the previous call.");
+ }
+
+ return res;
+ }
+
+ /**
+ * @param err the err to set
+ * @uml.property name="err"
+ */
+ public void setErr(Vector<String> err) {
+ this.err = err;
+ }
+
+ /**
+ * @return the warn
+ * @uml.property name="warn"
+ */
+ public Vector<String> getWarn() {
+ return warn;
+ }
+
+ /**
+ * Returns the new messages since the last call to this method.
+ *
+ * @return
+ */
+ public Vector<String> getNewWarn() {
+ if (oldWarn == null) {
+ oldWarn = new Vector<String>();
+ oldWarn.addAll(warn);
+
+ return warn;
+ }
+
+ Vector<String> res = new Vector<String>();
+
+ if (oldWarn.size() == warn.size()) // Nothing new
+ return res;
+ else if (warn.size() > oldWarn.size()) {
+ for (String s : warn) {
+ boolean found = false;
+ for (String sOld : oldWarn) {
+ if (s == sOld) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ oldWarn.add(s);
+ res.add(s);
+ }
+ }
+ } else {
+ throw new RuntimeException("Somehow, some message have been deleted since the previous call.");
+ }
+
+ return res;
+ }
+
+ /**
+ * @param warn the warn to set
+ * @uml.property name="warn"
+ */
+ public void setWarn(Vector<String> warn) {
+ this.warn = warn;
+ }
+
+
+ /**
+ * Getter of the property <tt>id</tt>
+ * @return Returns the id.
+ * @uml.property name="id"
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * Getter of the property <tt>logfile</tt>
+ * @return Returns the logfile.
+ * @uml.property name="logfile"
+ */
+ public String getLogfile() {
+ return logfile;
+ }
+
+
+ public boolean getStatus() {
+
+ if (workflowtasks.size()==0)
+ return false;
+
+ Collection<GeneralWorkflowTask> l = workflowtasks.values();
+
+ for (GeneralWorkflowTask t : l)
+ if ((t.getStatus()==GeneralWorkflowTask.STATUS_KO))
+ return false;
+
+ return true;
+ }
+
+ public boolean taskAreSaveInWorkflow(int proc) {
+ return workflowtasks.containsKey(proc);
+ }
+
+ public GeneralWorkflowTask getWorkflowTask(int process) {
+ if (workflowtasks.containsKey(process))
+ return workflowtasks.get(process);
+
+ return null;
+ }
+
+ public GeneralWorkflowTask getLastTask() {
+ for (int i=Session.REMOVEPROCESS;i>=Session.PREPROCESS;i--) {
+ if (workflowtasks.containsKey(i))
+ return workflowtasks.get(i);
+ }
+ return null;
+ }
+
+ public HashMap<Integer,GeneralWorkflowTask> getWorkflowTasks() {
+ return workflowtasks;
+ }
+
+ public void setWorkflowTasks(HashMap<Integer,GeneralWorkflowTask> in) {
+ workflowtasks = in;
+ }
+
+ /**
+ * Retrieves and initializes the tasks of a given session.
+ *
+ * @param sessionId
+ */
+ protected void loadWorkflowTasks(long sessionId, boolean loadMessages) {
+
+ List<Map<String, String>> tasks = BiomajSQLQuerier.getSessionTasks(sessionId);
+ for (Map<String, String> task : tasks) {
+ String taskType = task.get(BiomajSQLQuerier.TASK_TYPE);
+ GeneralWorkflowTask wt = null;
+
+ if (taskType.equals(BiomajConst.preProcessTag)) {
+ wt = new PreProcessTask(this);
+ workflowtasks.put(PREPROCESS, wt);
+ } else if (taskType.equals(BiomajConst.checkTag)) {
+ wt = new CheckTask(this);
+ workflowtasks.put(CHECK, wt);
+ } else if (taskType.equals(BiomajConst.copyTag)) {
+ wt = new AddLocalFilesTask(this);
+ workflowtasks.put(COPY, wt);
+ } else if (taskType.equals(BiomajConst.downloadTag)) {
+ wt = new DownloadTask(this);
+ workflowtasks.put(DOWNLOAD, wt);
+ } else if (taskType.equals(BiomajConst.extractTag)) {
+ wt = new ExtractTask(this);
+ workflowtasks.put(EXTRACT, wt);
+ } else if (taskType.equals(BiomajConst.moveTag)) {
+ wt = new MakeReleaseTask(this);
+ workflowtasks.put(MOVE, wt);
+ } else if (taskType.equals(BiomajConst.postProcessTag)) {
+ wt = new PostProcessTask(this);
+ workflowtasks.put(POSTPROCESS, wt);
+ } else if (taskType.equals(BiomajConst.removeProcessTag)) {
+ wt = new RemoveProcessTask(this);
+ workflowtasks.put(REMOVEPROCESS, wt);
+ } else if (taskType.equals(BiomajConst.releaseTag)) {
+ wt = new ReleaseTask(this);
+ workflowtasks.put(RELEASE, wt);
+ } else if (taskType.equals(BiomajConst.deploymentTag)) {
+ wt = new DeploymentTask(this);
+ workflowtasks.put(DEPLOYMENT, wt);
+ }
+ wt.setLoadMessages(loadMessages);
+ wt.fill(task);
+ }
+ }
+
+
+ /**
+ * Setter of the property <tt>id</tt>
+ * @param id The id to set.
+ * @uml.property name="id"
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+
+ /**
+ * Setter of the property <tt>logfile</tt>
+ * @param logfile The logfile to set.
+ * @uml.property name="logfile"
+ */
+ public void setLogfile(String logfile) {
+ this.logfile = logfile;
+ }
+
+
+ public GeneralWorkflowTask setWorkflowTask(int process) {
+ //Ajout le 16/01/2007
+ if (workflowtasks.containsKey(process))
+ return workflowtasks.get(process);
+
+
+ GeneralWorkflowTask p = createWorkflowTask(process,this);
+
+ workflowtasks.put(new Integer(process), p);
+ return p;
+ }
+
+ public boolean workflowTaskExist(int task) {
+
+ if (workflowtasks.containsKey(task))
+ return true;
+
+ return false;
+ }
+
+ /**
+ * @return the end
+ * @uml.property name="end"
+ */
+ public Date getEnd() {
+ return end;
+ }
+
+ /**
+ * @param end the end to set
+ * @uml.property name="end"
+ */
+ public void setEnd(Date end) {
+ this.end = end;
+ }
+
+ /**
+ * @return the start
+ * @uml.property name="start"
+ */
+ public Date getStart() {
+ return start;
+ }
+
+ /**
+ * @param start the start to set
+ * @uml.property name="start"
+ */
+ public void setStart(Date start) {
+ this.start = start;
+ }
+
+ public int compareTo(Session o) {
+ if (getStart()==null)
+ return -1;
+
+ if (o.getStart()==null)
+ return -1;
+
+ if (getStart().getTime()<o.getStart().getTime())
+ return -1;
+ if (getStart().getTime()==o.getStart().getTime())
+ return 0;
+
+ return 1;
+ }
+
+
+ public Vector<String> getMessageErrorOnSession() throws BiomajException,ParseException {
+ Vector<String> res = new Vector<String>();
+
+ if (getEnd() == null)
+ setEnd(new Date());
+
+ res.add("SESSION (start:"+BiomajUtils.dateToString(getStart(), Locale.US)+" - end:"+BiomajUtils.dateToString(getEnd(), Locale.US)+")\n time:"+BiomajUtils.timeToString(getEnd().getTime() - getStart().getTime()));
+ res.add("--------");
+ res.add("LOG:"+getLogfile());
+ res.add("----------- GLOBAL ERROR -----------------------");
+ for (String s : getErr()) {
+ res.add("ERROR : "+s);
+ }
+ if ( getErr().size()==0)
+ res.add("* NONE *");
+ res.add("----------------------------------------");
+ res.add("");
+ res.add("----------- GLOBAL WARNING --------------------");
+ for (String s : getWarn()) {
+ res.add("WARNING : "+s);
+ }
+ if ( getWarn().size()==0)
+ res.add("* NONE *");
+ res.add("");
+ res.add("----------- ERROR ON SUB-TASK -----------------------");
+ for ( Integer i : workflowtasks.keySet() ) {
+ GeneralWorkflowTask g = workflowtasks.get(i);
+ if (g.getEnd() == null)
+ g.setEnd(new Date());
+
+ /*"[start:"+BiomajUtils.dateToString(g.getStart())+" - end:"+BiomajUtils.dateToString(g.getEnd())+*/
+ String d ="[time:"+BiomajUtils.timeToString(g.getEnd().getTime() - g.getStart().getTime())+"]";
+
+ res.add(" *** "+g.getProcessName()+" *** "+d);
+
+ for (String s : g.getErr())
+ res.add("ERROR: "+getNameTagWorkflowTask(i)+":"+s);
+ //PostProcess est un descendant de PreProcess, donc cette ligne suffit....
+ if (g instanceof PreProcessTask) {
+ PreProcessTask pp = (PreProcessTask) g;
+ Vector<MetaProcess> lmp = null;
+ lmp = pp.getMetaProcess(null);
+
+ for (MetaProcess mp : lmp) {
+ for (BiomajProcess bp : mp.getListProcess()) {
+ for (String e : bp.getErr())
+ res.add("ERROR: "+mp.getName()+"::"+bp.getKeyName()+" : " + e);
+ }
+ for (String s : mp.getErr()) {
+ res.add("ERROR: "+mp.getName()+":"+s);
+ }
+ }
+ }
+
+ for (String s : g.getWarn())
+ res.add("WARNING: "+getNameTagWorkflowTask(i)+":"+s);
+ //PostProcess est un descendant de PreProcess, donc cette ligne suffit....
+ if (g instanceof PreProcessTask) {
+ PreProcessTask pp = (PreProcessTask) g;
+ Vector<MetaProcess> lmp = null;
+ lmp = pp.getMetaProcess(null);
+ for (MetaProcess mp : lmp) {
+ for (BiomajProcess bp : mp.getListProcess()) {
+ for (String e : bp.getWarn())
+ res.add("WARNING: "+mp.getName()+"::"+bp.getKeyName()+" : " + e);
+ }
+ for (String s : mp.getWarn()) {
+ res.add("WARNING: "+mp.getName()+":"+s);
+ }
+ }
+ }
+ }
+ /*
+ res.add("----------------------------------------");
+ res.add("");
+ res.add("----------- WARNING ON SUB-TASK --------------------");
+ for ( Integer i : workflowtasks.keySet() ) {
+ GeneralWorkflowTask g = workflowtasks.get(i);
+ res.add(" *** "+g.getProcessName()+" ***");
+ for (String s : g.getWarn())
+ res.add(getNameTagWorkflowTask(i)+":"+s);
+ //PostProcess est un descendant de PreProcess, donc cette ligne suffit....
+ if (g instanceof PreProcessTask) {
+ PreProcessTask pp = (PreProcessTask) g;
+ Vector<MetaProcess> lmp = null;
+
+ if (g instanceof PostProcessTask)
+ lmp = pp.getMetaProcess(true);
+ else
+ lmp = pp.getMetaProcess(false);
+ for (MetaProcess mp : lmp) {
+ for (BiomajProcess bp : mp.getListProcess()) {
+ for (String e : bp.getWarn())
+ res.add(mp.getName()+"::"+bp.getKeyName()+" : " + e);
+ }
+ for (String s : mp.getWarn()) {
+ res.add(mp.getName()+":"+s);
+ }
+ }
+ }
+ }*/
+ res.add("----------------------------------------");
+ return res;
+ }
+
+
+ public Bank getBank() {
+ return _bank;
+ }
+
+
+ public GeneralWorkflowTask getActiveTask() {
+ return activeTask;
+ }
+
+ public void setActiveTask(GeneralWorkflowTask task) {
+ activeTask = task;
+ }
+
+}
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/SubProcessDesc.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/SubProcessDesc.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/SubProcessDesc.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,78 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.bank;
+
+public class SubProcessDesc {
+ /**
+ * @uml.property name="keyname"
+ */
+ public String keyname="";
+ /**
+ * @uml.property name="name"
+ */
+ public String name = "";
+ /**
+ * @uml.property name="exe"
+ */
+ public String exe = "";
+ /**
+ * @uml.property name="args"
+ */
+ public String args = "";
+ /**
+ * @uml.property name="desc"
+ */
+ public String desc = "";
+ /**
+ * @uml.property name="type"
+ */
+ public String type = "";
+ /**
+ * @uml.property name="killOnError"
+ */
+ public String killOnError = "";
+ /**
+ * @uml.property name="isOk"
+ */
+ public boolean isOk = false;
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/bank-i.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/bank-i.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/bank-i.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,470 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="bank-i" id="org.inria.biomaj.session.bank" metadata="uml2-1.0" initialized="true" zoom="0.5" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajQueryXmlStateFile" location="1749,1139" size="643,502" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile" runTimeClassModel="getLastUpdateBankWithNewRelease(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getLastUpdateBankWithNewReleaseWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getUncompressedFilesWithArchive(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),getStatMoyenneUpdate(Ljava.lang.String;),getLastMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Z),getUpdateBank(Ljava.lang.String;JLorg.inria.biomaj.session.bank.Bank;Z),getAvailableDirectoriesProduction(Ljava.lang.String;),getUpdateBank(Ljava.lang.String;Ljava.util.Date;Lorg.inria.biomaj.session.bank.Bank;Z),getFuturReleaseBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getRoot(),getLastOnlineDirectory(Ljava.lang.String;),getLastUpdateBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getAllUpdateBankStartDateHeader(Ljava.lang.String;),getLastConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Configuration;),getAllDirectoriesProduction(Ljava.lang.String;),getEcartTypeUpdate(Ljava.lang.String;),getAllMetaProcess(Ljava.lang.String;Ljava.util.Vector;),getLastUpdateBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),getFuturReleaseBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z),setSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;),org.inria.biomaj.session.bank.BiomajQueryXmlStateFile.BiomajNamespaceContextXInclude,getStatVectorSize(Ljava.lang.String;),evaluerSAX(Ljava.io.File;Ljava.lang.String;Ljavax.xml.namespace.QName;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="620,418">
+ <children xsi:type="editmodel:MethodEditModel" name="evaluerSAX" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#evaluerSAX(Ljava.io.File;Ljava.lang.String;Ljavax.xml.namespace.QName;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllDirectoriesProduction" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllDirectoriesProduction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableDirectoriesProduction" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAvailableDirectoriesProduction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEcartTypeUpdate" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getEcartTypeUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFuturReleaseBankWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getFuturReleaseBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Configuration;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastMetaProcess" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastOnlineDirectory" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastOnlineDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithNewReleaseWithConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithNewReleaseWithConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithoutConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRoot" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getRoot()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatMoyenneUpdate" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getStatMoyenneUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatVectorSize" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getStatVectorSize(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUncompressedFilesWithArchive" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUncompressedFilesWithArchive(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllUpdateBankStartDateHeader" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllUpdateBankStartDateHeader(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastUpdateBankWithNewRelease" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getLastUpdateBankWithNewRelease(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcess" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getAllMetaProcess(Ljava.lang.String;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFuturReleaseBankWithoutConfiguration" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getFuturReleaseBankWithoutConfiguration(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdateBank" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUpdateBank(Ljava.lang.String;Ljava.util.Date;Lorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdateBank" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#getUpdateBank(Ljava.lang.String;JLorg.inria.biomaj.session.bank.Bank;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSession" id="org.inria.biomaj.session.bank/BiomajQueryXmlStateFile#setSession(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Session;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="266,143"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ProductionDirectory" location="505,3113" size="366,388" id="org.inria.biomaj.session.bank/ProductionDirectory" runTimeClassModel="setStateStr(Ljava.lang.String;),getSession(),setSize(J),aVAILABLE,equals(Ljava.lang.Object;),getPath(),session,creationDate,setSession(J),setRemoveDate(Ljava.util.Date;),getState(),rEMOVE,compareTo(Lorg.inria.biomaj.session.bank.ProductionDirectory;),setCreationDate(Ljava.util.Date;),getSize(),setState(I),state,setPath(Ljava.lang.String;),size,path,removeDate,getStateStr(),getCreationDate(),getRemoveDate()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="109,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="219,304">
+ <children xsi:type="editmodel:MethodEditModel" name="compareTo" id="org.inria.biomaj.session.bank/ProductionDirectory#compareTo(Lorg.inria.biomaj.session.bank.ProductionDirectory;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="equals" id="org.inria.biomaj.session.bank/ProductionDirectory#equals(Ljava.lang.Object;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCreationDate" id="org.inria.biomaj.session.bank/ProductionDirectory#getCreationDate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPath" id="org.inria.biomaj.session.bank/ProductionDirectory#getPath()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoveDate" id="org.inria.biomaj.session.bank/ProductionDirectory#getRemoveDate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSession" id="org.inria.biomaj.session.bank/ProductionDirectory#getSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSize" id="org.inria.biomaj.session.bank/ProductionDirectory#getSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getState" id="org.inria.biomaj.session.bank/ProductionDirectory#getState()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStateStr" id="org.inria.biomaj.session.bank/ProductionDirectory#getStateStr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setCreationDate" id="org.inria.biomaj.session.bank/ProductionDirectory#setCreationDate(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPath" id="org.inria.biomaj.session.bank/ProductionDirectory#setPath(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoveDate" id="org.inria.biomaj.session.bank/ProductionDirectory#setRemoveDate(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSession" id="org.inria.biomaj.session.bank/ProductionDirectory#setSession(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSize" id="org.inria.biomaj.session.bank/ProductionDirectory#setSize(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setState" id="org.inria.biomaj.session.bank/ProductionDirectory#setState(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStateStr" id="org.inria.biomaj.session.bank/ProductionDirectory#setStateStr(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Session" location="50,3113" size="405,635" id="org.inria.biomaj.session.bank/Session" runTimeClassModel="workflowTaskExist(I),getId(),getLogfile(),getWarn(),start,setWarn(Ljava.util.Vector;),getLastTask(),end,err,rELEASE,pREPROCESS,eXTRACT,getWorkflowTask(I),getWorkflowTask(Lorg.w3c.dom.Node;I),id,fillWithDirectoryVersion(Ljava.lang.String;),cOPY,compareTo(Lorg.inria.biomaj.session.bank.Session;),getStatus(),workflowtasks,fill_internal(Lorg.w3c.dom.Node;),getBank(),setLogfile(Ljava.lang.String;),mOVE,dEPLOYMENT,getStart(),getEnd(),getErr(),cHECK,setWorkflowTasks(Ljava.util.HashMap;),getMessageErrorOnSession(),setStart(Ljava.util.Date;),_bank,getNameTagWorkflowTask(I),taskAreSaveInWorkflow(I),dOWNLOAD,pOSTPROCESS,getWorkflowTasks(),Session(Lorg.inria.biomaj.session.bank.Bank;),logfile,setWorkflowTask(I),setId(Ljava.lang.Long;),createWorkflowTask(ILorg.inria.biomaj.session.bank.Session;),setErr(Ljava.util.Vector;),warn,fill(Lorg.w3c.dom.Node;),setEnd(Ljava.util.Date;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="117,247"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="382,551">
+ <children xsi:type="editmodel:MethodEditModel" name="Session" id="org.inria.biomaj.session.bank/Session#Session(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="compareTo" id="org.inria.biomaj.session.bank/Session#compareTo(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createWorkflowTask" id="org.inria.biomaj.session.bank/Session#createWorkflowTask(ILorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill_internal" id="org.inria.biomaj.session.bank/Session#fill_internal(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillWithDirectoryVersion" id="org.inria.biomaj.session.bank/Session#fillWithDirectoryVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBank" id="org.inria.biomaj.session.bank/Session#getBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.bank/Session#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getErr" id="org.inria.biomaj.session.bank/Session#getErr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.inria.biomaj.session.bank/Session#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastTask" id="org.inria.biomaj.session.bank/Session#getLastTask()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogfile" id="org.inria.biomaj.session.bank/Session#getLogfile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMessageErrorOnSession" id="org.inria.biomaj.session.bank/Session#getMessageErrorOnSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNameTagWorkflowTask" id="org.inria.biomaj.session.bank/Session#getNameTagWorkflowTask(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.bank/Session#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.session.bank/Session#getStatus()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWarn" id="org.inria.biomaj.session.bank/Session#getWarn()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowTask" id="org.inria.biomaj.session.bank/Session#getWorkflowTask(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowTask" id="org.inria.biomaj.session.bank/Session#getWorkflowTask(Lorg.w3c.dom.Node;I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.bank/Session#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErr" id="org.inria.biomaj.session.bank/Session#setErr(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.inria.biomaj.session.bank/Session#setId(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogfile" id="org.inria.biomaj.session.bank/Session#setLogfile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.bank/Session#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWarn" id="org.inria.biomaj.session.bank/Session#setWarn(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowTask" id="org.inria.biomaj.session.bank/Session#setWorkflowTask(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="taskAreSaveInWorkflow" id="org.inria.biomaj.session.bank/Session#taskAreSaveInWorkflow(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="workflowTaskExist" id="org.inria.biomaj.session.bank/Session#workflowTaskExist(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowTasks" id="org.inria.biomaj.session.bank/Session#getWorkflowTasks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowTasks" id="org.inria.biomaj.session.bank/Session#setWorkflowTasks(Ljava.util.HashMap;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Configuration" location="873,1518" size="366,1205" id="org.inria.biomaj.session.bank/Configuration" runTimeClassModel="versionDirectory,getId(),getFrequencyUpdate(),nbVersionManagement,setRemoteExcludedFiles(Ljava.lang.String;),setOfflineDirectory(Ljava.lang.String;),setNbVersionManagement(Ljava.lang.String;),getRemoteDirectory(),getReleaseFile(),setReleaseRegExp(Ljava.lang.String;),typeBank,setNoExtract(Ljava.lang.String;),getNoExtract(),date,getDate(),port,remoteExcludedFiles,id,getLogFiles(),setPassword(Ljava.lang.String;),process,doLinkCopy,blocks,getRemoteFilesRegexp(),setPort(Ljava.lang.String;),getMetaProcess(),getFullName(),getLocalFilesRegexp(),setBlocks(Ljava.util.Vector;),setReleaseFile(Ljava.lang.String;),metaProcess,remoteDirectory,logFiles,setFullName(Ljava.lang.String;),getVersionDirectory(),getNbVersionManagement(),setLocalFilesRegexp(Ljava.lang.String;),propertyFile,setTypeBank(Ljava.lang.String;),noExtract,setPropertyFile(Ljava.lang.String;),offlineDirectory,fullName,getProtocol(),fill(Lorg.w3c.dom.Node;),localFilesRegexp,getPort(),getRemoteExcludedFiles(),getDoLinkCopy(),remoteFilesRegexp,protocol,getName(),releaseFile,setUsername(Ljava.lang.String;),frequencyUpdate,getPropertyFile(),setDate(Ljava.lang.String;),getProcess(),fileNumThread,setDoLinkCopy(Ljava.lang.String;),setFileNumThread(Ljava.lang.String;),setRemoteDirectory(Ljava.lang.String;),getFileNumThread(),getFormats(),setLogFiles(Ljava.lang.String;),username,url,setName(Ljava.lang.String;),name,getReleaseRegExp(),password,getUrl(),setProtocol(Ljava.lang.String;),formats,getTypeBank(),getOfflineDirectory(),getPassword(),setId(Ljava.lang.Long;),getUsername(),getBlocks(),setMetaProcess(Ljava.util.HashMap;),setFormats(Ljava.util.Vector;),setProcess(Ljava.util.HashMap;),setFrequencyUpdate(Ljava.lang.String;),setRemoteFilesRegexp(Ljava.lang.String;),setVersionDirectory(Ljava.lang.String;),releaseRegExp,setUrl(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="164,475"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="313,1121">
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/Configuration#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBlocks" id="org.inria.biomaj.session.bank/Configuration#getBlocks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDate" id="org.inria.biomaj.session.bank/Configuration#getDate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getDoLinkCopy" id="org.inria.biomaj.session.bank/Configuration#getDoLinkCopy()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFileNumThread" id="org.inria.biomaj.session.bank/Configuration#getFileNumThread()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFormats" id="org.inria.biomaj.session.bank/Configuration#getFormats()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFrequencyUpdate" id="org.inria.biomaj.session.bank/Configuration#getFrequencyUpdate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFullName" id="org.inria.biomaj.session.bank/Configuration#getFullName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.inria.biomaj.session.bank/Configuration#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocalFilesRegexp" id="org.inria.biomaj.session.bank/Configuration#getLocalFilesRegexp()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogFiles" id="org.inria.biomaj.session.bank/Configuration#getLogFiles()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcess" id="org.inria.biomaj.session.bank/Configuration#getMetaProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getName" id="org.inria.biomaj.session.bank/Configuration#getName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbVersionManagement" id="org.inria.biomaj.session.bank/Configuration#getNbVersionManagement()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNoExtract" id="org.inria.biomaj.session.bank/Configuration#getNoExtract()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getOfflineDirectory" id="org.inria.biomaj.session.bank/Configuration#getOfflineDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPassword" id="org.inria.biomaj.session.bank/Configuration#getPassword()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPort" id="org.inria.biomaj.session.bank/Configuration#getPort()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcess" id="org.inria.biomaj.session.bank/Configuration#getProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPropertyFile" id="org.inria.biomaj.session.bank/Configuration#getPropertyFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProtocol" id="org.inria.biomaj.session.bank/Configuration#getProtocol()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getReleaseFile" id="org.inria.biomaj.session.bank/Configuration#getReleaseFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getReleaseRegExp" id="org.inria.biomaj.session.bank/Configuration#getReleaseRegExp()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteDirectory" id="org.inria.biomaj.session.bank/Configuration#getRemoteDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteExcludedFiles" id="org.inria.biomaj.session.bank/Configuration#getRemoteExcludedFiles()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRemoteFilesRegexp" id="org.inria.biomaj.session.bank/Configuration#getRemoteFilesRegexp()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTypeBank" id="org.inria.biomaj.session.bank/Configuration#getTypeBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUrl" id="org.inria.biomaj.session.bank/Configuration#getUrl()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUsername" id="org.inria.biomaj.session.bank/Configuration#getUsername()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getVersionDirectory" id="org.inria.biomaj.session.bank/Configuration#getVersionDirectory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBlocks" id="org.inria.biomaj.session.bank/Configuration#setBlocks(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDate" id="org.inria.biomaj.session.bank/Configuration#setDate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setDoLinkCopy" id="org.inria.biomaj.session.bank/Configuration#setDoLinkCopy(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFileNumThread" id="org.inria.biomaj.session.bank/Configuration#setFileNumThread(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFormats" id="org.inria.biomaj.session.bank/Configuration#setFormats(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFrequencyUpdate" id="org.inria.biomaj.session.bank/Configuration#setFrequencyUpdate(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFullName" id="org.inria.biomaj.session.bank/Configuration#setFullName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.inria.biomaj.session.bank/Configuration#setId(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLocalFilesRegexp" id="org.inria.biomaj.session.bank/Configuration#setLocalFilesRegexp(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogFiles" id="org.inria.biomaj.session.bank/Configuration#setLogFiles(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setMetaProcess" id="org.inria.biomaj.session.bank/Configuration#setMetaProcess(Ljava.util.HashMap;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setName" id="org.inria.biomaj.session.bank/Configuration#setName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbVersionManagement" id="org.inria.biomaj.session.bank/Configuration#setNbVersionManagement(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNoExtract" id="org.inria.biomaj.session.bank/Configuration#setNoExtract(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setOfflineDirectory" id="org.inria.biomaj.session.bank/Configuration#setOfflineDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPassword" id="org.inria.biomaj.session.bank/Configuration#setPassword(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPort" id="org.inria.biomaj.session.bank/Configuration#setPort(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProcess" id="org.inria.biomaj.session.bank/Configuration#setProcess(Ljava.util.HashMap;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPropertyFile" id="org.inria.biomaj.session.bank/Configuration#setPropertyFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setProtocol" id="org.inria.biomaj.session.bank/Configuration#setProtocol(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setReleaseFile" id="org.inria.biomaj.session.bank/Configuration#setReleaseFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setReleaseRegExp" id="org.inria.biomaj.session.bank/Configuration#setReleaseRegExp(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoteDirectory" id="org.inria.biomaj.session.bank/Configuration#setRemoteDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoteExcludedFiles" id="org.inria.biomaj.session.bank/Configuration#setRemoteExcludedFiles(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRemoteFilesRegexp" id="org.inria.biomaj.session.bank/Configuration#setRemoteFilesRegexp(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTypeBank" id="org.inria.biomaj.session.bank/Configuration#setTypeBank(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUrl" id="org.inria.biomaj.session.bank/Configuration#setUrl(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUsername" id="org.inria.biomaj.session.bank/Configuration#setUsername(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setVersionDirectory" id="org.inria.biomaj.session.bank/Configuration#setVersionDirectory(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@" source="//@children.3" target="//@children.6" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="config" location="366,602" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Configuration#config" attachSource="true" multiplicityLabel="//@children.3/@sourceConnections.0/@children.1/@children.1" roleLabel="//@children.3/@sourceConnections.0/@children.1/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - config" location="1245,2096" size="38,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="1245,2127" size="6,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,603" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Bank#"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="FileDesc" location="2439,1169" size="644,464" id="org.inria.biomaj.session.bank/FileDesc" runTimeClassModel="extract,FileDesc(Ljava.lang.String;ZLjava.lang.String;),getName(),refHash,time,FileDesc(Ljava.lang.String;JJZZ),getLocation(),FileDesc(Ljava.lang.String;Z),getSize(),isIntegre(),getHash(),FileDesc(Ljava.io.File;Z),volatil,setLink(Z),size,location,isLink(),setVolatil(Z),toString(),getRefHash(),set(Ljava.io.File;Z),link,hash,setExtract(Z),isVolatil(),FileDesc(Ljava.lang.String;JJZZZLjava.lang.String;),isExtract(),getTime()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="95,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="621,380">
+ <children xsi:type="editmodel:MethodEditModel" name="FileDesc" id="org.inria.biomaj.session.bank/FileDesc#FileDesc(Ljava.lang.String;ZLjava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="FileDesc" id="org.inria.biomaj.session.bank/FileDesc#FileDesc(Ljava.lang.String;JJZZ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="FileDesc" id="org.inria.biomaj.session.bank/FileDesc#FileDesc(Ljava.io.File;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="FileDesc" id="org.inria.biomaj.session.bank/FileDesc#FileDesc(Ljava.lang.String;JJZZZLjava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="FileDesc" id="org.inria.biomaj.session.bank/FileDesc#FileDesc(Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getHash" id="org.inria.biomaj.session.bank/FileDesc#getHash()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocation" id="org.inria.biomaj.session.bank/FileDesc#getLocation()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getName" id="org.inria.biomaj.session.bank/FileDesc#getName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRefHash" id="org.inria.biomaj.session.bank/FileDesc#getRefHash()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSize" id="org.inria.biomaj.session.bank/FileDesc#getSize()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTime" id="org.inria.biomaj.session.bank/FileDesc#getTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isExtract" id="org.inria.biomaj.session.bank/FileDesc#isExtract()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isIntegre" id="org.inria.biomaj.session.bank/FileDesc#isIntegre()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isLink" id="org.inria.biomaj.session.bank/FileDesc#isLink()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isVolatil" id="org.inria.biomaj.session.bank/FileDesc#isVolatil()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="set" id="org.inria.biomaj.session.bank/FileDesc#set(Ljava.io.File;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setExtract" id="org.inria.biomaj.session.bank/FileDesc#setExtract(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLink" id="org.inria.biomaj.session.bank/FileDesc#setLink(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setVolatil" id="org.inria.biomaj.session.bank/FileDesc#setVolatil(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="toString" id="org.inria.biomaj.session.bank/FileDesc#toString()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="SubProcessDesc" location="797,3113" size="366,293" id="org.inria.biomaj.session.bank/SubProcessDesc" runTimeClassModel="exe,type,args,isOk,keyname,name,desc,killOnError">
+ <children xsi:type="editmodel:CompartmentEditModel" size="103,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="Bank" location="1384,1517" size="509,1319" id="org.inria.biomaj.session.bank/Bank" runTimeClassModel="getId(),bankStateListProductionDirectories,start,addLocalOnlineFile(Ljava.lang.String;),getGeneratedFiles(Lorg.apache.tools.ant.Project;Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;),addErrProcess(Ljava.lang.String;Ljava.lang.String;),getWorkflowInfoSizeRelease(),getWorkflowInfoSizeDownload(),id,fillWithDirectoryVersion(Ljava.lang.String;),setWorkflowInfoSizeDownload(J),Bank(),getStatus(),getWorkflowInfoProductionDir(),getWorkflowInfoRelease(),getBandWidth(),getStart(),getWorkflowInfoIsDeployed(),addFilesInProduction(Ljava.lang.String;Ljava.lang.String;Z),setWorkflowInfoProductionDir(Ljava.lang.String;),workflowInfoRelease,getNbFilesLocalOnline(),errorOnWorkflow,findDependancesFilesFromExtraction(Ljava.lang.String;),getConfig(),workflowInfoProductionDir,config,getAllMetaProcessFromPhasePostprocess(Ljava.lang.String;),setLogFile(Ljava.lang.String;),setUpdate(Z),setListOldSession(Ljava.util.Vector;),addWarnProcess(Ljava.lang.String;Ljava.lang.String;),getErrorOnWorkflow(),workflowInfoSizeDownload,needANewCycleUpdate(Lorg.apache.tools.ant.BuildEvent;),getAllMetaProcessFromPhasePreprocess(),setEnd(Ljava.util.Date;),setEndProcess(Ljava.lang.String;),getCurrentSession(),update,end,getListOldSession(),listOldSession,addFilesInExtraction(Ljava.lang.String;Ljava.lang.String;),workflowTaskEverPast(I),addLocalOfflineFile(Ljava.lang.String;),findFile(Ljava.lang.String;JJI),setCurrentSession(Lorg.inria.biomaj.session.bank.Session;),setBankStateListProductionDirectories(Ljava.util.Vector;),getAllMetaprocess(),getAvailableMetaProcess(I),getAvailableProcess(I),currentSession,setWorkflowInfoRelease(Ljava.lang.String;),isUpdate(),getNbFilesDownloaded(),setRelease(Ljava.lang.String;),addDownloadFile(Ljava.lang.String;JJ),workflowInfoIsDeployed,setOnlineDirectory(Ljava.lang.String;),getNbFilesLocalOffline(),setBankSize(Ljava.lang.Long;),getEnd(),workflowInfoSizeRelease,setStart(Ljava.util.Date;),getLastMetaProcessExecuted(Ljava.lang.String;Ljava.lang.String;),setConfig(Lorg.inria.biomaj.session.bank.Configuration;),setStartProcess(Ljava.lang.String;),addProductionDirectory(Ljava.lang.String;),setErrorOnWorkflow(Ljava.lang.Boolean;),getProcessRuntime(Ljava.lang.String;),setBankToRebuild(Lorg.inria.biomaj.session.bank.Bank;),setWorkflowInfoIsDeployed(Ljava.lang.Boolean;),fill(Lorg.w3c.dom.Node;Z),setWorkflowInfoSizeRelease(J),removeProductionDirectory(Ljava.lang.String;),getLogFile(),setId(Ljava.lang.Long;),getBankStateListProductionDirectories(),getIdProcess(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="486,1235">
+ <children xsi:type="editmodel:MethodEditModel" name="Bank" id="org.inria.biomaj.session.bank/Bank#Bank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addDownloadFile" id="org.inria.biomaj.session.bank/Bank#addDownloadFile(Ljava.lang.String;JJ)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addErrProcess" id="org.inria.biomaj.session.bank/Bank#addErrProcess(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFilesInExtraction" id="org.inria.biomaj.session.bank/Bank#addFilesInExtraction(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFilesInProduction" id="org.inria.biomaj.session.bank/Bank#addFilesInProduction(Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addLocalOfflineFile" id="org.inria.biomaj.session.bank/Bank#addLocalOfflineFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addLocalOnlineFile" id="org.inria.biomaj.session.bank/Bank#addLocalOnlineFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addProductionDirectory" id="org.inria.biomaj.session.bank/Bank#addProductionDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addWarnProcess" id="org.inria.biomaj.session.bank/Bank#addWarnProcess(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/Bank#fill(Lorg.w3c.dom.Node;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillWithDirectoryVersion" id="org.inria.biomaj.session.bank/Bank#fillWithDirectoryVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcessFromPhasePostprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaProcessFromPhasePostprocess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaProcessFromPhasePreprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaProcessFromPhasePreprocess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableMetaProcess" id="org.inria.biomaj.session.bank/Bank#getAvailableMetaProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAvailableProcess" id="org.inria.biomaj.session.bank/Bank#getAvailableProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBandWidth" id="org.inria.biomaj.session.bank/Bank#getBandWidth()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBankStateListProductionDirectories" id="org.inria.biomaj.session.bank/Bank#getBankStateListProductionDirectories()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getConfig" id="org.inria.biomaj.session.bank/Bank#getConfig()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCurrentSession" id="org.inria.biomaj.session.bank/Bank#getCurrentSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.bank/Bank#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getErrorOnWorkflow" id="org.inria.biomaj.session.bank/Bank#getErrorOnWorkflow()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.inria.biomaj.session.bank/Bank#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getIdProcess" id="org.inria.biomaj.session.bank/Bank#getIdProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListOldSession" id="org.inria.biomaj.session.bank/Bank#getListOldSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesDownloaded" id="org.inria.biomaj.session.bank/Bank#getNbFilesDownloaded()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessRuntime" id="org.inria.biomaj.session.bank/Bank#getProcessRuntime(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.bank/Bank#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.session.bank/Bank#getStatus()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoIsDeployed" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoIsDeployed()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoProductionDir" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoProductionDir()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoRelease" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoSizeDownload" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoSizeDownload()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWorkflowInfoSizeRelease" id="org.inria.biomaj.session.bank/Bank#getWorkflowInfoSizeRelease()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isUpdate" id="org.inria.biomaj.session.bank/Bank#isUpdate()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="needANewCycleUpdate" id="org.inria.biomaj.session.bank/Bank#needANewCycleUpdate(Lorg.apache.tools.ant.BuildEvent;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeProductionDirectory" id="org.inria.biomaj.session.bank/Bank#removeProductionDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankSize" id="org.inria.biomaj.session.bank/Bank#setBankSize(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankStateListProductionDirectories" id="org.inria.biomaj.session.bank/Bank#setBankStateListProductionDirectories(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setConfig" id="org.inria.biomaj.session.bank/Bank#setConfig(Lorg.inria.biomaj.session.bank.Configuration;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.bank/Bank#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEndProcess" id="org.inria.biomaj.session.bank/Bank#setEndProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErrorOnWorkflow" id="org.inria.biomaj.session.bank/Bank#setErrorOnWorkflow(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.inria.biomaj.session.bank/Bank#setId(Ljava.lang.Long;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setListOldSession" id="org.inria.biomaj.session.bank/Bank#setListOldSession(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogFile" id="org.inria.biomaj.session.bank/Bank#getLogFile()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setOnlineDirectory" id="org.inria.biomaj.session.bank/Bank#setOnlineDirectory(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRelease" id="org.inria.biomaj.session.bank/Bank#setRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.bank/Bank#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStartProcess" id="org.inria.biomaj.session.bank/Bank#setStartProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUpdate" id="org.inria.biomaj.session.bank/Bank#setUpdate(Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoIsDeployed" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoIsDeployed(Ljava.lang.Boolean;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoProductionDir" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoProductionDir(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoRelease" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoRelease(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoSizeDownload" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoSizeDownload(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWorkflowInfoSizeRelease" id="org.inria.biomaj.session.bank/Bank#setWorkflowInfoSizeRelease(J)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="workflowTaskEverPast" id="org.inria.biomaj.session.bank/Bank#workflowTaskEverPast(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setCurrentSession" id="org.inria.biomaj.session.bank/Bank#setCurrentSession(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOnline" id="org.inria.biomaj.session.bank/Bank#getNbFilesLocalOnline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLastMetaProcessExecuted" id="org.inria.biomaj.session.bank/Bank#getLastMetaProcessExecuted(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAllMetaprocess" id="org.inria.biomaj.session.bank/Bank#getAllMetaprocess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBankToRebuild" id="org.inria.biomaj.session.bank/Bank#setBankToRebuild(Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="findDependancesFilesFromExtraction" id="org.inria.biomaj.session.bank/Bank#findDependancesFilesFromExtraction(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="findFile" id="org.inria.biomaj.session.bank/Bank#findFile(Ljava.lang.String;JJI)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getGeneratedFiles" id="org.inria.biomaj.session.bank/Bank#getGeneratedFiles(Lorg.apache.tools.ant.Project;Lorg.inria.biomaj.internal.ant.task.net.RemoteFile;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOffline" id="org.inria.biomaj.session.bank/Bank#getNbFilesLocalOffline()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="CheckTask" location="1066,754" size="366,331" id="org.inria.biomaj.session.bank/CheckTask" runTimeClassModel="setNbFilesDownload(I),nbFilesDownload,getProcessName(),nbFilesExtract,nbFilesLocalOnline,getNbFilesLocalOnline(),getNbFilesExtract(),getNbFilesDownload(),files,nbFilesLocalOffline,setNbFilesExtract(I),setNbFilesLocalOnline(I),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),getNbFilesLocalOffline(),setNbFilesLocalOffline(I),fill(Lorg.w3c.dom.Node;),CheckTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="125,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="252,247">
+ <children xsi:type="editmodel:MethodEditModel" name="CheckTask" id="org.inria.biomaj.session.bank/CheckTask#CheckTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/CheckTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/CheckTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/CheckTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesDownload" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesDownload()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesExtract" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesExtract()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOffline" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesLocalOffline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOnline" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesLocalOnline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/CheckTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesDownload" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesDownload(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesExtract" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesExtract(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesLocalOffline" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesLocalOffline(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesLocalOnline" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesLocalOnline(I)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/CheckTask" source="//@children.7" target="//@children.10/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="179,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DownloadTask" location="817,754" size="366,293" id="org.inria.biomaj.session.bank/DownloadTask" runTimeClassModel="files,bandWidth,getSizeDownloaded(),DownloadTask(Lorg.inria.biomaj.session.bank.Session;),setBandWidth(D),getProcessName(),getBandWidth(),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;),getFiles()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="108,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="196,171">
+ <children xsi:type="editmodel:MethodEditModel" name="DownloadTask" id="org.inria.biomaj.session.bank/DownloadTask#DownloadTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/DownloadTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/DownloadTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/DownloadTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBandWidth" id="org.inria.biomaj.session.bank/DownloadTask#getBandWidth()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFiles" id="org.inria.biomaj.session.bank/DownloadTask#getFiles()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/DownloadTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSizeDownloaded" id="org.inria.biomaj.session.bank/DownloadTask#getSizeDownloaded()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBandWidth" id="org.inria.biomaj.session.bank/DownloadTask#setBandWidth(D)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/DownloadTask" source="//@children.8" target="//@children.10/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="178,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="AddLocalFilesTask" location="1371,754" size="366,293" id="org.inria.biomaj.session.bank/AddLocalFilesTask" runTimeClassModel="files,AddLocalFilesTask(Lorg.inria.biomaj.session.bank.Session;),getProcessName(),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,95">
+ <children xsi:type="editmodel:MethodEditModel" name="AddLocalFilesTask" id="org.inria.biomaj.session.bank/AddLocalFilesTask#AddLocalFilesTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/AddLocalFilesTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/AddLocalFilesTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/AddLocalFilesTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/AddLocalFilesTask#getProcessName()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/AddLocalFilesTask" source="//@children.9" target="//@children.10/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="180,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="MakeReleaseTask" location="50,754" size="366,293" id="org.inria.biomaj.session.bank/MakeReleaseTask" runTimeClassModel="getFilesMove(),getProcessName(),addFile(Ljava.lang.String;Ljava.lang.String;Z),setFilesMove(Ljava.util.Vector;),fillJDomElement(Lorg.jdom.Element;),MakeReleaseTask(Lorg.inria.biomaj.session.bank.Session;),filesCopy,getFilesCopy(),fill(Lorg.w3c.dom.Node;),addFileInJDomElement(Lorg.jdom.Element;Ljava.lang.String;Ljava.util.Vector;),filesMove,setFilesCopy(Ljava.util.Vector;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="318,190">
+ <children xsi:type="editmodel:MethodEditModel" name="MakeReleaseTask" id="org.inria.biomaj.session.bank/MakeReleaseTask#MakeReleaseTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/MakeReleaseTask#addFile(Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFileInJDomElement" id="org.inria.biomaj.session.bank/MakeReleaseTask#addFileInJDomElement(Lorg.jdom.Element;Ljava.lang.String;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/MakeReleaseTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/MakeReleaseTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFilesCopy" id="org.inria.biomaj.session.bank/MakeReleaseTask#getFilesCopy()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFilesMove" id="org.inria.biomaj.session.bank/MakeReleaseTask#getFilesMove()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/MakeReleaseTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFilesCopy" id="org.inria.biomaj.session.bank/MakeReleaseTask#setFilesCopy(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFilesMove" id="org.inria.biomaj.session.bank/MakeReleaseTask#setFilesMove(Ljava.util.Vector;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.8/@sourceConnections.0 //@children.16/@sourceConnections.0 //@children.7/@sourceConnections.0 //@children.9/@sourceConnections.0 //@children.12/@sourceConnections.0 //@children.11/@sourceConnections.0 //@children.15/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/MakeReleaseTask" source="//@children.10" target="//@children.13" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="180,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="177,503" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ReleaseTask" location="1930,754" size="366,293" id="org.inria.biomaj.session.bank/ReleaseTask" runTimeClassModel="setValue(Ljava.lang.String;),value,getValue(),getProcessName(),ReleaseTask(Lorg.inria.biomaj.session.bank.Session;),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="78,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="173,114">
+ <children xsi:type="editmodel:MethodEditModel" name="ReleaseTask" id="org.inria.biomaj.session.bank/ReleaseTask#ReleaseTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/ReleaseTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/ReleaseTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/ReleaseTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getValue" id="org.inria.biomaj.session.bank/ReleaseTask#getValue()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setValue" id="org.inria.biomaj.session.bank/ReleaseTask#setValue(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/ReleaseTask" source="//@children.11" target="//@children.10/@sourceConnections.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="179,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ExtractTask" location="2690,753" size="366,293" id="org.inria.biomaj.session.bank/ExtractTask" runTimeClassModel="ExtractTask(Lorg.inria.biomaj.session.bank.Session;),files,getProcessName(),addFile(Ljava.lang.String;Ljava.lang.String;),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;),getFiles()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="275,114">
+ <children xsi:type="editmodel:MethodEditModel" name="ExtractTask" id="org.inria.biomaj.session.bank/ExtractTask#ExtractTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/ExtractTask#addFile(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/ExtractTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/ExtractTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/ExtractTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFiles" id="org.inria.biomaj.session.bank/ExtractTask#getFiles()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/ExtractTask" source="//@children.12" target="//@children.10/@sourceConnections.0" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="179,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.10/@sourceConnections.0" name="GeneralWorkflowTask" location="1186,50" size="366,521" id="org.inria.biomaj.session.bank/GeneralWorkflowTask" runTimeClassModel="compareTo(Ljava.lang.String;),GeneralWorkflowTask(Lorg.inria.biomaj.session.bank.Session;),addFileInVector(Ljava.util.Vector;Ljava.util.Vector;),getProcessName(),start,getWarn(),setStatusStr(Ljava.lang.String;),setWarn(Ljava.util.Vector;),end,err,isInitialized(Ljava.lang.String;),addFileInJDomElement(Lorg.jdom.Element;Ljava.util.Vector;),processName,setStatus(I),_session,getStatus(),sTATUS_KO,getStart(),getEnd(),getErr(),getElapsedTime(),getSession(),setStart(Ljava.util.Date;),setLocalFile(Lorg.jdom.Element;Lorg.inria.biomaj.session.bank.FileDesc;),status,elapsedTime,getStatusStr(),sTATUS_OK,fillJDomElement(Lorg.jdom.Element;),setErr(Ljava.util.Vector;),warn,fill(Lorg.w3c.dom.Node;),setEnd(Ljava.util.Date;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="110,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="218,437">
+ <children xsi:type="editmodel:MethodEditModel" name="GeneralWorkflowTask" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#GeneralWorkflowTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFileInJDomElement" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#addFileInJDomElement(Lorg.jdom.Element;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFileInVector" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#addFileInVector(Ljava.util.Vector;Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="compareTo" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#compareTo(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getElapsedTime" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getElapsedTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getErr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getErr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSession" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStatus()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatusStr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStatusStr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWarn" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getWarn()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="isInitialized" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#isInitialized(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setErr(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLocalFile" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setLocalFile(Lorg.jdom.Element;Lorg.inria.biomaj.session.bank.FileDesc;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStatus" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStatus(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStatusStr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStatusStr(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWarn" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setWarn(Ljava.util.Vector;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PostProcessTask" location="429,1219" size="366,293" id="org.inria.biomaj.session.bank/PostProcessTask" runTimeClassModel="getProcessName(),PostProcessTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="171,38">
+ <children xsi:type="editmodel:MethodEditModel" name="PostProcessTask" id="org.inria.biomaj.session.bank/PostProcessTask#PostProcessTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/PostProcessTask#getProcessName()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/PreProcessTask<-org.inria.biomaj.session.bank/PostProcessTask" source="//@children.14" target="//@children.16" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="178,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="186,293"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DeploymentTask" location="2156,754" size="366,293" id="org.inria.biomaj.session.bank/DeploymentTask" runTimeClassModel="getProcessName(),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;),DeploymentTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="173,76">
+ <children xsi:type="editmodel:MethodEditModel" name="DeploymentTask" id="org.inria.biomaj.session.bank/DeploymentTask#DeploymentTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/DeploymentTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/DeploymentTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/DeploymentTask#getProcessName()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/DeploymentTask" source="//@children.15" target="//@children.10/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="179,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.14/@sourceConnections.0" name="PreProcessTask" location="421,754" size="366,293" id="org.inria.biomaj.session.bank/PreProcessTask" runTimeClassModel="getProcessName(),metaProcessblock,PreProcessTask(Lorg.inria.biomaj.session.bank.Session;),fillJDomElement(Lorg.jdom.Element;),metaProcessName,getMetaProcessWithNameFile(),addMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),metaProcessWithNameFile,fill(Lorg.w3c.dom.Node;),getMetaProcess(Ljava.lang.String;),getNameProcess(I),getNbMetaProcess()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="343,171">
+ <children xsi:type="editmodel:MethodEditModel" name="PreProcessTask" id="org.inria.biomaj.session.bank/PreProcessTask#PreProcessTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#addMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/PreProcessTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/PreProcessTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getMetaProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNameProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getNameProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getNbMetaProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/PreProcessTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcessWithNameFile" id="org.inria.biomaj.session.bank/PreProcessTask#getMetaProcessWithNameFile()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/PreProcessTask" source="//@children.16" target="//@children.10/@sourceConnections.0" targetEnd="//@children.16/@sourceConnections.0/@children.1" sourceEnd="//@children.16/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="180,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1572,44" size="393,82" fontInfo="Arial-8-0" note="GeneralWorkflowTask est une tache generique du workflow BioMAJ. 
Cette tache herite de la classe Task de Ant."/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.session.bank" metadata="uml2-1.0" initialized="true" scrolledX="785" scrolledY="140" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="AddLocalFilesTask" location="1336,584" size="201,147" id="org.inria.biomaj.session.bank/AddLocalFilesTask" runTimeClassModel="files,AddLocalFilesTask(Lorg.inria.biomaj.session.bank.Session;),getProcessName(),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,95">
+ <children xsi:type="editmodel:MethodEditModel" name="AddLocalFilesTask" id="org.inria.biomaj.session.bank/AddLocalFilesTask#AddLocalFilesTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/AddLocalFilesTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/AddLocalFilesTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/AddLocalFilesTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/AddLocalFilesTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/AddLocalFilesTask" source="//@children.0" target="//@children.5/@sourceConnections.0" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="100,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="CheckTask" location="1031,584" size="275,303" id="org.inria.biomaj.session.bank/CheckTask" runTimeClassModel="setNbFilesDownload(I),nbFilesDownload,getProcessName(),nbFilesExtract,nbFilesLocalOnline,getNbFilesLocalOnline(),getNbFilesExtract(),getNbFilesDownload(),files,nbFilesLocalOffline,setNbFilesExtract(I),setNbFilesLocalOnline(I),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),getNbFilesLocalOffline(),setNbFilesLocalOffline(I),fill(Lorg.w3c.dom.Node;),CheckTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="125,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="252,247">
+ <children xsi:type="editmodel:MethodEditModel" name="CheckTask" id="org.inria.biomaj.session.bank/CheckTask#CheckTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/CheckTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesDownload" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesDownload()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesDownload" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesDownload(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesExtract" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesExtract()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesExtract" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesExtract(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOffline" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesLocalOffline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesLocalOffline" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesLocalOffline(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbFilesLocalOnline" id="org.inria.biomaj.session.bank/CheckTask#getNbFilesLocalOnline()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setNbFilesLocalOnline" id="org.inria.biomaj.session.bank/CheckTask#setNbFilesLocalOnline(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/CheckTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/CheckTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/CheckTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/CheckTask" source="//@children.1" target="//@children.5/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="137,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.6/@sourceConnections.0" name="PreProcessTask" location="386,575" size="366,231" id="org.inria.biomaj.session.bank/PreProcessTask" runTimeClassModel="getProcessName(),metaProcessblock,PreProcessTask(Lorg.inria.biomaj.session.bank.Session;),fillJDomElement(Lorg.jdom.Element;),metaProcessName,getMetaProcessWithNameFile(),addMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;),metaProcessWithNameFile,getMetaProcess(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;),getNbMetaProcess(),getNameProcess(I)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="343,171">
+ <children xsi:type="editmodel:MethodEditModel" name="PreProcessTask" id="org.inria.biomaj.session.bank/PreProcessTask#PreProcessTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#addMetaProcess(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/PreProcessTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/PreProcessTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/PreProcessTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNameProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getNameProcess(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNbMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getNbMetaProcess()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcess" id="org.inria.biomaj.session.bank/PreProcessTask#getMetaProcess(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getMetaProcessWithNameFile" id="org.inria.biomaj.session.bank/PreProcessTask#getMetaProcessWithNameFile()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/PreProcessTask" source="//@children.2" target="//@children.5/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="183,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DeploymentTask" location="2121,575" size="196,141" id="org.inria.biomaj.session.bank/DeploymentTask" runTimeClassModel="getProcessName(),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;),DeploymentTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="173,76">
+ <children xsi:type="editmodel:MethodEditModel" name="DeploymentTask" id="org.inria.biomaj.session.bank/DeploymentTask#DeploymentTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/DeploymentTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/DeploymentTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/DeploymentTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/DeploymentTask" source="//@children.3" target="//@children.5/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="98,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DownloadTask" location="787,580" size="219,293" id="org.inria.biomaj.session.bank/DownloadTask" runTimeClassModel="files,bandWidth,DownloadTask(Lorg.inria.biomaj.session.bank.Session;),getSizeDownloaded(),setBandWidth(D),getProcessName(),getBandWidth(),fillJDomElement(Lorg.jdom.Element;),addFile(Ljava.lang.String;),fill(Lorg.w3c.dom.Node;),getFiles()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="108,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="196,171">
+ <children xsi:type="editmodel:MethodEditModel" name="DownloadTask" id="org.inria.biomaj.session.bank/DownloadTask#DownloadTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/DownloadTask#addFile(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/DownloadTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/DownloadTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/DownloadTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBandWidth" id="org.inria.biomaj.session.bank/DownloadTask#getBandWidth()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setBandWidth" id="org.inria.biomaj.session.bank/DownloadTask#setBandWidth(D)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFiles" id="org.inria.biomaj.session.bank/DownloadTask#getFiles()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSizeDownloaded" id="org.inria.biomaj.session.bank/DownloadTask#getSizeDownloaded()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/DownloadTask" source="//@children.4" target="//@children.5/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="109,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="MakeReleaseTask" location="10,570" size="341,231" id="org.inria.biomaj.session.bank/MakeReleaseTask" runTimeClassModel="getFilesMove(),getProcessName(),addFile(Ljava.lang.String;Ljava.lang.String;Z),setFilesMove(Ljava.util.Vector;),fillJDomElement(Lorg.jdom.Element;),MakeReleaseTask(Lorg.inria.biomaj.session.bank.Session;),filesCopy,getFilesCopy(),fill(Lorg.w3c.dom.Node;),addFileInJDomElement(Lorg.jdom.Element;Ljava.lang.String;Ljava.util.Vector;),filesMove,setFilesCopy(Ljava.util.Vector;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="318,190">
+ <children xsi:type="editmodel:MethodEditModel" name="MakeReleaseTask" id="org.inria.biomaj.session.bank/MakeReleaseTask#MakeReleaseTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/MakeReleaseTask#addFile(Ljava.lang.String;Ljava.lang.String;Z)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/MakeReleaseTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/MakeReleaseTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFilesCopy" id="org.inria.biomaj.session.bank/MakeReleaseTask#setFilesCopy(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setFilesMove" id="org.inria.biomaj.session.bank/MakeReleaseTask#setFilesMove(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/MakeReleaseTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFilesCopy" id="org.inria.biomaj.session.bank/MakeReleaseTask#getFilesCopy()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFilesMove" id="org.inria.biomaj.session.bank/MakeReleaseTask#getFilesMove()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0 //@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.0/@sourceConnections.0 //@children.8/@sourceConnections.0 //@children.9/@sourceConnections.0 //@children.3/@sourceConnections.0" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/MakeReleaseTask" source="//@children.5" target="//@children.7" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="170,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="176,425" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PostProcessTask" location="505,930" size="194,122" id="org.inria.biomaj.session.bank/PostProcessTask" runTimeClassModel="getProcessName(),PostProcessTask(Lorg.inria.biomaj.session.bank.Session;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="171,38">
+ <children xsi:type="editmodel:MethodEditModel" name="PostProcessTask" id="org.inria.biomaj.session.bank/PostProcessTask#PostProcessTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/PostProcessTask#getProcessName()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/PreProcessTask<-org.inria.biomaj.session.bank/PostProcessTask" source="//@children.6" target="//@children.2" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="96,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="215,231"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0 //@children.10/@sourceConnections.0" name="GeneralWorkflowTask" location="1000,10" size="356,426" id="org.inria.biomaj.session.bank/GeneralWorkflowTask" runTimeClassModel="compareTo(Ljava.lang.String;),GeneralWorkflowTask(Lorg.inria.biomaj.session.bank.Session;),addFileInVector(Ljava.util.Vector;Ljava.util.Vector;),getWarn(),getProcessName(),start,setWarn(Ljava.util.Vector;),setStatusStr(Ljava.lang.String;),end,err,isInitialized(Ljava.lang.String;),addFileInJDomElement(Lorg.jdom.Element;Ljava.util.Vector;),processName,setStatus(I),_session,sTATUS_KO,getStatus(),getStart(),getEnd(),getElapsedTime(),getErr(),setStart(Ljava.util.Date;),getSession(),setLocalFile(Lorg.jdom.Element;Lorg.inria.biomaj.session.bank.FileDesc;),status,elapsedTime,getStatusStr(),sTATUS_OK,fillJDomElement(Lorg.jdom.Element;),setErr(Ljava.util.Vector;),warn,fill(Lorg.w3c.dom.Node;),setEnd(Ljava.util.Date;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="110,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="218,437">
+ <children xsi:type="editmodel:MethodEditModel" name="GeneralWorkflowTask" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#GeneralWorkflowTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getErr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getErr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getWarn" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getWarn()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getElapsedTime" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getElapsedTime()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEnd" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getEnd()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setEnd" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setEnd(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStart" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStart()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStart" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStart(Ljava.util.Date;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatus" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStatus()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getStatusStr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getStatusStr()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStatus" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStatus(I)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setErr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setErr(Ljava.util.Vector;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setStatusStr" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setStatusStr(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="compareTo" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#compareTo(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSession" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#getSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setWarn" id="org.inria.biomaj.session.bank/GeneralWorkflowTask#setWarn(Ljava.util.Vector;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ExtractTask" location="1562,570" size="298,166" id="org.inria.biomaj.session.bank/ExtractTask" runTimeClassModel="ExtractTask(Lorg.inria.biomaj.session.bank.Session;),files,getProcessName(),addFile(Ljava.lang.String;Ljava.lang.String;),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;),getFiles()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="275,114">
+ <children xsi:type="editmodel:MethodEditModel" name="ExtractTask" id="org.inria.biomaj.session.bank/ExtractTask#ExtractTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addFile" id="org.inria.biomaj.session.bank/ExtractTask#addFile(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/ExtractTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/ExtractTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/ExtractTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFiles" id="org.inria.biomaj.session.bank/ExtractTask#getFiles()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/ExtractTask" source="//@children.8" target="//@children.5/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="149,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ReleaseTask" location="1895,575" size="196,181" id="org.inria.biomaj.session.bank/ReleaseTask" runTimeClassModel="setValue(Ljava.lang.String;),value,getValue(),getProcessName(),ReleaseTask(Lorg.inria.biomaj.session.bank.Session;),fillJDomElement(Lorg.jdom.Element;),fill(Lorg.w3c.dom.Node;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="78,19"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="173,114">
+ <children xsi:type="editmodel:MethodEditModel" name="ReleaseTask" id="org.inria.biomaj.session.bank/ReleaseTask#ReleaseTask(Lorg.inria.biomaj.session.bank.Session;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getValue" id="org.inria.biomaj.session.bank/ReleaseTask#getValue()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setValue" id="org.inria.biomaj.session.bank/ReleaseTask#setValue(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProcessName" id="org.inria.biomaj.session.bank/ReleaseTask#getProcessName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fill" id="org.inria.biomaj.session.bank/ReleaseTask#fill(Lorg.w3c.dom.Node;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="fillJDomElement" id="org.inria.biomaj.session.bank/ReleaseTask#fillJDomElement(Lorg.jdom.Element;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/GeneralWorkflowTask<-org.inria.biomaj.session.bank/ReleaseTask" source="//@children.9" target="//@children.5/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="98,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showPublicMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="530,140" size="299,106" fontInfo="Arial-8-0" note="Classes descripteurs de taches pour le fichier
d'état au format XML">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.10" target="//@children.7" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="299,52" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,182"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank_2.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank_2.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/org.inria.biomaj.session.bank_2.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="org.inria.biomaj.session.bank_2" id="org.inria.biomaj.session.bank" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.1" name="ProductionDirectory" location="360,482" size="251,64" id="org.inria.biomaj.session.bank/ProductionDirectory">
+ <children xsi:type="editmodel:CompartmentEditModel" size="109,152"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="219,304"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.2" name="Session" location="340,157" size="141,64" id="org.inria.biomaj.session.bank/Session">
+ <children xsi:type="editmodel:CompartmentEditModel" size="117,247"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="382,570"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="Configuration" location="880,500" size="171,64" id="org.inria.biomaj.session.bank/Configuration">
+ <children xsi:type="editmodel:CompartmentEditModel" size="164,475"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="313,1121"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Bank" location="710,220" size="161,64" id="org.inria.biomaj.session.bank/Bank">
+ <children xsi:type="editmodel:CompartmentEditModel" size="178,190"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="486,1254"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@" source="//@children.3" target="//@children.2" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="151,64" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Bank#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="config" location="0,10" id="org.inria.biomaj.session.bank/Configuration at config+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Configuration#config" multiplicityLabel="//@children.3/@sourceConnections.0/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.0/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - config" location="835,517" size="38,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="867,486" size="6,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/ProductionDirectory at bankStateListProductionDirectories+org.inria.biomaj.session.bank/Bank@" source="//@children.3" target="//@children.0" targetEnd="//@children.3/@sourceConnections.1/@children.2" label="//@children.3/@sourceConnections.1/@children.0" sourceEnd="//@children.3/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,64" id="org.inria.biomaj.session.bank/ProductionDirectory at bankStateListProductionDirectories+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Bank#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="bankStateListProductionDirectories" location="251,10" id="org.inria.biomaj.session.bank/ProductionDirectory at bankStateListProductionDirectories+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/ProductionDirectory#bankStateListProductionDirectories" multiplicityLabel="//@children.3/@sourceConnections.1/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.1/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - bankStateListProductionDirectories" location="618,499" size="176,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="618,468" size="4,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/Session at currentSession+org.inria.biomaj.session.bank/Bank@" source="//@children.3" target="//@children.1" targetEnd="//@children.3/@sourceConnections.2/@children.2" label="//@children.3/@sourceConnections.2/@children.0" sourceEnd="//@children.3/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,0" id="org.inria.biomaj.session.bank/Session at currentSession+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Bank#" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="currentSession" location="141,54" id="org.inria.biomaj.session.bank/Session at currentSession+org.inria.biomaj.session.bank/Bank@|org.inria.biomaj.session.bank/Session#currentSession" multiplicityLabel="//@children.3/@sourceConnections.2/@children.2/@children.1" roleLabel="//@children.3/@sourceConnections.2/@children.2/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - currentSession" location="488,187" size="81,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="488,218" size="6,17" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.inria.biomaj.session.bank/Bank->org.inria.biomaj.session.bank/GeneralWorkflowTask" source="//@children.3" target="//@children.4" targetEnd="//@children.3/@sourceConnections.3/@children.2" label="//@children.3/@sourceConnections.3/@children.0" sourceEnd="//@children.3/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="42,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="161,11" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,51"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.3" name="GeneralWorkflowTask" location="1190,180" size="228,64" id="org.inria.biomaj.session.bank/GeneralWorkflowTask">
+ <children xsi:type="editmodel:CompartmentEditModel" size="110,133"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="218,437"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/bank/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Bank object to map in the statefile or a another persistence system.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/BiomajProcess.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/BiomajProcess.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/BiomajProcess.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,405 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.process;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Process description corresponding to the xml process file
+ * @author ofilangi
+ */
+public class BiomajProcess {
+
+ /**
+ * @uml.property name="keyName"
+ */
+ private String keyName;
+ /**
+ * @uml.property name="nameProcess"
+ */
+ private String nameProcess;
+ /**
+ * @uml.property name="exe"
+ */
+ private String exe;
+ /**
+ * @uml.property name="args"
+ */
+ private String args;
+ /**
+ * @uml.property name="description"
+ */
+ private String description;
+ /**
+ * @uml.property name="type"
+ */
+ private String type;
+
+ /**
+ * @uml.property name="returnValue"
+ */
+ private int returnValue ;
+ /**
+ * @uml.property name="errorDetected"
+ */
+ private boolean errorDetected ;
+
+ //Dynamics data
+ /**
+ * @uml.property name="start"
+ */
+ private Date start;
+ /**
+ * @uml.property name="end"
+ */
+ private Date end;
+
+ /**
+ * @uml.property name="timeStampExe"
+ */
+ private long timeStampExe;
+
+ // Process id in the db
+ private long processId = -1;
+
+ private Vector<String> warn = new Vector<String>();
+
+ private Vector<String> err = new Vector<String>();
+
+ private Vector<FileDesc> dependancesOutput = new Vector<FileDesc>();
+
+ public BiomajProcess() {
+
+ }
+
+ public void setProcessId(long id) {
+ processId = id;
+ }
+
+ public long getProcessId() {
+ return processId;
+ }
+
+ /**
+ * @return the args
+ * @uml.property name="args"
+ */
+ public String getArgs() {
+ return args;
+ }
+
+ /**
+ * @param args the args to set
+ * @uml.property name="args"
+ */
+ public void setArgs(String args) {
+ this.args = args;
+ }
+
+ /**
+ * @return the description
+ * @uml.property name="description"
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ * @uml.property name="description"
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the exe
+ * @uml.property name="exe"
+ */
+ public String getExe() {
+ return exe;
+ }
+
+ /**
+ * @param exe the exe to set
+ * @uml.property name="exe"
+ */
+ public void setExe(String exe) {
+ this.exe = exe;
+ }
+
+ /**
+ * @return the keyName
+ * @uml.property name="keyName"
+ */
+ public String getKeyName() {
+ return keyName;
+ }
+
+ /**
+ * @param keyName the keyName to set
+ * @uml.property name="keyName"
+ */
+ public void setKeyName(String keyName) {
+ this.keyName = keyName;
+ }
+
+ /**
+ * @return the nameProcess
+ * @uml.property name="nameProcess"
+ */
+ public String getNameProcess() {
+ return nameProcess;
+ }
+
+ /**
+ * @param nameProcess the nameProcess to set
+ * @uml.property name="nameProcess"
+ */
+ public void setNameProcess(String nameProcess) {
+ this.nameProcess = nameProcess;
+ }
+
+ /**
+ * @return the type
+ * @uml.property name="type"
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * @param type the type to set
+ * @uml.property name="type"
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * @return the err
+ * @uml.property name="err"
+ */
+ public Vector<String> getErr() {
+ return err;
+ }
+
+ /**
+ * @param err the err to set
+ * @uml.property name="err"
+ */
+ public void setErr(Vector<String> err) {
+ this.err = err;
+ }
+
+ /**
+ * @return the warn
+ * @uml.property name="warn"
+ */
+ public Vector<String> getWarn() {
+ return warn;
+ }
+
+ /**
+ * @param warn the warn to set
+ * @uml.property name="warn"
+ */
+ public void setWarn(Vector<String> warn) {
+ this.warn = warn;
+ }
+
+ /**
+ * @return the end
+ * @uml.property name="end"
+ */
+ public Date getEnd() {
+ return end;
+ }
+
+ /**
+ * @param end the end to set
+ * @uml.property name="end"
+ */
+ public void setEnd(Date end) {
+ this.end = end;
+ }
+
+ /**
+ * @return the start
+ * @uml.property name="start"
+ */
+ public Date getStart() {
+ return start;
+ }
+
+ /**
+ * @param start the start to set
+ * @uml.property name="start"
+ */
+ public void setStart(Date start) {
+ this.start = start;
+ }
+
+ /**
+ * @return the returnValue
+ * @uml.property name="returnValue"
+ */
+ public int getReturnValue() {
+ return returnValue;
+ }
+
+ /**
+ * @param returnValue the returnValue to set
+ * @uml.property name="returnValue"
+ */
+ public void setReturnValue(int returnValue) {
+ this.returnValue = returnValue;
+ }
+
+ /**
+ * @return the dependancesOutput
+ * @uml.property name="dependancesOutput"
+ */
+ public Vector<FileDesc> getDependancesOutput() {
+ return dependancesOutput;
+ }
+
+ /**
+ * @param dependancesOutput the dependancesOutput to set
+ * @uml.property name="dependancesOutput"
+ */
+ public void setDependancesOutput(Vector<FileDesc> dependancesOutput) {
+ this.dependancesOutput = dependancesOutput;
+ }
+
+ public void fill(Map<String, String> process) {
+
+ processId = Long.valueOf(process.get(BiomajSQLQuerier.PROC_ID));
+
+ setNameProcess(process.get(BiomajSQLQuerier.PROC_NAME));
+ try {
+ setStart(BiomajUtils.stringToDate(process.get(BiomajSQLQuerier.PROC_START)));
+ setEnd(BiomajUtils.stringToDate(process.get(BiomajSQLQuerier.PROC_END)));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe.getLocalizedMessage());
+ return;
+ }
+ String val = process.get(BiomajSQLQuerier.PROC_VALUE);
+ if (val != null && !val.isEmpty())
+ setReturnValue(Integer.valueOf(val));
+ else
+ setReturnValue(-1);
+
+ setKeyName(process.get(BiomajSQLQuerier.PROC_KEYNAME));
+ setExe(process.get(BiomajSQLQuerier.PROC_EXE));
+ setArgs(process.get(BiomajSQLQuerier.PROC_ARGS));
+ setDescription(process.get(BiomajSQLQuerier.PROC_DESC));
+ setType(process.get(BiomajSQLQuerier.PROC_TYPE));
+ setErrorDetected(Boolean.valueOf(process.get(BiomajSQLQuerier.PROC_ERROR)));
+
+ String timeStamp = process.get(BiomajSQLQuerier.PROC_TIMESTAMP);
+ if (timeStamp != null && !timeStamp.trim().isEmpty())
+ setTimeStampExe(Long.valueOf(timeStamp));
+
+ List<Map<String, String>> files = BiomajSQLQuerier.getProcessFiles(Integer.valueOf(process.get(BiomajSQLQuerier.PROC_ID)));
+ for (Map<String, String> file : files) {
+
+ String location = file.get(BiomajSQLQuerier.FILE_LOCATION);
+ long size = Long.valueOf(file.get(BiomajSQLQuerier.FILE_SIZE));
+ long time = Long.valueOf(file.get(BiomajSQLQuerier.FILE_TIME));
+ String refHash = file.get(BiomajSQLQuerier.REF_HASH);
+ boolean link = Boolean.valueOf(file.get(BiomajSQLQuerier.IS_LINK));
+ boolean extract = Boolean.valueOf(file.get(BiomajSQLQuerier.IS_EXTRACT));
+ boolean volatil = Boolean.valueOf(file.get(BiomajSQLQuerier.IS_VOLATILE));
+
+ FileDesc f = new FileDesc(location,size,time,link,extract,volatil,refHash);
+ f.setFileId(Long.valueOf(file.get(BiomajSQLQuerier.FILE_ID)));
+ getDependancesOutput().add(f);
+ }
+
+ List<List<String>> messages = BiomajSQLQuerier.getProcessMessages(Integer.valueOf(process.get(BiomajSQLQuerier.PROC_ID)));
+ warn.addAll(messages.get(0));
+ err.addAll(messages.get(1));
+
+ }
+
+ /**
+ * @return the errorDetected
+ * @uml.property name="errorDetected"
+ */
+ public boolean isErrorDetected() {
+ return errorDetected;
+ }
+
+ /**
+ * @param errorDetected the errorDetected to set
+ * @uml.property name="errorDetected"
+ */
+ public void setErrorDetected(boolean errorDetected) {
+ this.errorDetected = errorDetected;
+ }
+
+ /**
+ * @return the timeStampExe
+ * @uml.property name="timeStampExe"
+ */
+ public long getTimeStampExe() {
+ return timeStampExe;
+ }
+
+ /**
+ * @param timeStampExe the timeStampExe to set
+ * @uml.property name="timeStampExe"
+ */
+ public void setTimeStampExe(long timeStampExe) {
+ this.timeStampExe = timeStampExe;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/DecisionWorkflowPostProcess.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/DecisionWorkflowPostProcess.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/DecisionWorkflowPostProcess.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,282 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.process;
+
+import java.io.File;
+import java.util.Date;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.Vector;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.ant.task.BmajExecute;
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.singleton.BiomajSession;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Manage decision about workflow post process.
+ * This class verify and determines which postprocess launch
+ * @author ofilangi
+ *
+ */
+public class DecisionWorkflowPostProcess {
+
+ //Mode when there are no change in the remote server but verify current directory
+ public static final int MODE_VERIF = 0;
+ //Mode when a new bank ha been download
+ public static final int MODE_NEW_RELEASE = 1;
+
+ /**
+ * @uml.property name="project"
+ * @uml.associationEnd multiplicity="(1 1)"
+ */
+ private Project project ;
+ /**
+ * @uml.property name="metaProcess"
+ * @uml.associationEnd multiplicity="(0 -1)" ordering="true" elementType="org.inria.biomaj.session.process.BiomajProcess" qualifier="name:java.lang.String org.inria.biomaj.session.process.MetaProcess"
+ */
+ private Hashtable<String,MetaProcess> metaProcess = new Hashtable<String,MetaProcess>();
+ private Vector<String> listMetaProcess = new Vector<String>();
+
+ public DecisionWorkflowPostProcess(
+ String block,
+ String nameBank,
+ String propertyListMetaProcess,
+ Project project,
+ int mode,boolean isPostProcess) throws BiomajException {
+ this.project = project;
+
+ //Si c'est une nouvelle release :
+ //- Recuperer les post process deja execute (avec contrainte postprosess = ko)
+ //- on travaille sur future_release
+
+ if (project.getProperty(propertyListMetaProcess)==null)
+ {
+ project.log("Can't interprete ["+project.getProperty(propertyListMetaProcess)+"]");
+ }
+
+ String[] lMeta = project.getProperty(propertyListMetaProcess).split(",");
+ for (String n : lMeta)
+ listMetaProcess.add(block+":"+n);
+
+ Bank bank = BiomajSession.getInstance().getBank(nameBank);
+
+ if ((mode != MODE_NEW_RELEASE)&&isPostProcess) {
+ //try {
+ for (int i=0;i<lMeta.length;i++) {
+ //MetaProcess p = BiomajQueryXmlStateFile.getLastMetaProcess(block,lMeta[i],nameBank,isPostProcess);
+ MetaProcess p = bank.getLastMetaProcessExecuted(block,lMeta[i]);
+ if (p!=null) {
+ metaProcess.put(block+":"+p.getName(), p);
+ }
+ }
+ /* } catch (FileNotFoundException fe) {
+ project.log(fe.getMessage(),Project.MSG_ERR);
+ } catch (BiomajException be) {
+ project.log(be.getMessage(),Project.MSG_ERR);
+ } */
+ } else {
+ //
+ }
+ }
+
+ public MetaProcess getMetaProcess(String block,String name) {
+ if (metaProcess.containsKey(block+":"+name))
+ return metaProcess.get(block+":"+name);
+
+ MetaProcess p = new MetaProcess();
+ p.setName(name);
+ p.setStart(new Date());
+ return p;
+
+ }
+
+
+ public String getListSubProcess(String block,String name) throws BiomajException {
+
+ if (!metaProcess.containsKey(block+":"+name))
+ return project.getProperty(name);
+ //Sinon il faut voir quels sont les subprocess qui ont besoin d etre relancee!
+
+ if (project.getProperty(name)==null)
+ return null;
+
+ String listProcess = project.getProperty(name);
+
+ project.log("List process:"+listProcess,Project.MSG_INFO);
+ MetaProcess mp = metaProcess.get(block+":"+name);
+ boolean lookVolatile = (mp.getStatusStr().compareTo("ok")!=0);
+ //${data.dir}/${dir.version}
+ //String root = project.getProperty(CitrinaConst.dataDirProperty)+"/"+project.getProperty(CitrinaConst.versionDirProperty);
+
+ Vector<BiomajProcess> lp = mp.getListProcess();
+
+ //Il y a jamais eu de process lancee...
+ if (lp.size()==0)
+ return listProcess;
+
+ //Si le metaProcess s est bien deroule la derniere fois, nous somme dans une phase de verif!
+ if (!lookVolatile) {
+ //Premiere verif, si le metaprocess est ok, on verifie que la liste de process dans le properties correspond a celle lance la derniere fois
+ //si changement (ajout de process), on relance le tout!
+ String[] l = listProcess.split(",");
+ if (l.length!=lp.size()) {
+ project.log("Number of processes defined inside metaprocess ["+mp.getName()+"] has changed. old["+
+ Integer.toString(lp.size())+"] new [" +Integer.toString(l.length)+"] All process from ["+mp.getBlock()+":"+mp.getName()+"]"
+ +" have to be launch!",Project.MSG_WARN);
+ metaProcess.remove(block+":"+mp.getName());
+ return listProcess;
+ }
+
+ for (int i=0;i<l.length;i++) {
+ //OFI 29/01/2008 : ajout si le script a execute a changer on relance egalement
+ project.log("li.exe:"+project.getProperty(l[i].trim()+".exe"));
+ project.log("exe logged:"+lp.get(i).getExe());
+
+ boolean exeChanged = project.getProperty(l[i].trim()+".exe").compareTo(lp.get(i).getExe())!=0;
+
+ project.log("li.args:"+project.getProperty(l[i].trim()+".args"));
+ project.log("args logged:"+lp.get(i).getArgs());
+
+ boolean argsChanged = project.getProperty(l[i].trim()+".args").compareTo(lp.get(i).getArgs())!=0;
+
+ if ((l[i].trim().compareTo(lp.get(i).getKeyName().trim())!=0)|| exeChanged || argsChanged) {
+ project.log("Processes defined inside metaprocess ["+l[i].trim()+"] has changed. ["+l[i].trim()+"] not match with [" +
+ lp.get(i).getKeyName().trim()+"] All process from ["+mp.getBlock()+":"+mp.getName()+"]"
+ +" have to be launch!",Project.MSG_WARN);
+ metaProcess.remove(block+":"+mp.getName());
+ return listProcess;
+ }
+ //ver 0.9.2 08/2007 ajout TEST, si date de l executable a changer alors on rexecute le metaprocess
+ long timeLocal = BmajExecute.getTimeStampExe(BmajExecute.getPathExe(null,lp.get(i).getExe()));
+ long timeSav = lp.get(i).getTimeStampExe();
+ if (timeLocal != timeSav) {
+ project.log("Executable time [old:"+BiomajUtils.dateToString(new Date(timeSav), Locale.US)+"] " +
+ "[new:"+BiomajUtils.dateToString(new Date(timeLocal), Locale.US)+"]",Project.MSG_WARN);
+ project.log("exec process ["+BmajExecute.getPathExe(null,lp.get(i).getExe())+"] has been modified. All process from ["+mp.getBlock()+":"+mp.getName()+"]"
+ +" have to be launch!",Project.MSG_WARN);
+ metaProcess.remove(block+":"+mp.getName());
+ return listProcess;
+ }
+ /*
+ if (!dependenceIsOk(lp.get(i),lookVolatile)) {
+ project.log("["+lp.get(i).getNameProcess()+"] is not ok...All Process from ["+mp.getBlock()+":"+mp.getName()+"]"
+ +" have to be launch!",Project.MSG_WARN);
+ return listProcess;
+ }
+ */
+ }
+
+ }
+
+ int i=0;
+ for (i=0;i<lp.size();i++) {
+ BiomajProcess p = lp.get(i);
+ if ((p.getReturnValue()==0)&&(!p.isErrorDetected())) {
+// ver 0.9.2 08/2007 ajout TEST, si date de l executable a changer alors on rexecute le metaprocess
+ long timeLocal = BmajExecute.getTimeStampExe(BmajExecute.getPathExe(null,p.getExe()));
+ long timeSav = p.getTimeStampExe();
+ if (timeLocal != timeSav) {
+ project.log("Executable time [old:"+BiomajUtils.dateToString(new Date(timeSav), Locale.US)+"] " +
+ "[new:"+BiomajUtils.dateToString(new Date(timeLocal), Locale.US)+"]",Project.MSG_WARN);
+ project.log("exec process ["+BmajExecute.getPathExe(null,lp.get(i).getExe())+"] has been modified.",Project.MSG_WARN);
+ break;
+ }
+ //tout va bien pour l instant , il faut verifier l existence des fichiers generes!
+ if (!dependenceIsOk(p,lookVolatile)) {
+ project.log("["+p.getNameProcess()+"] is not ok...Process need to be launched.",Project.MSG_WARN);
+ break;
+ } else {
+ project.log("["+p.getNameProcess()+"] is ok...",Project.MSG_INFO);
+
+ listProcess = listProcess.replaceFirst(p.getKeyName(), "").trim();
+ if (listProcess.startsWith(","))
+ listProcess = listProcess.replaceFirst(",", "");
+ else //C est donc une chaine vide, il y a rien a faire!
+ return "";
+
+ project.log("new list process:"+listProcess,Project.MSG_INFO);
+ }
+
+ } else {
+ //Le process a retourne une erreur!
+ break;
+ }
+ }
+ //On efface tous les process a partir du process qui est considere comme ko (status ko ou fichier generer manquant)
+ while (i!=lp.size()) {
+ lp.remove(i);
+ }
+ return listProcess;
+ }
+
+ protected boolean dependenceIsOk(BiomajProcess p,boolean lookVolatile) {
+ Vector<FileDesc> lFd = p.getDependancesOutput();
+
+ for (FileDesc fd : lFd) {
+ if (lookVolatile||(!fd.isVolatil())) {
+ File f = new File(fd.getLocation());
+ if (!f.exists()) {
+ project.log("The dependence file ["+fd.getLocation()+"] is not find ! Process ["+p.getNameProcess()+"] need to be launched.",Project.MSG_WARN);
+ return false;
+ }
+ if (f.lastModified()!=fd.getTime()) {
+ project.log("Detect modification for the dependence file ["+fd.getLocation()+"] time stored:["+BiomajUtils.dateToString(new Date(fd.getTime()), Locale.US)+
+ "], time on system ["+BiomajUtils.dateToString(new Date(f.lastModified()), Locale.US)+"]",Project.MSG_WARN);
+ return false;
+ }
+
+ if (f.length()!=fd.getSize()) {
+ project.log("Detect modification for the dependence file ["+fd.getLocation()+"] length stored:["+
+ Long.toString(fd.getSize())+"], length on system ["+Long.toString(f.length())+"]",Project.MSG_WARN);
+ return false;
+ }
+ project.log("** The dependence file ["+fd.getLocation()+"] [volatil:"+Boolean.toString(fd.isVolatil())+"] is ok!",Project.MSG_INFO);
+ }
+ }
+
+ return true;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/MetaProcess.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/MetaProcess.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/MetaProcess.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,262 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.session.process;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.inria.biomaj.session.bank.BiomajSQLQuerier;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class MetaProcess {
+
+ /**
+ * @uml.property name="name"
+ */
+ private String name;
+
+ private Vector<BiomajProcess> listProcess = new Vector<BiomajProcess>();
+
+// Dynamics data
+ /**
+ * @uml.property name="start"
+ */
+ private Date start = null;
+
+ /**
+ * @uml.property name="end"
+ */
+ private Date end = null;
+
+ /**
+ * @uml.property name="logFile"
+ */
+ private String logFile = "";
+
+ private Vector<String> warn = new Vector<String>();
+
+ private Vector<String> err = new Vector<String>();
+
+
+ /**
+ * @uml.property name="block"
+ */
+ private String block="";
+
+ /**
+ * @return the err
+ * @uml.property name="err"
+ */
+ public Vector<String> getErr() {
+ return err;
+ }
+
+ /**
+ * @param err the err to set
+ * @uml.property name="err"
+ */
+ public void setErr(Vector<String> err) {
+ this.err = err;
+ }
+
+ /**
+ * @return the warn
+ * @uml.property name="warn"
+ */
+ public Vector<String> getWarn() {
+ return warn;
+ }
+
+ /**
+ * @param warn the warn to set
+ * @uml.property name="warn"
+ */
+ public void setWarn(Vector<String> warn) {
+ this.warn = warn;
+ }
+
+ /**
+ * @return the end
+ * @uml.property name="end"
+ */
+ public Date getEnd() {
+ return end;
+ }
+
+ /**
+ * @param end the end to set
+ * @uml.property name="end"
+ */
+ public void setEnd(Date end) {
+ this.end = end;
+ }
+
+ /**
+ * @return the start
+ * @uml.property name="start"
+ */
+ public Date getStart() {
+ return start;
+ }
+
+ /**
+ * @param start the start to set
+ * @uml.property name="start"
+ */
+ public void setStart(Date start) {
+ this.start = start;
+ }
+
+ /**
+ * @return the listProcess
+ * @uml.property name="listProcess"
+ */
+ public Vector<BiomajProcess> getListProcess() {
+ return listProcess;
+ }
+
+ /**
+ * @param listProcess the listProcess to set
+ * @uml.property name="listProcess"
+ */
+ public void setListProcess(Vector<BiomajProcess> listProcess) {
+ this.listProcess = listProcess;
+ }
+
+ /**
+ * @return the name
+ * @uml.property name="name"
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ * @uml.property name="name"
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getStatusStr() {
+ for (BiomajProcess p: getListProcess()) {
+ if ((p.getReturnValue()!=0)||(p.isErrorDetected()))
+ return "ko";
+ }
+ return "ok";
+ }
+
+ public void fill(Map<String, String> metaprocess) {
+ if (metaprocess == null) return;
+
+ setName(metaprocess.get(BiomajSQLQuerier.META_NAME));
+ try {
+ setStart(BiomajUtils.stringToDate(metaprocess.get(BiomajSQLQuerier.META_START)));
+ setStart(BiomajUtils.stringToDate(metaprocess.get(BiomajSQLQuerier.META_END)));
+ } catch (ParseException pe) {
+ BiomajLogger.getInstance().log(pe);
+ if (getStart() == null) {
+ setStart(new Date());
+ }
+ if (getEnd() == null) {
+ setEnd(new Date());
+ }
+ }
+
+ setBlock(metaprocess.get(BiomajSQLQuerier.BLOCK));
+ setLogFile(metaprocess.get(BiomajSQLQuerier.META_LOGFILE));
+
+ List<List<String>> messages = BiomajSQLQuerier.getMetaprocessMessages(metaprocess.get(BiomajSQLQuerier.META_ID));
+ warn.addAll(messages.get(0));
+ err.addAll(messages.get(1));
+
+ List<Map<String, String>> processes = BiomajSQLQuerier.getMetaprocessProcesses(metaprocess.get(BiomajSQLQuerier.META_ID));
+ for (Map<String, String> process : processes) {
+ BiomajProcess p = new BiomajProcess() ;
+ p.fill(process);
+ listProcess.add(p);
+ }
+
+ }
+
+ /**
+ * @return the logFile
+ * @uml.property name="logFile"
+ */
+ public String getLogFile() {
+ return logFile;
+ }
+
+ /**
+ * @param logFile the logFile to set
+ * @uml.property name="logFile"
+ */
+ public void setLogFile(String logFile) {
+ this.logFile = logFile;
+ }
+
+ /**
+ * @return the block
+ * @uml.property name="block"
+ */
+ public String getBlock() {
+ return block;
+ }
+
+ /**
+ * @param block the block to set
+ * @uml.property name="block"
+ */
+ public void setBlock(String block) {
+ this.block = block;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/org.inria.biomaj.session.process_2.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/org.inria.biomaj.session.process_2.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/org.inria.biomaj.session.process_2.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="org.inria.biomaj.session.process_2" id="org.inria.biomaj.session.process" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" name="BiomajProcess" location="420,140" size="137,64" id="org.inria.biomaj.session.process/BiomajProcess">
+ <children xsi:type="editmodel:CompartmentEditModel" size="130,209"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="234,570"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.process/BiomajProcess at metaProcess+org.inria.biomaj.session.process/DecisionWorkflowPostProcess@" source="//@children.0" target="//@children.2" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="metaProcess" location="137,21" id="org.inria.biomaj.session.process/BiomajProcess at metaProcess+org.inria.biomaj.session.process/DecisionWorkflowPostProcess@|org.inria.biomaj.session.process/BiomajProcess#metaProcess" attachSource="true" multiplicityLabel="//@children.0/@sourceConnections.0/@children.1/@children.1" roleLabel="//@children.0/@sourceConnections.0/@children.1/@children.0" navigable="true" orderingKind="1">
+ <children xsi:type="editmodel:LabelEditModel" name=" - metaProcess" location="564,137" size="72,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="564,168" size="4,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,41" id="org.inria.biomaj.session.process/BiomajProcess at metaProcess+org.inria.biomaj.session.process/DecisionWorkflowPostProcess@|org.inria.biomaj.session.process/DecisionWorkflowPostProcess#">
+ <children xsi:type="editmodel:QualifierAttributeEditModel" name="name" location="793,148" size="42,26" id=""/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.inria.biomaj.session.process/BiomajProcess at listProcess+org.inria.biomaj.session.process/MetaProcess@" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.1/@children.2" label="//@children.0/@sourceConnections.1/@children.0" sourceEnd="//@children.0/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,17" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="listProcess" location="10,64" id="org.inria.biomaj.session.process/BiomajProcess at listProcess+org.inria.biomaj.session.process/MetaProcess@|org.inria.biomaj.session.process/BiomajProcess#listProcess" attachSource="true" multiplicityLabel="//@children.0/@sourceConnections.1/@children.1/@children.1" roleLabel="//@children.0/@sourceConnections.1/@children.1/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - listProcess" location="437,211" size="60,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="419,211" size="4,17" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="121,10" id="org.inria.biomaj.session.process/BiomajProcess at listProcess+org.inria.biomaj.session.process/MetaProcess@|org.inria.biomaj.session.process/MetaProcess#"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.1" name="MetaProcess" location="80,350" size="121,64" id="org.inria.biomaj.session.process/MetaProcess">
+ <children xsi:type="editmodel:CompartmentEditModel" size="84,95"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="155,342"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0" name="DecisionWorkflowPostProcess" location="830,120" size="234,64" id="org.inria.biomaj.session.process/DecisionWorkflowPostProcess">
+ <children xsi:type="editmodel:CompartmentEditModel" size="154,38"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="789,76"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showLiterals="true"/>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/session/process/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,10 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Process object to map in the statefile or a another persistence system.
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajInformation.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajInformation.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajInformation.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,562 @@
+package org.inria.biomaj.singleton;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Hashtable;
+import java.util.InvalidPropertiesFormatException;
+import java.util.StringTokenizer;
+
+import org.inria.biomaj.exe.main.Biomaj;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Classe Singleton utilise pour donner les informations de configuration de l'application
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajInformation {
+
+ /**
+ * Directories section
+ */
+ protected final static String DIRECTORIES_SECTION="DIRECTORIES";
+
+
+ public final static String LOGDIR="log.dir";
+ public final static String LOGBIOMAJDIR="log-biomaj.dir";
+ public final static String STATEFILESDIR="statefiles.dir";
+ public final static String WORKFLOWSDIR="workflows.dir";
+ public final static String PROCESSDIR="process.dir";
+ public final static String WEBREPORTDIR="webreport.dir";
+ public final static String TMPDIR="tmp.dir";
+
+ protected final static String APPLICATIONS_SECTION="APPLICATIONS";
+ /*
+ public static final String TAR = "tar.bin";
+ public static final String GUNZIP = "gunzip.bin";
+ public static final String BUNZIP = "bunzip.bin";
+ public static final String UNZIP = "unzip.bin";
+ */
+ public static final String WGET = "wget.bin";
+ public static final String RSYNC = "rsync.bin";
+
+ public static final String LIST_BIN_UNCOMPRESS = "uncompress.bin";
+
+ public static final String OPTION_BIN = ".bin";
+ public static final String BIN_CASE = ".case";
+ public static final String OPTION_TEST = ".option.test";
+ public static final String OPTION_DECOMP = ".option.uncomp";
+ public static final String OPTION_OUTPUT = ".option.output";
+
+
+ protected final static String ENGINE_SECTION="ENGINE";
+
+ public static final String DEBUG = "debug";
+ public static final String LOG_FLAG = "bank.log";
+
+ /**
+ * Applications section
+ */
+ private static Hashtable<String, Hashtable<String,String> > _sections;
+
+ private String envBmaj;
+
+
+ /**
+ * Implementation du singleton
+ */
+ private static BiomajInformation uniqueInstance = null;
+
+ /**
+ * Chargement du fichier de configuration general
+ *
+ */
+ private BiomajInformation () {
+
+ _sections = new Hashtable<String, Hashtable<String,String>>();
+ envBmaj = BiomajUtils.getBiomajRootDirectory();
+
+ File f = new File(envBmaj+"/"+BiomajConst.nameGeneralConf);
+ try {
+ if (!f.exists()) {
+ System.out.println("The file ["+envBmaj+"/"+BiomajConst.nameGeneralConf+"] does not exist!");
+ System.out.println("BioMAJ create a new file. Edit the file to change input/output directories.");
+ BufferedWriter bw = new BufferedWriter (new FileWriter(f));
+ bw.write("# Created by BioMAJ "+Biomaj.VERSION);bw.newLine();
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
+ bw.write("# Date : "+sdf.format(new Date()));bw.newLine();
+ bw.write("# File : General configuration");bw.newLine();
+ bw.write("[DIRECTORIES]");bw.newLine();
+ bw.write("log.dir ="+envBmaj+"/log");bw.newLine();
+ bw.write("log-biomaj.dir ="+envBmaj+"/log/biomaj-runtime");bw.newLine();
+ bw.write("statefiles.dir ="+envBmaj+"/statefiles");bw.newLine();
+ bw.write("workflows.dir ="+envBmaj+"/conf/db_properties");bw.newLine();
+ bw.write("process.dir ="+envBmaj+"/conf/process");bw.newLine();
+ bw.write("webreport.dir ="+envBmaj+"/rapport");bw.newLine();
+ bw.write("tmp.dir ="+envBmaj+"/tmp");bw.newLine();
+ bw.write("");bw.newLine();
+ bw.write("[APPLICATIONS]");bw.newLine();
+
+ bw.write("uncompress.bin=tar,tar2,tar3,gunzip,bunzip,unzip");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("tar.bin="+which("tar"));bw.newLine();
+ bw.write("tar.case=.tar.gz,.tgz,.tar.Z");bw.newLine();
+ bw.write("tar.option.uncomp=-zxf");bw.newLine();
+ bw.write("tar.option.output=-C");bw.newLine();
+ bw.write("tar.option.test=-tzf");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("gunzip.bin="+which("gunzip"));bw.newLine();
+ bw.write("gunzip.case=.gz,.Z");bw.newLine();
+ bw.write("gunzip.option.uncomp=-f");bw.newLine();
+ bw.write("gunzip.option.test=-t");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("tar2.bin="+which("tar"));bw.newLine();
+ bw.write("tar2.case=.tar.bz2");bw.newLine();
+ bw.write("tar2.option.uncomp=-jxf");bw.newLine();
+ bw.write("tar2.option.output=-C");bw.newLine();
+ bw.write("tar2.option.test=-tjf");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("bunzip.bin="+which("bunzip2"));bw.newLine();
+ bw.write("bunzip.case=.bz2");bw.newLine();
+ bw.write("bunzip.option.uncomp=-f");bw.newLine();
+ bw.write("bunzip.option.output=-c");bw.newLine();
+ bw.write("bunzip.option.test=-t");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("tar3.bin="+which("tar"));bw.newLine();
+ bw.write("tar3.case=.tar");bw.newLine();
+ bw.write("tar3.option.uncomp=-xf");bw.newLine();
+ bw.write("tar3.option.output=-C");bw.newLine();
+ bw.write("tar3.option.test=-tf");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("unzip.bin="+which("unzip"));bw.newLine();
+ bw.write("unzip.case=.zip");bw.newLine();
+ bw.write("unzip.option.uncomp=-q");bw.newLine();
+ bw.write("unzip.option.output=-d");bw.newLine();
+ bw.write("unzip.option.test=-t");bw.newLine();
+
+ bw.newLine();
+
+ bw.write("wget.bin="+which("wget"));bw.newLine();
+
+ bw.write("rsync.bin="+which("rsync"));bw.newLine();
+
+ bw.write("[ENGINE]");bw.newLine();
+
+ bw.write("debug=false");bw.newLine();
+ bw.write("bank.log=true");bw.newLine();
+
+ bw.close();
+ }
+
+ load(new FileInputStream(f));
+
+
+ if (!checkSections()||!checkProperty())
+ throw new InvalidPropertiesFormatException("");
+ } catch (IOException ioe) {
+ System.err.println("** "+BiomajConst.nameGeneralConf+" is not valid ! **");
+ System.err.println(ioe.getLocalizedMessage());
+ System.exit(1);
+ }
+ }
+
+ protected String which(String nameExe) {
+ try {
+ Process p = Runtime.getRuntime().exec("which "+nameExe);
+ int res = p.waitFor();
+ if (res==0) {
+ BufferedReader entree = new BufferedReader( new InputStreamReader(p.getInputStream()) );
+ String result = entree.readLine();
+ //System.out.println(nameExe+":"+result);
+ return result;
+ } else
+ return "";
+ } catch (Exception ie) {
+ System.err.println(ie.getLocalizedMessage());
+ return "";
+ }
+ }
+
+ public static synchronized BiomajInformation getInstance() throws BiomajException
+ {
+ if(uniqueInstance==null)
+ {
+ uniqueInstance = new BiomajInformation();
+ }
+ return uniqueInstance;
+ }
+
+
+ /**
+
+ * @param prop
+ * @return
+ */
+ public String getProperty(String prop) {
+
+ assert _sections != null : "_sections has to be defined!" ;
+
+
+ /**
+ * Les informations contenues sont des repertoires. les repertoires commencant par un '/' sont des chemins absolues
+ * dans le cas contraire il sont relatif a la variable d'environnement $BIOMAJ_ROOT
+ */
+ if (_sections.get(DIRECTORIES_SECTION).containsKey(prop)) {
+
+ String dir = _sections.get(DIRECTORIES_SECTION).get(prop) ;
+
+ if (dir.startsWith("/"))
+ return dir;
+
+ return envBmaj+"/"+dir;
+ }
+
+ for (String h : _sections.keySet()) {
+ if (_sections.get(h).containsKey(prop))
+ return _sections.get(h).get(prop);
+ }
+
+ return null;
+ }
+
+
+ private boolean checkProperty() {
+
+ assert _sections != null : "_sections has to be defined!" ;
+
+ if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.LOGDIR)) {
+ System.err.println("Property ["+BiomajInformation.LOGDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.LOGBIOMAJDIR)) {
+ System.err.println("Property ["+BiomajInformation.LOGBIOMAJDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.WORKFLOWSDIR)) {
+ System.err.println("Property ["+BiomajInformation.WORKFLOWSDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.PROCESSDIR)) {
+ System.err.println("Property ["+BiomajInformation.PROCESSDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.STATEFILESDIR)) {
+ System.err.println("Property ["+BiomajInformation.STATEFILESDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.WEBREPORTDIR)) {
+ System.err.println("Property ["+BiomajInformation.WEBREPORTDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(DIRECTORIES_SECTION).containsKey(BiomajInformation.TMPDIR)) {
+ System.err.println("Property ["+BiomajInformation.TMPDIR+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ } else if (!_sections.get(APPLICATIONS_SECTION).containsKey(BiomajInformation.WGET)) {
+ System.err.println("Property ["+BiomajInformation.WGET+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+
+ if ("".compareTo(which(getProperty(BiomajInformation.WGET)))==0)
+ {
+ System.err.println("BioMAJ does not find executable :"+ getProperty(BiomajInformation.WGET));
+ return false;
+ }
+
+ if (_sections.get(APPLICATIONS_SECTION).containsKey(BiomajInformation.LIST_BIN_UNCOMPRESS)) {
+ String[] listBinUncompress = _sections.get(APPLICATIONS_SECTION).get(BiomajInformation.LIST_BIN_UNCOMPRESS).split(",");
+
+ for (String s : listBinUncompress) {
+ if (s.compareTo("")==0)
+ continue;
+ if (!_sections.get(APPLICATIONS_SECTION).containsKey(s+BiomajInformation.OPTION_BIN)) {
+ System.err.println("Property ["+s+BiomajInformation.OPTION_BIN+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+ if (!_sections.get(APPLICATIONS_SECTION).containsKey(s+BiomajInformation.BIN_CASE)) {
+ System.err.println("Property ["+s+BiomajInformation.BIN_CASE+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+ }
+ } else {
+ System.err.println("Property ["+BiomajInformation.LIST_BIN_UNCOMPRESS+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+
+
+ if (!_sections.containsKey(ENGINE_SECTION)) {
+ _sections.put(ENGINE_SECTION, new Hashtable<String, String>());
+ _sections.get(ENGINE_SECTION).put(DEBUG, Boolean.toString(false));
+ _sections.get(ENGINE_SECTION).put(LOG_FLAG, Boolean.toString(true));
+ } else {
+ if (!_sections.get(ENGINE_SECTION).containsKey(DEBUG)) {
+ _sections.get(ENGINE_SECTION).put(DEBUG, Boolean.toString(false));
+ }
+ if (!_sections.get(ENGINE_SECTION).containsKey(LOG_FLAG)) {
+ _sections.get(ENGINE_SECTION).put(LOG_FLAG, Boolean.toString(true));
+ }
+ }
+
+ return true;
+ }
+
+
+
+
+ private boolean checkSections() {
+
+ assert _sections != null : "_sections has to be defined!" ;
+
+ if (!_sections.containsKey(DIRECTORIES_SECTION)) {
+ System.err.println("Section ["+BiomajInformation.DIRECTORIES_SECTION+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+ if (!_sections.containsKey(APPLICATIONS_SECTION)) {
+ System.err.println("Section ["+BiomajInformation.APPLICATIONS_SECTION+"] is not defined in "+BiomajConst.nameGeneralConf);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Load the current objet with the data found in the given stream
+ * @param aStream the stream that represent the INI file.
+ * @throws Exception in case of problems.
+ */
+ public void load(InputStream aStream) throws IOException
+ {
+ if (null == aStream)
+ {
+ return;
+ }
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(aStream));
+ String line = null;
+ String sectionName = null;
+ Hashtable<String,String> section = null;
+ while ((line = reader.readLine()) != null)
+ {
+ line = line.trim();
+ //comments
+ if (line.startsWith("#")||line.compareTo("")==0)
+ continue;
+
+ // All the data should be in a section
+ if (null == sectionName)
+ {
+ if ((!line.startsWith("[")) || (!line.endsWith("]")))
+ {
+ throw new InvalidPropertiesFormatException("Invalid format: data found outside section:"+line);
+ }
+
+ sectionName = line.substring(1, line.length() - 1).trim();
+ addSection(sectionName);
+ section = getSection(sectionName);
+ }
+ else
+ {
+ if (line.startsWith("["))
+ {
+ if (!line.endsWith("]"))
+ {
+ throw new InvalidPropertiesFormatException("Invalid format: no ending ] for section name:"+line);
+ }
+ sectionName = line.substring(1, line.length() - 1).trim();
+ addSection(sectionName);
+ section = getSection(sectionName);
+ }
+ else
+ {
+ addLineToSection(line, section);
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the value of the given key in the given section
+ * @param aSectionName the name of the section
+ * @param aKey the key
+ * @return the value if found or null.
+ */
+ public String getProperty(String aSectionName, String aKey)
+ {
+ Hashtable<String, String> section = getSection(aSectionName);
+ if (null == section)
+ {
+ return null;
+ }
+
+ return section.get(aKey);
+ }
+
+ private void addLineToSection(String aLine, Hashtable<String,String> aSection) throws IOException
+ {
+ if (null == aLine)
+ {
+ return;
+ }
+
+ if (null == aSection)
+ {
+ throw new InvalidPropertiesFormatException("No section found to add data");
+ }
+
+ aLine = aLine.trim();
+
+ // lines that starts with ; are comments
+ if (aLine.startsWith(";"))
+ {
+ return;
+ }
+
+ //lines that starts with # are comments
+ if (aLine.startsWith("#"))
+ {
+ return;
+ }
+
+ // Avoid the empty lines
+ if (aLine.length() == 0)
+ {
+ return;
+ }
+
+ // The format of a line of data is: key = value
+ StringTokenizer st = new StringTokenizer(aLine, "=");
+ if ((st.countTokens() > 2) || (st.countTokens() < 1))
+ {
+ throw new InvalidPropertiesFormatException("Invalid format of data: " + aLine);
+ }
+
+ String key = st.nextToken().trim();
+ // a key should not contain spaces
+ for (int index = 0; index < key.length(); index++)
+ {
+ if (Character.isWhitespace(key.charAt(index)))
+ {
+ throw new InvalidPropertiesFormatException("Invalid format of data: " + aLine);
+ }
+ }
+
+ if (st.countTokens()==0) {
+ aSection.put(key, "");
+ } else {
+ String value = st.nextToken().trim();
+ aSection.put(key, value);
+ }
+ }
+
+ private void addSection(String aSectionName)
+ {
+ if (null == aSectionName)
+ {
+ return;
+ }
+
+ Hashtable<String,String> section = getSection(aSectionName);
+ if (null == section)
+ {
+ section = new Hashtable<String,String>();
+ _sections.put(aSectionName, section);
+ }
+ }
+
+ public Hashtable<String,String> getSection(String aSectionName)
+ {
+ return _sections.get(aSectionName);
+ }
+
+
+ public String getUncompressedOptionWithFile(String nameFile,String option) throws BiomajException {
+
+ if (_sections.get(APPLICATIONS_SECTION).containsKey(BiomajInformation.LIST_BIN_UNCOMPRESS)) {
+ String[] listBinUncompress = _sections.get(APPLICATIONS_SECTION).get(BiomajInformation.LIST_BIN_UNCOMPRESS).split(",");
+ ArrayList<String> resultsCase = new ArrayList<String>();
+ ArrayList<String> resultsBin = new ArrayList<String>();
+
+ for (String s : listBinUncompress) {
+ if (s.compareTo("")==0)
+ continue;
+ String[] casePattern = _sections.get(APPLICATIONS_SECTION).get(s+BiomajInformation.BIN_CASE).split(",");
+
+ for (String thecase : casePattern ) {
+ if (nameFile.endsWith(thecase)) {
+ resultsCase.add(thecase);
+ resultsBin.add(s);
+ }
+ }
+ }
+
+ String choice = "";
+ String bin = "";
+ //On prend le plus grand suffix trouve et on l'enleve au nom de fichier
+ for (int i=0;i<resultsCase.size();i++) {
+ String suff = resultsCase.get(i);
+ if (suff.length()>choice.length()) {
+ choice = suff ;
+ bin = resultsBin.get(i);
+ }
+ }
+
+ if (bin.compareTo("")!=0)
+ return _sections.get(APPLICATIONS_SECTION).get(bin+option);
+
+ return "";
+
+ }
+ throw new BiomajException("error.dev","bad option ["+option+"] give in argument to BiomajInformation::getUncompressedOptionWithFile");
+ }
+
+
+ public String getUncompressedName(String nameFile) {
+
+ if (_sections.get(APPLICATIONS_SECTION).containsKey(BiomajInformation.LIST_BIN_UNCOMPRESS)) {
+ String[] listBinUncompress = _sections.get(APPLICATIONS_SECTION).get(BiomajInformation.LIST_BIN_UNCOMPRESS).split(",");
+
+ ArrayList<String> results = new ArrayList<String>();
+ for (String s : listBinUncompress) {
+ if (s.compareTo("")==0)
+ continue;
+ String[] casePattern = _sections.get(APPLICATIONS_SECTION).get(s+BiomajInformation.BIN_CASE).split(",");
+
+ for (String thecase : casePattern ) {
+ if (nameFile.endsWith(thecase)) {
+ results.add(thecase);
+ }
+ }
+ }
+ String choice = "";
+ //On prend le plus grand suffix trouve et on l'enleve au nom de fichier
+ for (String suff : results) {
+ if (suff.length()>choice.length())
+ choice = suff ;
+ }
+
+ return nameFile.replace(choice, "");
+
+ }
+ return nameFile ;
+ }
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajLogger.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajLogger.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajLogger.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,239 @@
+package org.inria.biomaj.singleton;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import org.inria.biomaj.ant.logger.SimpleLoggerHistoric;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Cette classe singleton a deux fonctions :
+ * - un logger pour les message d erreur qui ne sont pas lie au context d'un workflow particulier
+ * - retourne le logger specifique d'un workflow
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajLogger {
+
+ public static String DEBUG_LEVEL = "DEBUG";
+ public static String INFO_LEVEL = "INFO";
+ public static String ERROR_LEVEL = "ERROR";
+
+ private static final String BIOMAJLOG = "biomaj";
+
+ private static HashMap<String, SimpleLoggerHistoric> m_loggerWorkflow = new HashMap<String, SimpleLoggerHistoric>();
+
+ private static BiomajLogger _instance = null ;
+
+ /**
+ * @uml.property name="logBuffWriter"
+ */
+ private BufferedWriter logBuffWriter ;
+
+ private String fileNameGeneralLog = "";
+
+ private boolean available = false;
+
+ private static boolean generate_log_flag = true;
+
+ private BiomajLogger() {
+ try {
+ //SimpleDateFormat sdf = new SimpleDateFormat("dd_MM_yyyy_HH_mm_ss");
+ //File file = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.LOGBIOMAJDIR)+"/"+BiomajLogger.BIOMAJLOG+"."+sdf.format(new Date())+".log");
+ available = Boolean.valueOf(BiomajInformation.getInstance().getProperty(BiomajInformation.DEBUG));
+ generate_log_flag = Boolean.valueOf(BiomajInformation.getInstance().getProperty(BiomajInformation.LOG_FLAG));
+
+ if (available) {
+ fileNameGeneralLog = BiomajInformation.getInstance().getProperty(BiomajInformation.LOGBIOMAJDIR)+"/"+BiomajLogger.BIOMAJLOG+"."+new Date().getTime()+".log";
+ //System.out.println("[GENERAL] :"+fileNameGeneralLog);
+ File file = new File(fileNameGeneralLog);
+ BiomajUtils.createSubDirectories(BiomajUtils.getRelativeDirectory(file.getAbsolutePath()));
+ logBuffWriter = new BufferedWriter (new FileWriter(file,true));
+ }
+ } catch (Exception ioe) {
+ ioe.printStackTrace();
+ System.err.println(ioe.getMessage());
+ }
+ }
+
+ /**
+ * Retourne l'instance du singleton
+ * @return
+ */
+ public static synchronized BiomajLogger getInstance () {
+ if (_instance == null ) {
+ _instance = new BiomajLogger();
+ }
+ return _instance ;
+ }
+
+ public SimpleLoggerHistoric getLogger(String dbName) {
+ if (m_loggerWorkflow.containsKey(dbName))
+ return m_loggerWorkflow.get(dbName);
+ else
+ return null;
+ }
+
+ /**
+ * Initialisation d'un logger
+ * @param dbName
+ * @param directory
+ * @param nameFile
+ * @return
+ */
+ public SimpleLoggerHistoric initLogger(String dbName,String directory, String nameFile) {
+
+ SimpleLoggerHistoric slh = null ;
+
+ if (!generate_log_flag)
+ return slh;
+
+ if (!m_loggerWorkflow.containsKey(dbName)) {
+ //System.out.println("["+dbName.toUpperCase()+"]");
+ slh = new SimpleLoggerHistoric(nameFile);
+ slh.setNameDirectory(directory);
+ m_loggerWorkflow.put(dbName, slh);
+ }
+
+ return m_loggerWorkflow.get(dbName) ;
+ }
+
+
+ public SimpleLoggerHistoric initLogger(String dbName, String nameFile) {
+ log("-- START:"+dbName+" --");
+ SimpleLoggerHistoric slh = null ;
+
+ if (!generate_log_flag)
+ return slh;
+
+ if (!m_loggerWorkflow.containsKey(dbName)) {
+ //System.out.println("["+dbName.toUpperCase()+"]");
+ slh = new SimpleLoggerHistoric(nameFile);
+ m_loggerWorkflow.put(dbName, slh);
+ }
+
+ return slh ;
+ }
+
+ public SimpleLoggerHistoric removeLogger(String dbName) {
+
+ if (!m_loggerWorkflow.containsKey(dbName)) {
+ return null;
+ }
+
+ return m_loggerWorkflow.remove(dbName);
+
+ }
+
+ /**
+ * Logs a message with information on the level.
+ *
+ * @param message
+ * @param level
+ */
+ public void log(String message, String level) {
+ if (level.equals(DEBUG_LEVEL) ||
+ level.equals(INFO_LEVEL) ||
+ level.equals(ERROR_LEVEL)) {
+
+ log("[" + level + "] " + message);
+ }
+ }
+
+ public void log(String message) {
+ if (! available || ! generate_log_flag)
+ return ;
+ String prec = "["+new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").format(new Date())+"]";
+
+ //Savoir dans quelle méthode on se trouve
+ Throwable throwable = new Throwable();
+ StackTraceElement[] trace = throwable.getStackTrace();
+
+ int i = 2 ;
+ boolean isOk = false;
+
+ while (!isOk) {
+ if ((trace.length>i)&&(trace[i].getFileName()!=null)) {
+ prec += "["+trace[i].getFileName()+"]";
+ prec += "["+trace[i].getMethodName()+"]";
+ prec += "["+trace[i].getLineNumber()+"]";
+ isOk = true;
+ } else if (trace.length<i) {
+ isOk = true;
+ } else
+ i++;
+ }
+
+ try {
+ open();
+ logBuffWriter.write(prec+message);
+ logBuffWriter.newLine();
+ logBuffWriter.flush();
+ } catch (IOException ioe) {
+ System.err.println(prec+message);
+ System.err.println(ioe.getMessage());
+ }
+ }
+
+ public void log(Exception e) {
+ if (!available || ! generate_log_flag)
+ return ;
+
+ if (e != null) {
+ for (StackTraceElement st : e.getStackTrace())
+ log(st.getFileName()+":"+st.getMethodName()+":"+st.getLineNumber());
+ log(e.getMessage());
+ }
+ }
+
+ private void close() {
+ if (!available || ! generate_log_flag)
+ return ;
+ log("-- END --");
+
+ try {
+ if ((logBuffWriter!= null)) {
+ //System.out.println("[GENERAL]-->close");
+ logBuffWriter.close();
+ logBuffWriter = null ;
+ }
+
+ } catch (IOException e) {
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ public void close(String dbName) {
+ log("-- END:"+dbName+" --");
+ //System.out.println("["+dbName.toUpperCase()+"]-->close");
+ SimpleLoggerHistoric slh = getLogger(dbName);
+ try {
+ if (slh != null)
+ slh.close();
+ removeLogger(dbName);
+
+ if (m_loggerWorkflow.size() == 0)
+ close();
+
+ } catch (IOException e) {
+ System.err.println(e.getLocalizedMessage());
+ }
+ }
+
+ public void open() throws IOException {
+ if (logBuffWriter == null) {
+ File file = new File(fileNameGeneralLog);
+ logBuffWriter = new BufferedWriter (new FileWriter(file,true));
+ }
+ }
+
+ public String getFileNameGeneralLog() {
+ return fileNameGeneralLog;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajSession.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajSession.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/BiomajSession.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,87 @@
+package org.inria.biomaj.singleton;
+
+import java.util.Hashtable;
+import java.util.Set;
+
+import org.inria.biomaj.session.bank.Bank;
+import org.inria.biomaj.utils.BiomajException;
+
+/**
+ * <p>
+ * Classe de type Singleton permettant de donner des informations sur la Session.
+ *
+ * </p>
+ *
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajSession {
+
+ /**
+ * Implementation du singleton
+ */
+ private static BiomajSession uniqueInstance = null;
+
+ /**
+ * Association dbName/Bank object
+ */
+ private Hashtable<String, Bank > _banks;
+
+ private BiomajSession () {
+ _banks= new Hashtable<String, Bank>();
+ }
+
+ /**
+ * Methode pour manipuler les singleton
+ * @return
+ * @throws BiomajException
+ */
+ public static synchronized BiomajSession getInstance()
+ {
+ if(uniqueInstance==null)
+ {
+ uniqueInstance = new BiomajSession();
+ }
+ return uniqueInstance;
+ }
+
+
+ public synchronized void addBank(String dbName,Bank bank) throws BiomajException {
+ BiomajLogger.getInstance().log(dbName+"-BiomajSession:addBank");
+ if (_banks.containsKey(dbName))
+ throw new BiomajException("banksession.error.addbank",dbName);
+
+ if (bank == null)
+ throw new BiomajException("banksession.error.nullobject",dbName);
+
+ _banks.put(dbName, bank);
+ }
+
+ public synchronized Bank removeBank(String dbName) {
+ BiomajLogger.getInstance().log(dbName+"-BiomajSession:removeBank");
+ if (_banks.containsKey(dbName)){
+ return _banks.remove(dbName);
+ }
+ return null;
+ }
+
+
+ public Bank getBank(String dbName) throws BiomajException {
+ BiomajLogger.getInstance().log(dbName+"-BiomajSession:getBank-size:"+_banks.size());
+ if (! _banks.containsKey(dbName))
+ {
+ throw new BiomajException("banksession.error.getbank",dbName);
+ }
+
+ return _banks.get(dbName);
+ }
+
+ public String[] getListBank() {
+ Set<String> set = _banks.keySet() ;
+ String[] res = new String[set.toArray().length];
+ res = set.toArray(res);
+ return res;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/org.inria.biomaj.singleton.ucd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/org.inria.biomaj.singleton.ucd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/org.inria.biomaj.singleton.ucd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="org.inria.biomaj.singleton" metadata="uml2-1.0" initialized="true" tag="5" key="32303036313030332062696F6D616A5F646576">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="BiomajInformation" location="50,50" size="412,749" id="org.inria.biomaj.singleton/BiomajInformation" runTimeClassModel="BiomajInformation(),addLineToSection(Ljava.lang.String;Ljava.util.Hashtable;),getUncompressedOptionWithFile(Ljava.lang.String;Ljava.lang.String;),tMPDIR,load(Ljava.io.InputStream;),wGET,getInstance(),sTATEFILESDIR,lOG_FLAG,oPTION_DECOMP,which(Ljava.lang.String;),addSection(Ljava.lang.String;),lOGDIR,wORKFLOWSDIR,dIRECTORIES_SECTION,bIN_CASE,lOGBIOMAJDIR,oPTION_OUTPUT,checkSections(),aPPLICATIONS_SECTION,rSYNC,getSection(Ljava.lang.String;),dEBUG,oPTION_TEST,checkProperty(),_sections,getProperty(Ljava.lang.String;Ljava.lang.String;),pROCESSDIR,lIST_BIN_UNCOMPRESS,eNGINE_SECTION,getProperty(Ljava.lang.String;),getUncompressedName(Ljava.lang.String;),wEBREPORTDIR,uniqueInstance,oPTION_BIN">
+ <children xsi:type="editmodel:CompartmentEditModel" size="185,399">
+ <children xsi:type="editmodel:AttributeEditModel" name="_sections" id="java.util/Hashtable at _sections+org.inria.biomaj.singleton/BiomajInformation@|java.util/Hashtable#_sections"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="aPPLICATIONS_SECTION" id="org.inria.biomaj.singleton/BiomajInformation#aPPLICATIONS_SECTION"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="bIN_CASE" id="org.inria.biomaj.singleton/BiomajInformation#bIN_CASE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dEBUG" id="org.inria.biomaj.singleton/BiomajInformation#dEBUG"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="dIRECTORIES_SECTION" id="org.inria.biomaj.singleton/BiomajInformation#dIRECTORIES_SECTION"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="eNGINE_SECTION" id="org.inria.biomaj.singleton/BiomajInformation#eNGINE_SECTION"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lIST_BIN_UNCOMPRESS" id="org.inria.biomaj.singleton/BiomajInformation#lIST_BIN_UNCOMPRESS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOGBIOMAJDIR" id="org.inria.biomaj.singleton/BiomajInformation#lOGBIOMAJDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOGDIR" id="org.inria.biomaj.singleton/BiomajInformation#lOGDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOG_FLAG" id="org.inria.biomaj.singleton/BiomajInformation#lOG_FLAG"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="oPTION_BIN" id="org.inria.biomaj.singleton/BiomajInformation#oPTION_BIN"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="oPTION_DECOMP" id="org.inria.biomaj.singleton/BiomajInformation#oPTION_DECOMP"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="oPTION_OUTPUT" id="org.inria.biomaj.singleton/BiomajInformation#oPTION_OUTPUT"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="oPTION_TEST" id="org.inria.biomaj.singleton/BiomajInformation#oPTION_TEST"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="pROCESSDIR" id="org.inria.biomaj.singleton/BiomajInformation#pROCESSDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rSYNC" id="org.inria.biomaj.singleton/BiomajInformation#rSYNC"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="sTATEFILESDIR" id="org.inria.biomaj.singleton/BiomajInformation#sTATEFILESDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="tMPDIR" id="org.inria.biomaj.singleton/BiomajInformation#tMPDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uniqueInstance" id="org.inria.biomaj.singleton/BiomajInformation#uniqueInstance"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="wEBREPORTDIR" id="org.inria.biomaj.singleton/BiomajInformation#wEBREPORTDIR"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="wGET" id="org.inria.biomaj.singleton/BiomajInformation#wGET"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="wORKFLOWSDIR" id="org.inria.biomaj.singleton/BiomajInformation#wORKFLOWSDIR"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="389,247">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajInformation" id="org.inria.biomaj.singleton/BiomajInformation#BiomajInformation()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addLineToSection" id="org.inria.biomaj.singleton/BiomajInformation#addLineToSection(Ljava.lang.String;Ljava.util.Hashtable;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addSection" id="org.inria.biomaj.singleton/BiomajInformation#addSection(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="checkProperty" id="org.inria.biomaj.singleton/BiomajInformation#checkProperty()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="checkSections" id="org.inria.biomaj.singleton/BiomajInformation#checkSections()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getInstance" id="org.inria.biomaj.singleton/BiomajInformation#getInstance()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProperty" id="org.inria.biomaj.singleton/BiomajInformation#getProperty(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getProperty" id="org.inria.biomaj.singleton/BiomajInformation#getProperty(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSection" id="org.inria.biomaj.singleton/BiomajInformation#getSection(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUncompressedName" id="org.inria.biomaj.singleton/BiomajInformation#getUncompressedName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUncompressedOptionWithFile" id="org.inria.biomaj.singleton/BiomajInformation#getUncompressedOptionWithFile(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="load" id="org.inria.biomaj.singleton/BiomajInformation#load(Ljava.io.InputStream;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="which" id="org.inria.biomaj.singleton/BiomajInformation#which(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.4/@sourceConnections.0" name="BiomajLogger" location="530,50" size="480,445" id="org.inria.biomaj.singleton/BiomajLogger" runTimeClassModel="_instance,log(Ljava.lang.String;),initLogger(Ljava.lang.String;Ljava.lang.String;),available,removeLogger(Ljava.lang.String;),getInstance(),close(),logBuffWriter,bIOMAJLOG,BiomajLogger(),fileNameGeneralLog,close(Ljava.lang.String;),getFileNameGeneralLog(),open(),generate_log_flag,getLogger(Ljava.lang.String;),m_loggerWorkflow,log(Ljava.lang.Exception;),initLogger(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="157,114">
+ <children xsi:type="editmodel:AttributeEditModel" name="_instance" id="org.inria.biomaj.singleton/BiomajLogger#_instance"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="available" id="org.inria.biomaj.singleton/BiomajLogger#available"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="bIOMAJLOG" id="org.inria.biomaj.singleton/BiomajLogger#bIOMAJLOG"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="fileNameGeneralLog" id="org.inria.biomaj.singleton/BiomajLogger#fileNameGeneralLog"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="generate_log_flag" id="org.inria.biomaj.singleton/BiomajLogger#generate_log_flag"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="logBuffWriter" id="org.inria.biomaj.singleton/BiomajLogger#logBuffWriter"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="m_loggerWorkflow" id="java.util/HashMap at m_loggerWorkflow+org.inria.biomaj.singleton/BiomajLogger@|java.util/HashMap#m_loggerWorkflow"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="457,228">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajLogger" id="org.inria.biomaj.singleton/BiomajLogger#BiomajLogger()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="close" id="org.inria.biomaj.singleton/BiomajLogger#close()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="close" id="org.inria.biomaj.singleton/BiomajLogger#close(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getFileNameGeneralLog" id="org.inria.biomaj.singleton/BiomajLogger#getFileNameGeneralLog()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getInstance" id="org.inria.biomaj.singleton/BiomajLogger#getInstance()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogger" id="org.inria.biomaj.singleton/BiomajLogger#getLogger(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initLogger" id="org.inria.biomaj.singleton/BiomajLogger#initLogger(Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="initLogger" id="org.inria.biomaj.singleton/BiomajLogger#initLogger(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.singleton/BiomajLogger#log(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="log" id="org.inria.biomaj.singleton/BiomajLogger#log(Ljava.lang.Exception;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="open" id="org.inria.biomaj.singleton/BiomajLogger#open()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeLogger" id="org.inria.biomaj.singleton/BiomajLogger#removeLogger(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0" name="BiomajSession" location="1090,50" size="251,236" id="org.inria.biomaj.singleton/BiomajSession" runTimeClassModel="BiomajSession(),getBank(Ljava.lang.String;),addBank(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;),removeBank(Ljava.lang.String;),_banks,getListBank(),getInstance(),uniqueInstance">
+ <children xsi:type="editmodel:CompartmentEditModel" size="166,19">
+ <children xsi:type="editmodel:AttributeEditModel" name="_banks" id="java.util/Hashtable at _banks+org.inria.biomaj.singleton/BiomajSession@|java.util/Hashtable#_banks"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uniqueInstance" id="org.inria.biomaj.singleton/BiomajSession#uniqueInstance"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="228,114">
+ <children xsi:type="editmodel:MethodEditModel" name="BiomajSession" id="org.inria.biomaj.singleton/BiomajSession#BiomajSession()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addBank" id="org.inria.biomaj.singleton/BiomajSession#addBank(Ljava.lang.String;Lorg.inria.biomaj.session.bank.Bank;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getBank" id="org.inria.biomaj.singleton/BiomajSession#getBank(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getInstance" id="org.inria.biomaj.singleton/BiomajSession#getInstance()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getListBank" id="org.inria.biomaj.singleton/BiomajSession#getListBank()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="removeBank" id="org.inria.biomaj.singleton/BiomajSession#removeBank(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="515,655" size="401,44" fontInfo="Arial-8-0" note="Singleton pour recuperer les information du fichier general.conf : 
localisation des repertoires utilisé par biomaj, binaire d'extraction.">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.3" target="//@children.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="160,22" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="412,627"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="990,550" size="201,27" fontInfo="Arial-8-0" note="Singleton pour la gestion des logs">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.4" target="//@children.1" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="9,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="469,440"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1215,369" size="276,27" fontInfo="Arial-8-0" note="Singleton pour la recuperation de la session en cours">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="62,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="187,236"/>
+ </sourceConnections>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/singleton/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Singleton classes to used by the application : General information, bank object to map, Application logs.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/CreateDB.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/CreateDB.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/CreateDB.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,19 @@
+package org.inria.biomaj.sql;
+
+import org.inria.biomaj.sql.SQLConnection;
+
+
+/**
+ * Class that creates the database.
+ *
+ * @author rsabas
+ *
+ */
+public class CreateDB {
+
+ public static void main(String[] args) {
+ SQLConnection conn = SQLConnectionFactory.getConnection();
+ conn.createDB();
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,222 @@
+package org.inria.biomaj.sql;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.dbcp.BasicDataSource;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajUtils;
+
+
+/**
+ * HSQLDB implementation of an SQLConnection.
+ *
+ * @author rsabas
+ *
+ */
+public class HSQLDBConnection implements SQLConnection {
+
+ /**
+ * Directory where the database is stored.
+ */
+ private String dbPath;
+
+ private String url;
+ private String login;
+ private String passwd;
+ private String driver;
+
+
+ /**
+ * Poolable datasource map that provides the connections.
+ * One datasource per database.
+ */
+ private static Map<String, BasicDataSource> dataSources = new HashMap<String, BasicDataSource>();
+
+ private static BiomajLogger logger = BiomajLogger.getInstance();
+
+
+ public HSQLDBConnection() {
+ dbPath = BiomajUtils.getBiomajRootDirectory() + "/" + SQL_DIR;
+ initConnection();
+// try {
+// dbPath = BiomajUtils.getBiomajRootDirectory() + "/" + SQL_DIR;
+// Class.forName("org.hsqldb.jdbcDriver").newInstance();
+// } catch (ClassNotFoundException e) {
+// e.printStackTrace();
+// } catch (InstantiationException e) {
+// e.printStackTrace();
+// } catch (IllegalAccessException e) {
+// e.printStackTrace();
+// }
+ }
+
+ private void initConnection() {
+
+ Properties props = SQLConnectionFactory.loadProperties();
+
+ url = props.getProperty(BiomajConst.databaseUrl);
+ login = props.getProperty(BiomajConst.databaseLogin);
+ passwd = props.getProperty(BiomajConst.databasePassword);
+ driver = props.getProperty(BiomajConst.databaseDriver);
+ }
+
+ private Connection getConnection() {
+ BasicDataSource bds;
+ if ((bds = dataSources.get(url)) == null) {
+ bds = new BasicDataSource();
+ bds.setDriverClassName(driver);
+ bds.setUsername(login);
+ bds.setPassword(passwd);
+ bds.setUrl(url);
+ bds.setValidationQuery("select 1 from INFORMATION_SCHEMA.SYSTEM_USERS");
+
+ dataSources.put(url, bds);
+ }
+
+ try {
+ logger.log("===> " + bds.getNumActive() + " active connections // " + bds.getNumIdle() + " idle connections");
+ return bds.getConnection();
+ } catch (SQLException e) {
+ System.err.println("No connection could be established. Please check that the server is started" +
+ " and that the connection parameters are correct.");
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ @Override
+ public Statement getStatement() {
+ try {
+ return getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean createDB() {
+ Statement statement = getStatement();
+ try {
+ String fileName = dbPath + "/hsql.sql";
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(fileName));
+ String line = "";
+ StringBuilder sb = new StringBuilder();
+ while ((line = br.readLine()) != null) {
+ if (!line.trim().isEmpty() && !line.startsWith("--")) {
+ sb.append(line);
+ if (line.endsWith(";")) {
+// statement.addBatch(sb.toString());
+ statement.executeUpdate(sb.toString());
+
+ sb = new StringBuilder();
+ }
+// statement.executeUpdate(line);
+ }
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(statement);
+// statement.executeBatch();
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(statement);
+ e.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public synchronized long getLastInsertedId() {
+ long id = -1;
+ Statement st = getStatement();
+ try {
+ ResultSet rs = executeQuery("CALL identity()", st);
+ rs.next();
+ id = Long.valueOf(rs.getObject(1).toString());
+ } catch (SQLException e) {
+ e.printStackTrace();
+ } catch (NumberFormatException e) {
+ System.err.println("Invalid id : NaN");
+ }
+
+ SQLConnectionFactory.closeConnection(st);
+ return id;
+ }
+
+ @Override
+ public ResultSet executeQuery(String query, Statement stat) {
+
+ long start = new Date().getTime();
+ try {
+ ResultSet rs = stat.executeQuery(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return rs;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return null;
+ }
+
+ @Override
+ public int executeUpdate(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return res;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+ @Override
+ public int executeUpdateAndGetGeneratedKey(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query, Statement.RETURN_GENERATED_KEYS);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ if (res > 0) {
+ ResultSet rs = stat.getGeneratedKeys();
+ rs.next();
+ return rs.getInt(1);
+ }
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/MySQLConnection.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/MySQLConnection.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/MySQLConnection.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,156 @@
+package org.inria.biomaj.sql;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.dbcp.BasicDataSource;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+
+public class MySQLConnection implements SQLConnection {
+
+ private static Map<String, BasicDataSource> dataSources = new HashMap<String, BasicDataSource>();
+ private static BiomajLogger logger = BiomajLogger.getInstance();
+
+ private String url;
+ private String login;
+ private String passwd;
+ private String driver;
+
+ public MySQLConnection() {
+ initConnection();
+ }
+
+
+ private void initConnection() {
+
+ Properties props = SQLConnectionFactory.loadProperties();
+
+ url = props.getProperty(BiomajConst.databaseUrl);
+ login = props.getProperty(BiomajConst.databaseLogin);
+ passwd = props.getProperty(BiomajConst.databasePassword);
+ driver = props.getProperty(BiomajConst.databaseDriver);
+ }
+
+ private Connection getConnection() {
+ BasicDataSource bds;
+ if ((bds = dataSources.get(url)) == null) {
+ bds = new BasicDataSource();
+ bds.setDriverClassName(driver);
+ bds.setUsername(login);
+ bds.setPassword(passwd);
+ bds.setUrl(url);
+ bds.setValidationQuery("SELECT 1");
+
+ dataSources.put(url, bds);
+ }
+
+ try {
+ logger.log("===> " + bds.getNumActive() + " active connections // " + bds.getNumIdle() + " idle connections");
+ return bds.getConnection();
+ } catch (SQLException e) {
+ System.err.println("No connection could be established. Please check that the server is started" +
+ " and that the connection parameters are correct.");
+ return null;
+ }
+ }
+
+ @Override
+ public boolean createDB() {
+ /*
+ * Creation is left to the user.
+ * The script is available in sql directory.
+ */
+ return false;
+ }
+
+ @Override
+ public Statement getStatement() {
+ try {
+ return getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ }
+
+ @Override
+ public synchronized long getLastInsertedId() {
+ long id = 0;
+ Statement st = getStatement();
+ try {
+ ResultSet rs = executeQuery("SELECT LAST_INSERT_ID()", st);
+ rs.next();
+ id = Long.valueOf(rs.getObject(1).toString());
+ } catch (SQLException e) {
+ e.printStackTrace();
+ } catch (NumberFormatException e) {
+ System.err.println("Invalid id : NaN");
+ }
+
+ SQLConnectionFactory.closeConnection(st);
+ return id;
+ }
+
+ @Override
+ public ResultSet executeQuery(String query, Statement stat) {
+
+ long start = new Date().getTime();
+ try {
+ ResultSet rs = stat.executeQuery(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return rs;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return null;
+ }
+
+ @Override
+ public int executeUpdate(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return res;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+
+ @Override
+ public int executeUpdateAndGetGeneratedKey(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query, Statement.RETURN_GENERATED_KEYS);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ if (res > 0) {
+ ResultSet rs = stat.getGeneratedKeys();
+ rs.next();
+ return rs.getInt(1);
+ }
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnection.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnection.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnection.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,69 @@
+package org.inria.biomaj.sql;
+
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+
+/**
+ * Interface that provides methods to access a databdase.
+ *
+ * @author rsabas
+ *
+ */
+public interface SQLConnection {
+
+ public static final String SQL_DIR = "sql";
+ public static final String DB_NAME = "biomaj_log";
+
+ /**
+ * Execute the given (SELECT) query through the given statement (and logs stuff).
+ *
+ * @param query
+ * @param stat
+ * @return ResultSet that holds the result of the query
+ */
+ public ResultSet executeQuery(String query, Statement stat);
+
+
+ /**
+ * Execute the given (NON SELECT) query through the given statement (and logs stuff).
+ *
+ * @param query
+ * @param stat
+ * @return Number of updated lines.
+ */
+ public int executeUpdate(String query, Statement stat);
+
+ /**
+ * Creates the database.
+ * This method should be called only if you want to reset the database.
+ *
+ * @return success ?
+ */
+ public boolean createDB();
+
+ /**
+ * Creates a connection to the db and return a statement object attached to it.
+ *
+ * @return Created statement
+ */
+ public Statement getStatement();
+
+
+ /**
+ * Returns the id of the latest inserted row.
+ *
+ * @return latest id
+ */
+ public long getLastInsertedId();
+
+ /**
+ * Execute update statement and return the generated id.
+ *
+ * @param query
+ * @param stat
+ * @return generated id
+ */
+ int executeUpdateAndGetGeneratedKey(String query, Statement stat);
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnectionFactory.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnectionFactory.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/SQLConnectionFactory.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,163 @@
+package org.inria.biomaj.sql;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajConst;
+import org.inria.biomaj.utils.BiomajException;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Factory for the creation of SQL connections to a database.
+ *
+ * @author rsabas
+ *
+ */
+public class SQLConnectionFactory {
+
+ public static final String HSQLDB_CONNECTION = "HSQLDB";
+ public static final String MYSQL_CONNECTION = "MYSQL";
+
+ private static Properties dbProps = null;
+ private static SQLConnection connection = null;
+ private static boolean testMode = false;
+
+ /**
+ * Returns a connection to a database as configured
+ * in global.properties file.
+ *
+ * @return connection
+ */
+ public static SQLConnection getConnection() {
+
+ if (connection == null) {
+ if (testMode)
+ connection = new TestConnection();
+ else {
+ loadProperties();
+
+ String type = dbProps.getProperty(BiomajConst.databaseType);
+
+ if (type.equalsIgnoreCase(HSQLDB_CONNECTION)) {
+ connection = new HSQLDBConnection();
+ } else if (type.equalsIgnoreCase(MYSQL_CONNECTION))
+ connection = new MySQLConnection();
+ else
+ return null;
+ }
+ }
+
+ return connection;
+ }
+
+ protected static Properties loadProperties() {
+ if (dbProps == null) {
+ dbProps = new Properties();
+ FileReader fr;
+ try {
+ fr = new FileReader(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR) + "/" + BiomajConst.globalProperties);
+ dbProps.load(fr);
+ fr.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return dbProps;
+ }
+
+ public static String getDBType() {
+ Properties props = loadProperties();
+ String type = props.getProperty(BiomajConst.databaseType);
+ if (type.equalsIgnoreCase(HSQLDB_CONNECTION))
+ return HSQLDB_CONNECTION;
+ else if (type.equalsIgnoreCase(MYSQL_CONNECTION))
+ return MYSQL_CONNECTION;
+ else
+ return null;
+ }
+
+ /**
+ * Closes a statement and the connection attached to it.
+ *
+ * @param st
+ */
+ public static void closeConnection(Statement st) {
+ try {
+ Connection cnt = st.getConnection();
+ st.close();
+ if (cnt != null && !cnt.isClosed())
+ cnt.close();
+ } catch (SQLException ex) {
+ BiomajLogger.getInstance().log(ex);
+ ex.printStackTrace();
+ } finally {
+ if (st != null)
+ st = null;
+ }
+ }
+
+ /**
+ * Returns a connection to a standalone in memory HSQLDB database that is
+ * used for testing purpose.
+ *
+ * @return
+ */
+ public static Connection getTestConnection() {
+ Connection cnt = null;
+ try {
+ cnt = DriverManager.getConnection("jdbc:hsql:mem:testdb", "sa", "");
+ Statement statement = cnt.createStatement();
+
+ /*
+ * Creation of the database
+ */
+ String fileName = BiomajUtils.getBiomajRootDirectory() + "/sql/hsql.sql";
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(fileName));
+ String line = "";
+ StringBuilder sb = new StringBuilder();
+ while ((line = br.readLine()) != null) {
+ if (!line.trim().isEmpty() && !line.startsWith("--")) {
+ sb.append(line);
+ if (line.endsWith(";")) {
+ statement.executeUpdate(sb.toString());
+ sb = new StringBuilder();
+ }
+ }
+ }
+ br.close();
+ statement.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ } catch (SQLException e) {
+ System.err.println("Could not establish connection to test database.");
+ e.printStackTrace();
+ }
+
+ return cnt;
+ }
+
+ public static boolean isTestMode() {
+ return testMode;
+ }
+
+ public static void setTestMode(boolean t) {
+ testMode = t;
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/ShutdownHSQLDB.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/ShutdownHSQLDB.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/ShutdownHSQLDB.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,53 @@
+package org.inria.biomaj.sql;
+
+import java.sql.Statement;
+
+
+/**
+ * Properly shuts down the hsql server by
+ * issuing the sql query "SHUTDOWN".
+ *
+ * @author rsabas
+ *
+ */
+public class ShutdownHSQLDB {
+
+ public static void main(String[] args) {
+ HSQLDBConnection conn = new HSQLDBConnection();
+ System.out.println("Shutting down database...");
+
+ Statement stat = conn.getStatement();
+ conn.executeUpdate("SHUTDOWN", stat);
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+// /**
+// *
+// * Shutdowns the database and modify the script
+// * file to modify the tables type (memory or cached)
+// * for the next startup.
+// *
+// * @param tableType new table type
+// */
+// private static void shutdownSpecial(String tableType, SQLConnection conn) {
+// String oldType = tableType.equals("MEMORY") ? "CACHED" : "MEMORY";
+// conn.executeQuery("SHUTDOWN SCRIPT", false);
+// try {
+// String path = BiomajUtils.getBiomajRootDirectory() + "/sql";
+// BufferedReader br = new BufferedReader(new FileReader(path + "/biomaj_log.script"));
+// PrintWriter pw = new PrintWriter(new File(path + "/biomaj_log2.script"));
+// String line = "";
+// while ((line = br.readLine()) != null) {
+// pw.println(line.replaceAll("CREATE " + oldType + " TABLE", "CREATE " + tableType + " TABLE"));
+// }
+// pw.close();
+// br.close();
+// new File(path + "/biomaj_log.script").delete();
+// new File(path + "/biomaj_log2.script").renameTo(new File(path + "/biomaj_log.script"));
+// } catch (FileNotFoundException e) {
+// e.printStackTrace();
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+// }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,205 @@
+package org.inria.biomaj.sql;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.dbcp.BasicDataSource;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.inria.biomaj.utils.BiomajUtils;
+
+/**
+ * Class that maps a connection to a standalone in memory HSQL database
+ * that is used for testing purpose.
+ *
+ * @author rsabas
+ *
+ */
+public class TestConnection implements SQLConnection {
+
+ /**
+ * Directory where the database is stored.
+ */
+ private String dbPath;
+
+ private String url;
+ private String login;
+ private String passwd;
+ private String driver;
+
+
+ /**
+ * Poolable datasource map that provides the connections.
+ * One datasource per database.
+ */
+ private static Map<String, BasicDataSource> dataSources = new HashMap<String, BasicDataSource>();
+
+ private static BiomajLogger logger = BiomajLogger.getInstance();
+
+ public TestConnection() {
+ dbPath = BiomajUtils.getBiomajRootDirectory() + "/" + SQL_DIR;
+
+ url = "jdbc:hsqldb:mem:testdb";
+ login = "sa";
+ passwd = "";
+ driver = "org.hsqldb.jdbcDriver";
+
+ createDB();
+ }
+
+ private Connection getConnection() {
+ BasicDataSource bds;
+ if ((bds = dataSources.get(url)) == null) {
+ bds = new BasicDataSource();
+ bds.setDriverClassName(driver);
+ bds.setUsername(login);
+ bds.setPassword(passwd);
+ bds.setUrl(url);
+ bds.setValidationQuery("select 1 from INFORMATION_SCHEMA.SYSTEM_USERS");
+
+ dataSources.put(url, bds);
+ }
+
+ try {
+ logger.log("===> " + bds.getNumActive() + " active connections // " + bds.getNumIdle() + " idle connections");
+ return bds.getConnection();
+ } catch (SQLException e) {
+ System.err.println("No connection could be established. Please check that the server is started" +
+ " and that the connection parameters are correct.");
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ @Override
+ public Statement getStatement() {
+ try {
+ return getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean createDB() {
+ Statement statement = getStatement();
+ try {
+ String fileName = dbPath + "/hsql.sql";
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(fileName));
+ String line = "";
+ StringBuilder sb = new StringBuilder();
+ while ((line = br.readLine()) != null) {
+ if (!line.trim().isEmpty() && !line.startsWith("--")) {
+ sb.append(line);
+ if (line.endsWith(";")) {
+// statement.addBatch(sb.toString());
+ statement.executeUpdate(sb.toString());
+
+ sb = new StringBuilder();
+ }
+// statement.executeUpdate(line);
+ }
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ SQLConnectionFactory.closeConnection(statement);
+// statement.executeBatch();
+ } catch (SQLException e) {
+ SQLConnectionFactory.closeConnection(statement);
+ e.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public synchronized long getLastInsertedId() {
+ long id = -1;
+ Statement st = getStatement();
+ try {
+ ResultSet rs = executeQuery("CALL identity()", st);
+ rs.next();
+ id = Long.valueOf(rs.getObject(1).toString());
+ } catch (SQLException e) {
+ e.printStackTrace();
+ } catch (NumberFormatException e) {
+ System.err.println("Invalid id : NaN");
+ }
+
+ SQLConnectionFactory.closeConnection(st);
+ return id;
+ }
+
+ @Override
+ public ResultSet executeQuery(String query, Statement stat) {
+
+ long start = new Date().getTime();
+ try {
+ ResultSet rs = stat.executeQuery(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return rs;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return null;
+ }
+
+ @Override
+ public int executeUpdate(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ return res;
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+ @Override
+ public int executeUpdateAndGetGeneratedKey(String query, Statement stat) {
+ long start = new Date().getTime();
+ try {
+ int res = stat.executeUpdate(query, Statement.RETURN_GENERATED_KEYS);
+ logger.log((new Date().getTime() - start) + "ms : " + query);
+ if (res > 0) {
+ ResultSet rs = stat.getGeneratedKeys();
+ rs.next();
+ return rs.getInt(1);
+ }
+ } catch (SQLException e) {
+ logger.log(e);
+ e.printStackTrace();
+ if (e.getMessage().contains("Connection is closed"))
+ System.exit(1);
+ }
+ return -1;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test/TestSQLConnection.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test/TestSQLConnection.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/sql/test/TestSQLConnection.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,116 @@
+package org.inria.biomaj.sql.test;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.inria.biomaj.sql.SQLConnection;
+import org.inria.biomaj.sql.SQLConnectionFactory;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ * Test class for the database connectivity.
+ *
+ * @author rsabas
+ *
+ */
+public class TestSQLConnection {
+
+ private static SQLConnection toTest;
+ private static List<String> _tables = null;
+
+ @BeforeClass
+ public static void connect() {
+ toTest = SQLConnectionFactory.getConnection();
+
+ _tables = new ArrayList<String>();
+ _tables.add("bank");
+ _tables.add("configuration");
+ _tables.add("remoteinfo");
+ _tables.add("localinfo");
+ _tables.add("updatebank");
+ _tables.add("session");
+ _tables.add("sessiontask");
+ _tables.add("session_has_sessiontask");
+ _tables.add("session_has_message");
+ _tables.add("sessiontask_has_message");
+ _tables.add("sessiontask_has_file");
+ _tables.add("metaprocess");
+ _tables.add("process");
+ _tables.add("file");
+ _tables.add("message");
+ _tables.add("productiondirectory");
+ _tables.add("metaprocess_has_message");
+ _tables.add("process_has_message");
+ }
+
+ private void testCreateDb() {
+ try {
+ /*
+ * Checking how many tables have been created
+ */
+ Connection conn = toTest.getStatement().getConnection();
+ DatabaseMetaData meta = conn.getMetaData();
+
+ // All tables
+ ResultSet tables = meta.getTables(conn.getCatalog(), null, "%", null);
+ int total = 0;
+ while (tables.next()) {
+ if (_tables.contains(tables.getString(3).toLowerCase()))
+ total++;
+ }
+
+ // User tables = all - system
+ assertEquals(18, total);
+
+ conn.close();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void runTests() {
+ testCreateDb();
+ String testMessage = "test message";
+ int testType = 12;
+ long id = 0;
+
+ /*
+ * INSERT of 1 row
+ */
+ String query = "INSERT INTO message(message, type) values('" + testMessage + "', " + testType + ");";
+ Statement stat = toTest.getStatement();
+ id = toTest.executeUpdateAndGetGeneratedKey(query, stat);
+
+ /*
+ * Retrieving the inserted row
+ */
+ query = "SELECT * from message where idmessage=" + id;
+
+ try {
+ ResultSet result = toTest.executeQuery(query, stat);
+ assertTrue(result.next());
+ assertEquals(testMessage, result.getString(2)); // Same message
+ assertEquals(testType, result.getInt(3)); // Same type
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ /*
+ * Deleting the inserted row
+ */
+ query = "DELETE FROM message where idmessage = " + id + ";";
+ assertEquals(1, toTest.executeUpdate(query, stat)); // 1 row deleted
+
+
+ SQLConnectionFactory.closeConnection(stat);
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajBuildException.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajBuildException.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajBuildException.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,206 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.inria.biomaj.singleton.BiomajLogger;
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajBuildException extends BuildException {
+
+ private static final long serialVersionUID = 1L;
+
+ private static BiomajMessages bmes = new BiomajMessages();
+
+ public BiomajBuildException(Project p,Throwable t) {
+ String message = bmes.getMessageFromIndex("unknown.error");
+
+ if (message == null)
+ errorIndexDefinition(p,"unknown.error");
+ else
+ {
+ String[] vs = new String[1];
+ vs[0] = t.getMessage();
+ BiomajLogger.getInstance().log(getMessageWithValue(message,vs));
+ p.log(getMessageWithValue(message,vs),Project.MSG_ERR);
+ }
+
+ printForDebuggingException(p,t);
+ }
+
+ public BiomajBuildException(Project p,String index_mess_property,Exception e) {
+ String message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(p,index_mess_property);
+ else
+ {
+ BiomajLogger.getInstance().log(message);
+ p.log(message,Project.MSG_ERR);
+ }
+ printForDebuggingException(p,e);
+ }
+
+ public BiomajBuildException(Project p,String index_mess_property,String[] values,Exception e) {
+ String message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(p,index_mess_property);
+ else
+ {
+ BiomajLogger.getInstance().log(getMessageWithValue(message,values));
+ p.log(getMessageWithValue(message,values),Project.MSG_ERR);
+ }
+ printForDebuggingException(p,e);
+ }
+
+ public BiomajBuildException(Project p,String index_mess_property,String v0,Exception e) {
+ String message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(p,index_mess_property);
+ else
+ {
+ String[] vs = new String[1];
+ vs[0] = v0;
+ BiomajLogger.getInstance().log(getMessageWithValue(message,vs));
+ p.log(getMessageWithValue(message,vs),Project.MSG_ERR);
+ }
+ printForDebuggingException(p,e);
+
+ }
+
+ public BiomajBuildException(Project p,String index_mess_property,String v0, String v1,Exception e) {
+ String message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(p,index_mess_property);
+ else
+ {
+ String[] vs = new String[2];
+ vs[0] = v0;
+ vs[1] = v1;
+ BiomajLogger.getInstance().log(getMessageWithValue(message,vs));
+ p.log(getMessageWithValue(message,vs),Project.MSG_ERR);
+ }
+ printForDebuggingException(p,e);
+ }
+
+ public BiomajBuildException(Project p,String index_mess_property,String v0, String v1,String v2,Exception e) {
+ String message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(p,index_mess_property);
+ else
+ {
+ String[] vs = new String[3];
+ vs[0] = v0;
+ vs[1] = v1;
+ vs[2] = v2;
+ BiomajLogger.getInstance().log(getMessageWithValue(message,vs));
+ p.log(getMessageWithValue(message,vs),Project.MSG_ERR);
+ }
+ printForDebuggingException(p,e);
+ }
+
+ public BiomajBuildException(Project p,Exception ex) {
+ if (ex==null)
+ {
+ if (p !=null)
+ p.log("biomaj stop", Project.MSG_ERR);
+ return;
+ }
+ if (p==null) {
+ BiomajLogger.getInstance().log(ex.getMessage());
+ return;
+ }
+
+ try {
+ p.log(ex.getMessage(),Project.MSG_ERR);
+ printForDebuggingException(p,ex);
+ } catch (NullPointerException n) {
+ //rien, ca peut que le log soit en vrac
+ }
+ }
+
+ private void errorIndexDefinition(Project p,String index) {
+ p.log("******** DEVL ERROR : index message:"+index+" not defined ! *************",Project.MSG_ERR);
+ }
+
+
+ protected String getMessageWithValue(String message,String[] v) {
+
+ String newMess=message;
+
+ for (int i=0;(i<v.length);i++) {
+ String valToReplace = "$"+Integer.toString(i) ;
+ newMess = newMess.replace(valToReplace,v[i]);
+ }
+ return newMess;
+ }
+
+ protected void printForDebuggingException(Project p,Throwable e) {
+ try {
+ if (e != null) {
+ StackTraceElement[] l = e.getStackTrace();
+ for (StackTraceElement i : l) {
+ p.log(" "+i.toString(),Project.MSG_VERBOSE);
+ }
+ if (e.getMessage()!=null)
+ p.log(" "+e.getMessage(),Project.MSG_VERBOSE);
+ if (e.getLocalizedMessage()!=null)
+ p.log(" "+getLocalizedMessage(),Project.MSG_VERBOSE);
+
+ } else {
+ p.log(" Exception launched by biomaj.... ",Project.MSG_DEBUG);
+ }
+ } catch (NullPointerException n) {
+ //rien, ca peut que le log soit en vrac
+ }
+
+ }
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajConst.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajConst.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajConst.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,331 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+public class BiomajConst {
+
+ /**
+ * General.conf
+ */
+ public final static String nameGeneralConf = "general.conf";
+
+ /**
+ * Biomaj project directory
+ */
+
+ public final static String workflowXmlDirectory = "/workflows/";
+
+ /**
+ * Property File
+ *
+ */
+ public final static String tmpLockDirectory = "tmp";
+
+ public final static String globalProperties= "global.properties";
+ /**
+ * Biomaj directory
+ */
+ public final static String tmpDirectoryProperty = "tmp.dir";
+
+
+ public final static String propertiesDirectoryProperty = "dbprop.dir";
+
+ public final static String futureReleaseLink = "future_release";
+ public final static String currentLink = "current";
+ // Repertoire temporaire dans lequel on deplace les fichiers pour provoquer la mise
+ // Ã jour de la banque avec l'option --fromscratch
+ public final static String tmpMoveDir = "tmpmove";
+
+ public final static String extensionVar = ".var";
+ public final static String runtimeDirectoryProperty = "runtime.dir";
+ /**
+ * Xml Description Workflow
+ */
+
+ public final static String mirrorXmlFile = "mirror.xml";
+ public final static String processXmlFile = "handle_process.xml";
+ /**
+ * Ant Script Const : Project Name, Target, Task name,...
+ */
+ public final static String mirrorProject = "mirror";
+ public final static String handleProcessProject= "handle_process";
+ public final static String initMirrorTarget = "init";
+ public final static String releaseTarget = "release";
+ public final static String downloadTarget = "download";
+ public final static String extractTarget = "extract";
+ public final static String checkTarget = "check";
+ public final static String moveTarget = "move";
+ public final static String copyTarget = "copy";
+ public final static String deployTarget = "deployment";
+
+ public final static String processTarget = "execute_process_sequentialy";
+ public final static String postprocessTarget = "postprocess";
+ public final static String preprocessTarget = "preprocess";
+ public final static String removeprocessTarget = "removeprocess";
+
+
+ public final static String buildProject = "citrina";
+ public final static String callMirrorTarget = "call-mirror";
+
+
+ /**
+ * Task Name
+ */
+ public final static String fileCheckTask = "filecheck";
+ public final static String releaseTask = "bmaj-release";
+ public final static String versionsmanagementTask = "bmaj-versionsmanagement";
+
+ /**
+ * XML Constantes
+ */
+ public final static String xsdBank = "./xslt/xmlSchemaState.xsd";
+ public final static String sessions = "sessions";
+ public final static String session = "session";
+ public final static String configuration = "configuration";
+ public final static String virtualListTag = "virtualBankList";
+ public final static String virtualBankTag = "virtualBank";
+
+ public final static String remoteInfoTag = "remoteInfos";
+ public final static String localInfoTag = "localInfos";
+
+ public final static String serverInfoTag = "serverInfo";
+ public final static String bankTag = "dbName";
+ public final static String protocolTag = "protocol";
+ public final static String typeBankTag = "dbType";
+ public final static String urlRemoteTag = "server";
+ public final static String fullNameTag = "dbFullname";
+
+ public final static String remoteDirTag = "remoteDir";
+
+ public final static String lastUpdateTag = "lastUpdate";
+ public final static String beginUpdateTag = "beginUpdate";
+
+ public final static String checkTag = "check";
+ public final static String downloadTag = "download";
+ public final static String extractTag = "extract";
+ public final static String moveTag = "makeRelease";
+ public final static String copyTag = "addLocalFiles";
+ public final static String preProcessTag = "preprocess";
+ public final static String postProcessTag = "postprocess";
+ public final static String removeProcessTag = "removeprocess";
+ public final static String deploymentTag = "deployment";
+
+ public final static String filesUpdatedTag = "filesUpdatedTag";
+ public final static String fileUpdatedTag = "fileUpdated";
+ public final static String bankSizeTag = "bankSize";
+ public final static String bankSizeZippedTag = "bankSizeZipped";
+ public final static String ellapsedTotalTimeTag = "elapsedTotalTime";
+ public final static String releaseTag = "release";
+ public final static String directoryProductionTag = "directory";
+
+
+ public final static String frequencyTag = "frequency";
+ public final static String logFileTag = "logfile";
+ public final static String doLinkCopyTag = "dolinkcopy";
+ public final static String releaseSearchTag = "releaseInfo";
+ public final static String remoteFilesTag = "remoteFiles";
+ public final static String remoteExcludedFilesTag = "remoteExcludedFiles";
+ public final static String localFilesTag = "localFiles";
+ public final static String nversionTag = "nversions";
+ public final static String stateTag = "state";
+
+ public final static String onlineDirectoryTag = "onlineDirectory";
+ public final static String offlineDirectoryTag = "offlineDirectory";
+ public final static String versionDirectoryTag = "versionDirectory";
+ public final static String currentVersionDirTag = "currentVersionDirName";
+ public final static String oldVersionDirTag = "oldVersionDirName";
+
+ public final static String treatmentsTag = "treatments";
+
+ /**
+ * Biomaj Var
+ */
+ public final static String daily = "daily";
+ public final static String weekly = "weekly";
+ public final static String monthly = "monthly";
+
+ public final static String PP_WARNING = "PP_WARNING";
+ public final static String PP_DEPENDENCE = "PP_DEPENDENCE";
+ public final static String PP_DEPENDENCE_VOLATILE = "PP_DEPENDENCE_VOLATILE";
+// -------------------------------------------------------------------------------------------------------------------
+
+ /**
+ * Internal Properties
+ */
+
+ public final static String noDefine = "noDefine";
+ public final static String noMirrorContext ="noMirrorContext";
+ public final static String newUpdateProperty ="new_update_prop";
+ public final static String countDownloadProperty ="countDownload";
+ public final static String countExtractProperty ="countExtract";
+ public final static String countLocalOnlineFileProperty ="countLocalOnline";
+ public final static String countLocalOfflineFileProperty ="countLocalOffline";
+
+ /**
+ * Global Properties
+ */
+ public final static String levelMaskProperty = "historic.logfile.level";
+ public final static String taskMaskProperty = "historic.logfile.task";
+ public final static String targetMaskProperty = "historic.logfile.target";
+ public final static String propertiesMaskProperty = "historic.logfile.properties";
+
+ public final static String mailSmtpHostProperty = "mail.smtp.host";
+ public final static String mailAdminProperty = "mail.admin";
+ public final static String mailFromProperty = "mail.from";
+
+ /**
+ * Proxy properties
+ */
+ /*
+ public final static String httpsProxyHost = "https.proxyHost";
+ public final static String httpsProxyPort = "https.proxyPort";
+ public final static String httpsProxyUser = "https.proxyUser";
+ public final static String httpsProxyPassword = "https.proxyPassword";
+ */
+ public final static String proxyHost = "proxyHost";
+ public final static String proxyPort = "proxyPort";
+ public final static String proxyUser = "proxyUser";
+ public final static String proxyPassword = "proxyPassword";
+
+
+ //-------------------------------------------------------------------------------------------------------------------
+ /**
+ * Bank Properties
+ */
+ public final static String includePropertiesProperty = "include.properties";
+ public final static String dbList = "db.list";
+ public final static String bankNumThreadProperty = "bank.num.threads";
+ public final static String filesNumThreadProperty = "files.num.threads";
+ public final static String productionDirChmodProperty = "production.directory.chmod";
+
+ public final static String databaseType = "database.type";
+ public final static String databaseUrl = "database.url";
+ public final static String databaseLogin = "database.login";
+ public final static String databasePassword = "database.password";
+ public final static String databaseDriver = "database.driver";
+ public final static String databaseTest = "database.test";
+
+ public final static String dbNameProperty = "db.name";
+ public final static String frequencyProperty = "frequency.update";
+ public final static String dbFullNameProperty = "db.fullname";
+ public final static String protocolProperty = "protocol";
+ public final static String serverProperty = "server";
+ public final static String typeProperty = "db.type";
+ public final static String virtualListProperty = "virtual.list";
+ public final static String dependsListProperty = "db.source";
+ public final static String portProperty = "port";
+
+ public final static String userNameProperty = "username";
+ public final static String passwordProperty = "password";
+ public final static String remoteDirProperty = "remote.dir";
+ public final static String remoteFilesProperty = "remote.files";
+ public final static String remoteExcludedFilesProperty = "remote.excluded.files";
+ public final static String dataDirProperty = "data.dir";
+ public final static String logDirProperty = "log.dir";
+ public final static String stateFileDirProperty = "statefiles.dir";
+ public final static String onlineDirDynamicProperty = "online.dir";
+ public final static String offlineDirProperty = "offline.dir.name";
+ public final static String versionDirProperty = "dir.version";
+ public final static String localFilesProperty = "local.files";
+ public final static String localFilesExcludedProperty = "local.files.excluded";
+
+ public final static String releaseFileProperty = "release.file";
+ public final static String releaseRegExpProperty = "release.regexp";
+ public final static String releaseResultProperty = "remote.release";
+ public final static String keepOldVersionProperty= "keep.old.version";
+ public final static String treeLevelProperty = "tree.level";
+ public final static String restructModeProperty = "restructuration.mode";
+ public final static String copyModeProperty = "copy.mode";
+ public final static String linkOneProperty = "link1.dir";
+ public final static String linkTwoProperty = "link2.dir";
+
+ public final static String extractFilelistProperty = "extract.filelist";
+ public final static String optionWgetProperty = "wget.options";
+ public final static String noExtractProperty = "no.extract";
+ public final static String doLinkProperty = "do.link.copy";
+ public final static String commandNumberProperty = "command.number.seq";
+ public final static String commandDateProperty = "command.date.seq";
+ public final static String dbPreProcessProperty = "db.pre.process";
+ public final static String dbPostProcessProperty = "db.post.process";
+ public final static String dbRemoveProcessProperty = "db.remove.process";
+ public final static String clOldVersionProperty = "clean.old.version";
+
+ public final static String filesDownloadNeedDynamicProperty = "files.download.needed";
+ public final static String filesExtractNeedDynamicProperty = "files.extract.needed";
+ public final static String filesCopyNeedDynamicProperty = "files.copy.needed";
+ public final static String remoteReleaseDynamicProperty = "remote.release";
+ public final static String removedReleaseProperty = "removed.release";
+ public final static String offlineHasFilesDynamicProperty = "offline.has.files";
+
+ public final static String listFilesAvailable = "list.files.available";
+
+ /**
+ * FTP Protocol Properties
+ */
+ public final static String ftpTimeOut = "ftp.timeout";
+ public final static String ftpTriesConnexion = "ftp.automatic.reconnect";
+
+
+ /**
+ * Http protocol properties
+ */
+
+ public final static String httpParseDirLineProperty = "http.parse.dir.line";
+ public final static String httpParseFileLineProperty = "http.parse.file.line";
+ public final static String httpGroupDirName = "http.group.dir.name";
+ public final static String httpGroupDirDate = "http.group.dir.date";
+ public final static String httpGroupFileName = "http.group.file.name";
+ public final static String httpGroupFileDate = "http.group.file.date";
+ public final static String httpGroupFileSize = "http.group.file.size";
+
+ public final static String ftpActiveMode = "ftp.active.mode";
+
+ public final static String flatRepositoryProperty = "data.location";
+
+ /** Gestion des block pour les processes du workflow */
+ public final static String blockPostprocessProperty = "BLOCKS";
+ public final static String currentBlockDynamicProperty = "current_block";
+
+ public final static String logFilesProperty = "log.files";
+ public final static String dbFormatsProperty = "db.formats";
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajException.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajException.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajException.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,170 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+import org.inria.biomaj.singleton.BiomajLogger;
+
+/**
+ * @author ofilangi
+ * @version Biomaj 0.9
+ * @since Biomaj 0.8 /Citrina 0.5
+ */
+public class BiomajException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ private static BiomajMessages bmes = new BiomajMessages();
+ /**
+ * @uml.property name="message"
+ */
+ private String message = "";
+
+ public BiomajException(String index_mess_property) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ BiomajLogger.getInstance().log(message);
+
+ }
+
+ public BiomajException(String index_mess_property,String[] values) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ {
+ BiomajLogger.getInstance().log(message = getMessageWithValue(message,values));
+ }
+ }
+
+ public BiomajException(String index_mess_property,String v0) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ {
+ String[] vs = new String[1];
+ vs[0] = v0;
+ BiomajLogger.getInstance().log(message = getMessageWithValue(message,vs));
+ }
+
+ }
+
+ public BiomajException(String index_mess_property,String v0, String v1) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ {
+ String[] vs = new String[2];
+ vs[0] = v0;
+ vs[1] = v1;
+ BiomajLogger.getInstance().log(message = getMessageWithValue(message,vs));
+ }
+
+ }
+
+ public BiomajException(String index_mess_property,String v0, String v1,String v2) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ {
+ String[] vs = new String[3];
+ vs[0] = v0;
+ vs[1] = v1;
+ vs[2] = v2;
+ BiomajLogger.getInstance().log(message = getMessageWithValue(message,vs));
+ }
+
+ }
+
+ public BiomajException(Exception ex) {
+ BiomajLogger.getInstance().log(ex);
+ System.err.println(ex);
+ message = ex.getLocalizedMessage();
+ }
+
+ public BiomajException(String index_mess_property,Exception ex) {
+ message = bmes.getMessageFromIndex(index_mess_property);
+
+ if (message == null)
+ errorIndexDefinition(index_mess_property);
+ else
+ {
+ BiomajLogger.getInstance().log(ex);
+ BiomajLogger.getInstance().log(message);
+ }
+ }
+
+ private void errorIndexDefinition(String index) {
+ BiomajLogger.getInstance().log("******** DEVL ERROR : index message:"+index+" not defined ! *************");
+ }
+
+
+ protected String getMessageWithValue(String message,String[] v) {
+
+ String newMess=message;
+
+ for (int i=0;(i<v.length);i++) {
+ String valToReplace = "$"+Integer.toString(i) ;
+ newMess = newMess.replace(valToReplace,v[i]);
+ }
+ return newMess;
+ }
+
+ /**
+ * @return the message
+ * @uml.property name="message"
+ */
+ @Override
+ public String getMessage() {
+ return message;
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajMessages.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajMessages.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajMessages.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,109 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+import org.inria.biomaj.singleton.BiomajLogger;
+
+public class BiomajMessages {
+
+ /**
+ * @uml.property name="properties"
+ */
+ private Properties properties;
+ /**
+ * @uml.property name="isInit"
+ */
+ private boolean isInit = false;
+
+
+ public BiomajMessages() {
+ if (!isInit) {
+ init();
+ }
+ }
+
+ public String getMessageFromIndex(String index) {
+ //String suiteMess = "\n** Please consult the logs to obtain more information. **";
+ String suiteMess ="";
+ if (!properties.containsKey(index)) {
+ suiteMess += " (index "+index+" does not exist)";
+ }
+ if (isInit)
+ return properties.getProperty(index.trim())+suiteMess;
+ else {
+ init();
+ return properties.getProperty(index.trim())+suiteMess;
+ }
+ }
+
+
+ protected void init() {
+ properties = new Properties();
+ String filePath = BiomajUtils.getBiomajRootDirectory()+BiomajConst.workflowXmlDirectory+"/messages.properties";
+ try {
+ File fpfile = new File(filePath);
+ if (!fpfile.exists()) {
+ BiomajLogger.getInstance().log("Errors messages file does not exist:"+filePath);
+ return;
+ }
+ FileInputStream fis = new FileInputStream(fpfile);
+ properties.load(fis);
+ isInit = true;
+ } catch (FileNotFoundException fnfe) {
+
+
+ } catch (IOException ioe) {
+
+ }
+ }
+
+
+
+
+
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajUtils.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajUtils.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/BiomajUtils.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,1274 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+
+import org.inria.biomaj.exe.bank.BankFactory;
+import org.inria.biomaj.exe.bank.BiomajBank;
+import org.inria.biomaj.exe.main.Biomaj;
+import org.inria.biomaj.internal.ant.task.net.RemoteFile;
+
+import org.inria.biomaj.session.bank.Configuration;
+import org.inria.biomaj.session.bank.FileDesc;
+import org.inria.biomaj.singleton.BiomajInformation;
+import org.inria.biomaj.singleton.BiomajLogger;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+
+/**
+ *
+ * @author ofilangi
+ *
+ */
+public class BiomajUtils {
+
+
+ public static final FileFilter FILTER_DIRECTORIES = new FileFilter()
+ {
+ /*
+ * @see java.io.FileFilter#accept(java.io.File)
+ */
+ public boolean accept(java.io.File path)
+ {
+ if (path == null)
+ return false;
+
+ return path.isDirectory();
+ }
+ };
+
+
+
+ static public final String DATE_FORMAT_1 = "dd-MM-yyyy HH:mm";
+ static public final String DATE_FORMAT_2 = "dd-MMM-yyyy HH:mm";
+ //a partir de la version 0.9.2.x
+ static public final String DATE_FORMAT_3 = "dd-MM-yyyy HH:mm:ss";
+ static public final String DATE_FORMAT_4 = "dd-MM-yyyy";
+ // US date format
+ static public final String DATE_FORMAT_5 = "yyyy-MM-dd HH:mm:ss";
+
+ static protected final SimpleDateFormat sdf1 = new SimpleDateFormat(DATE_FORMAT_1);
+ static protected final SimpleDateFormat sdf2 = new SimpleDateFormat(DATE_FORMAT_2);
+ static protected final SimpleDateFormat sdf3 = new SimpleDateFormat(DATE_FORMAT_3);
+ static protected final SimpleDateFormat sdf4 = new SimpleDateFormat(DATE_FORMAT_4);
+ static protected final SimpleDateFormat sdf5 = new SimpleDateFormat(DATE_FORMAT_5);
+
+ static public final String REGEXP_DATE_FORMAT_1 = "[\\d]{2}-[\\d]{2}-[\\d]{4}\\s[\\d]{2}:[\\d]{2}";
+ static public final String REGEXP_DATE_FORMAT_2 = "[\\d]{2}-[\\w]{3}-[\\d]{4}\\s[\\d]{2}:[\\d]{2}";
+ //a partir de la version 0.9.2.x
+ static public final String REGEXP_DATE_FORMAT_3 = "[\\d]{2}-[\\d]{2}-[\\d]{4}\\s[\\d]{2}:[\\d]{2}:[\\d]{2}";
+ static public final String REGEXP_DATE_FORMAT_5 = "[\\d]{4}-[\\d]{2}-[\\d]{2}\\s[\\d]{2}:[\\d]{2}:[\\d]{2}";
+
+
+ static public final String DATE_FORMAT_IN_USE = DATE_FORMAT_3;
+ static public final String REGEXP_DATE_FORMAT_IN_USE = REGEXP_DATE_FORMAT_5;
+
+ private static List<Long> ids = new ArrayList<Long>();
+
+ /**
+ * This function recover the current date and format it for the field "begin download" of the xml
+ * state file
+ * @return return the current date formatted for the field "begin download" of the xml state file
+ */
+
+ static public String getCurrentDate () {
+ return dateToString(new Date(), Locale.US);
+ }
+
+
+ /**
+ * Parses a date in a given format according to the locale.
+ *
+ * @param date
+ * @param locale
+ * @return
+ */
+ static public String dateToString(Date date, Locale locale) {
+ final SimpleDateFormat sdf;
+ if (locale.equals(Locale.FRANCE))
+ sdf = new SimpleDateFormat(DATE_FORMAT_IN_USE);
+ else
+ sdf = new SimpleDateFormat(DATE_FORMAT_5);
+
+ if (date==null)
+ return sdf.format(new Date());
+
+ return sdf.format(date);
+ }
+
+ /**
+ * Transforms a french formatted date (jj-MM-yyyy hh:mm:ss) into a
+ * US formatted date (yyyy-MM-jj hh:mm:ss)
+ *
+ * @param date date to be transformed
+ * @return
+ */
+ public static String toUSDate(String date) {
+ Date d = null;
+ try {
+ d = stringToDate(date);
+ } catch (ParseException e) {
+ System.err.println("Invalid date format.");
+ e.printStackTrace();
+ }
+ SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_5);
+ return sdf.format(d);
+
+ }
+
+ /**
+ * String date has to be well formed : see DATE_FORMAT
+ * keep compatibility with old version (citrina/biomaj)
+ * @param date
+ * @return
+ */
+ static synchronized public Date stringToDate (String date) throws ParseException {
+ try {
+ return sdf5.parse(date);
+ } catch (ParseException ex) {
+ try {
+ return sdf3.parse(date);
+ } catch (ParseException pe) {
+ try {
+ return sdf1.parse(date);
+ } catch (ParseException pe2) {
+ try {
+ return sdf2.parse(date);
+ } catch (ParseException pe3) {
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_2, Locale.US);
+ return sdf.parse(date);
+ } catch (ParseException pe4) {
+ return sdf4.parse(date);
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * This function returns the month string according to its number
+ *
+ * @param numMonth The number of the month
+ * @return Returns the month string
+ */
+ static public String getMonth (int numMonth) {
+ switch (numMonth) {
+ case 1 :
+ return "Jan" ;
+ case 2 :
+ return "Feb" ;
+ case 3 :
+ return "Mar" ;
+ case 4 :
+ return "Apr" ;
+ case 5 :
+ return "May" ;
+ case 6 :
+ return "Jun" ;
+ case 7 :
+ return "Jul" ;
+ case 8 :
+ return "Aug" ;
+ case 9 :
+ return "Sep" ;
+ case 10 :
+ return "Oct" ;
+ case 11 :
+ return "Nov" ;
+ case 12 :
+ return "Dec" ;
+ default :
+ return "Jan" ;
+ }
+ }
+
+ /**
+ * Ensures that different threads dont get the same id.
+ *
+ * @return
+ */
+ public static synchronized long getUniqueNumericId() {
+ long id;
+ while (ids.contains(id = new Date().getTime())) {
+ id = new Date().getTime();
+ }
+ ids.add(id);
+ return id;
+ }
+
+
+ /**
+ * Verif if a property is set
+ * @param p
+ * @param prop
+ * @throws BiomajException
+ */
+ static private void verifProperty(Project p,String prop) throws BiomajException {
+
+ if (p == null)
+ throw new BiomajException("citrinautils.error.project");
+
+ if (p.getProperty(prop)==null)
+ throw new BiomajException("citrinautils.error.property",prop);
+ }
+
+ /**
+ * Returns the property of a project
+ * @param p
+ * @param prop
+ * @return
+ * @throws BiomajException Envoi une exception si la propriete n existe pas ou p non defini
+ */
+ static public String getProperty(Project p,String prop) throws BiomajException {
+
+ verifProperty(p,prop);
+ return p.getProperty(prop);
+ }
+
+ /**
+ * Get Biomaj ROOT directory
+ * @param arg0
+ * @return
+ */
+ static public String getBiomajRootDirectory() {
+ String envBmaj = System.getenv(Biomaj.ENV_BIOMAJ);
+ if (envBmaj == null)
+ envBmaj = System.getProperty(Biomaj.ENV_BIOMAJ);
+ return envBmaj;
+ }
+
+ /**
+ * Get Offline directory define in build.xml
+ * @param arg0
+ * @return
+ */
+ static public String getOfflineDirectory(Project arg0) throws BiomajException {
+
+ if (arg0.getProperty(BiomajConst.offlineDirProperty)==null)
+ throw new BiomajException("citrinautils.error.property",BiomajConst.offlineDirProperty);
+
+
+
+ return getProperty(arg0, BiomajConst.dataDirProperty)+"/"+arg0.getProperty(BiomajConst.offlineDirProperty);
+ }
+
+
+ static public String getLocalFileRegExpr(BuildEvent arg0) throws BiomajException {
+
+ if (arg0.getProject().getProperty(BiomajConst.localFilesProperty)==null)
+ throw new BiomajException("citrinautils.error.property",BiomajConst.localFilesProperty);
+
+
+
+ return getProperty(arg0.getProject(), BiomajConst.dataDirProperty)+"/"+arg0.getProject().getProperty(BiomajConst.localFilesProperty);
+ }
+
+
+ static public String getDirectoryVersion(BuildEvent arg0) throws BiomajException {
+
+ if (arg0.getProject().getProperty(BiomajConst.versionDirProperty)==null)
+ throw new BiomajException("citrinautils.error.property",BiomajConst.versionDirProperty);
+
+
+
+ return getProperty(arg0.getProject(), BiomajConst.versionDirProperty);
+ }
+
+ static public int computeNbLineInFile(String nameFile, Vector<String> files) {
+ File f = new File (nameFile) ;
+
+ if (files == null)
+ files = new Vector<String>();
+
+ if (!f.exists())
+ return -1;
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(f));
+ int count = 0;
+ String line;
+ while ((line=br.readLine()) != null) {
+ count++;
+ files.add(line);
+ }
+ return count;
+ } catch (Exception e) {
+ return -1;
+ }
+ }
+
+ static public String timeToString(Long time) {
+
+ //return DateUtils.format(time, DateUtils.ISO8601_TIME_PATTERN);
+ //return DateUtils.format(time, "MM:dd:HH");
+ //return DateUtils.formatElapsedTime(time);
+ //System.out.println(DateUtils.format(time, "dd:HH:mm:ss"));
+ //DateUtils.ISO8601_TIME_PATTERN
+
+ time = time / 1000 ;
+ //second time in second ....
+
+ long sec = (time % 60) ;
+ time = time / 60 ;//time in minute
+ long min = time % 60 ;
+ time = time / 60 ;//time in hours
+ long hours = time % 24 ;
+ //time = time / 24 ;//time in month
+ time = time / 24 ;
+ //condition) ? instruction si vrai : instruction si faux
+ String secS = Long.toString(sec);
+ if (secS.length()==1) secS = "0"+secS ;
+
+ String minS = Long.toString(min);
+ if (minS.length()==1) minS = "0"+minS ;
+
+ String hoursS = Long.toString(hours);
+ if (hoursS.length()==1) hoursS = "0"+hoursS ;
+
+ String dayS = Long.toString(time);
+ if (dayS.length()==1) dayS = "0"+dayS ;
+
+ return dayS+":"+hoursS+":"+minS;//+":"+sec;
+
+ /*
+ String sec = new Long(time % 60).toString() ;
+ if (sec.length()==1)
+ sec="0"+sec;
+
+
+ time = time / 60 ;
+ if (time==0)
+ return "00:00:"+sec;
+
+ String min = new Long(time % 60).toString() ;
+
+ if (min.length()==1)
+ min="0"+min;
+
+ time = time / 60 ;
+ if (time==0)
+ return "00:"+min+":"+sec;
+
+ String h = new Long(time % 60).toString() ;
+
+ if (h.length()==1)
+ h="0"+h;
+
+ time = time / 24 ;
+ if (time==0)
+ return h+":"+min+":"+sec;
+ */
+ //return time+":"+h+":"+min;//+":"+sec;*/
+ }
+
+
+ public static void copy_old(File source, File dest) throws IOException {
+ FileChannel in = null, out = null;
+ try {
+ in = new FileInputStream(source).getChannel();
+ out = new FileOutputStream(dest).getChannel();
+
+ long size = in.size();
+ MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
+
+ out.write(buf);
+
+ } finally {
+ if (in != null) in.close();
+ if (out != null) out.close();
+ }
+ }
+
+ public static void copy(File source, File dest) throws IOException {
+ createSubDirectories(getRelativeDirectory(dest.getAbsolutePath()));
+ FileInputStream fis = new FileInputStream(source);
+ FileOutputStream fos = new FileOutputStream(dest);
+ byte[] buf = new byte[1024];
+ int i = 0;
+ while((i=fis.read(buf))!=-1) {
+ fos.write(buf, 0, i);
+ }
+ fis.close();
+ fos.close();
+
+ dest.setLastModified(source.lastModified());
+ }
+
+
+ /**
+ * Delete all subdirectories and all sub files
+ * @param directory
+ */
+ public static void deleteAll(File directory) {
+
+ if (directory.isDirectory()) {
+ File[] l = directory.listFiles();
+ for (int i=0;i<l.length;i++)
+ deleteAll(l[i]);
+ directory.delete();
+ } else // directory is a file ...
+ directory.delete();
+ }
+
+ /**
+ * Delete all subdirectories and all sub files
+ * @param directory
+ */
+ public static void deleteAll(File directory,Vector<File> excluded) {
+
+ if (directory.isDirectory()) {
+ File[] l = directory.listFiles();
+ for (int i=0;i<l.length;i++)
+ deleteAll(l[i],excluded);
+
+ if (directory.listFiles().length==0)
+ directory.delete();
+ } else // directory is a file ...
+ {
+ for (File f : excluded)
+ if (f.getAbsolutePath().compareTo(directory.getAbsolutePath())==0)
+ return;
+ directory.delete();
+ }
+ }
+
+
+ public static int howManyFiles(File dir) {
+
+ if (dir.isDirectory()) {
+ File[] l = dir.listFiles();
+ int c = 0;
+ for (File f : l) {
+ if (f.isFile())
+ c = c+1;
+ else if (f.isDirectory())
+ c = c + howManyFiles(f);
+ }
+ return c;
+ } else if (dir.isFile())
+ return 1;
+
+ return 0;
+ }
+
+ /**
+ * This function recover the size of the directory in parameter
+ * It's a recursive function
+ *
+ * @param rootDirectory The directory to determine the size
+ * @return return the size of the directory
+ */
+ public static long getDirectorySize(File rootDirectory)
+ {
+ if (!rootDirectory.exists())
+ return 0;
+ try {
+ // Correction Bug si link on sort....
+ if (rootDirectory.getAbsolutePath().compareTo(rootDirectory.getCanonicalPath())!=0)
+ return 0;
+ } catch (IOException ioe) {
+ return 0;
+ }
+
+ if (rootDirectory.isDirectory()) {
+ //System.out.println("Directory:"+rootDirectory.getName());
+ File[] l = rootDirectory.listFiles();
+ long res = 0;
+ for (int i=0;i<l.length;i++)
+ res+=getDirectorySize(l[i]);
+ return res;
+ } else //is a file !
+ {
+ return rootDirectory.length();
+ }
+ }
+
+ /**
+ * Delete a file
+ * @param path
+ */
+ public static boolean delete (String path) {
+ File f = new File (path);
+ if (f.exists()) {
+ f.delete();
+ } else {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * This function recover the bank size and format it for the xml state file
+ * @return return the bank size formatted
+ */
+ public static long computeDirectorySize (String directory)
+ {
+ File fileDir = new File (directory) ;
+ if (!fileDir.exists()) {
+ BiomajLogger.getInstance().log("["+directory+"] does not exist");
+ return 0;
+ }
+ try {
+ return BiomajUtils.getDirectorySize(fileDir) ;
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log(e);
+ return 0;
+ }
+
+
+ }
+
+ public static String sizeToString (Long bankSize) {
+ String result="";
+
+ long giga = bankSize / (1024*1024*1024);
+
+ if (giga>0) {
+ bankSize = bankSize % (1024*1024*1024);
+ String bankDivByMo = Long.toString(bankSize/(1024*1024));
+ result+=Long.toString(giga)+","+bankDivByMo.substring(0,Math.min(3,bankDivByMo.length()))+"G";
+ return result;
+ }
+
+ long mega = bankSize /(1024*1024);
+
+ if (mega>0)
+ {
+ bankSize = bankSize % (1024*1024);
+ String bankDivByKo = Long.toString(bankSize/1024);
+ result+=Long.toString(mega)+","+bankDivByKo.substring(0,Math.min(3,bankDivByKo.length()))+"M";
+ } else {
+ result=Long.toString(bankSize/1024)+"K";
+ }
+ return result;
+ }
+
+ public static long stringToSize (String bankSize) {
+ if ((bankSize==null)||(bankSize.compareTo("")==0))
+ return 0;
+ try {
+ if (bankSize.trim().charAt(bankSize.length()-1)=='G') {
+ String value = bankSize.substring(0, bankSize.length()-1);
+
+ if (value.contains(".")){
+ String[] t = value.split("\\.");
+ return Long.valueOf(t[0])*(1024*1024*1024)+Long.valueOf(t[1])*(1024*1024);
+ } else if (value.contains(",")){
+ String[] t = value.split(",");
+ return Long.valueOf(t[0])*(1024*1024*1024)+Long.valueOf(t[1])*(1024*1024);
+ }
+
+ return Long.valueOf(value)*(1024*1024*1024);
+ }
+ else if (bankSize.trim().charAt(bankSize.length()-1)=='M') {
+ String value = bankSize.substring(0, bankSize.length()-1);
+
+ if (value.contains(".")) {
+ String[] t = value.split("\\.");
+ return Long.valueOf(t[0])*(1024*1024)+Long.valueOf(t[1])*(1024);
+ }
+ else if (value.contains(",")) {
+ String[] t = value.split(",");
+ return Long.valueOf(t[0])*(1024*1024)+Long.valueOf(t[1])*(1024);
+ }
+
+ return Long.valueOf(value)*(1024*1024);
+
+ } else if (bankSize.trim().charAt(bankSize.length()-1)=='K') {
+ String value = bankSize.substring(0, bankSize.length()-1);
+
+ if (value.contains(".")) {
+ String[] t = value.split("\\.");
+ return Long.valueOf(t[0])*(1024)+Long.valueOf(t[1]);
+ }
+ else if (value.contains(",")) {
+ String[] t = value.split(",");
+ return Long.valueOf(t[0])*(1024)+Long.valueOf(t[1]);
+ }
+ return Long.valueOf(value)*(1024);
+ } else
+ return 0;
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log(e);
+ return 0;
+ }
+ }
+
+
+ public static String getStateFileDirectory() throws BiomajException {
+ return BiomajInformation.getInstance().getProperty(BiomajInformation.STATEFILESDIR);
+ }
+
+ public static Vector<Node> getListChild(Node node,String nameChild) {
+
+ Vector<Node> res = new Vector<Node>();
+
+ if (node == null)
+ return res;
+
+ if (node.hasChildNodes()) {
+ NodeList nl = node.getChildNodes();
+
+ for (int i=0;i<nl.getLength();i++) {
+ if (nl.item(i).getNodeName().compareTo(nameChild)==0)
+ res.add(nl.item(i));
+ }
+
+ }
+
+ return res;
+ }
+
+ public static String getAttribute(Node node,String attribut) {
+
+ if (node == null)
+ throw new NullPointerException("Invalid node");
+
+ if (node.hasAttributes()) {
+ NamedNodeMap nnm = node.getAttributes();
+ Node n = nnm.getNamedItem(attribut);
+ if (n == null)
+ return "";
+
+ return n.getTextContent();
+ }
+ return "";
+
+ }
+
+ public static void print(Node node) {
+
+ if (node == null)
+ BiomajLogger.getInstance().log("Invalid node");
+ BiomajLogger.getInstance().log("<"+node.getNodeName()+" ");
+ if (node.hasAttributes()) {
+ NamedNodeMap nnm = node.getAttributes();
+ for (int i=0;i<nnm.getLength();i++) {
+ if (nnm.item(i)==null)
+ continue;
+ if ((nnm.item(i).getTextContent()==null)||(nnm.item(i).getTextContent().trim().compareTo("")==0))
+ BiomajLogger.getInstance().log(nnm.item(i).getNodeName()+"=<<EMPTY>> ");
+ else
+ BiomajLogger.getInstance().log(nnm.item(i).getNodeName()+"=\""+nnm.item(i).getTextContent()+"\" ");
+ }
+ }
+
+ BiomajLogger.getInstance().log(">");
+ }
+
+
+ public static String getRelativeDirectory(String filePath) {
+
+ int index = filePath.lastIndexOf("/");
+ if (index == -1)
+ return "";
+ return filePath.substring(0, index);
+
+ }
+
+ public static String getNameFile(String filePath) {
+ int index = filePath.lastIndexOf("/");
+ if (index == -1)
+ return filePath;
+
+ return filePath.substring(index+1);
+ }
+
+ public static void createSubDirectories(String path) {
+ if (path.contains("/")) {
+ String subDirectories = path.substring(0, path.lastIndexOf("/"));
+ createSubDirectories(subDirectories);
+ File f = new File(path);
+ if (!f.exists())
+ f.mkdir();
+ }
+ //sinon rien
+ }
+
+ //------------------------------------- METHODS WITH HASH -----------------------------------------------------------
+
+ private static final String SEPARATOR_HASH="_ at _";
+
+ public static String getHash(String absolFileName) throws IOException {
+ //return getHashMD5File(absolFileName);
+ File f = new File(absolFileName);
+ //System.out.println(absolFileName+" = "+Long.toString(f.lastModified()));
+ return f.getName()+SEPARATOR_HASH+Long.toString(f.lastModified())+SEPARATOR_HASH+Long.toString(f.length());
+
+ }
+
+ public static String getHash(String location,long time,long size) {
+ String[] locs = location.split("/");
+ String res;
+ if (locs.length>0)
+ res = locs[locs.length-1];
+ else
+ res = location;
+ return res+SEPARATOR_HASH+Long.toString(time)+SEPARATOR_HASH+Long.toString(size);
+ }
+
+
+ public static String getHashFromRemoteFile(RemoteFile rf) {
+ //return getHashMD5File(absolFileName);
+ return rf.getName()+SEPARATOR_HASH+Long.toString(rf.getDate().getTime())+SEPARATOR_HASH+Long.toString(rf.getSize());
+
+ }
+
+ public static String getNameFromHash(String hash) {
+ String[] t = hash.split("_ at _");
+ if (t.length!=3) {
+ BiomajLogger.getInstance().log("BiomajUtils::getNameFromHash ---> error, hash bad structure["+hash+"] has to contain 2x[_ at _].");
+ return "";
+ }
+
+ return t[0];
+ }
+
+ public static long getSizeFromHash(String hash) {
+ String[] t = hash.split("_ at _");
+ if (t.length!=3) {
+ BiomajLogger.getInstance().log("BiomajUtils::getSizeFromHash ---> error, hash bad structure["+hash+"] has to contain 2x[_ at _].");
+ return 0;
+ }
+
+ return Long.valueOf(t[2]);
+ }
+
+ public static long getTimeFromHash(String hash) {
+ String[] t = hash.split("_ at _");
+ if (t.length!=3) {
+ BiomajLogger.getInstance().log("BiomajUtils::getTimeFromHash ---> error, hash bad structure["+hash+"] has to contain 2x[_ at _].");
+ return 0;
+ }
+
+ return Long.valueOf(t[1]);
+
+ }
+
+ //----------------------------------------------------------------------------------------------------------------------
+
+ public static int createLinkOnFileSystem(File f,String nameLink) throws IOException,InterruptedException {
+
+ String cmdline = "ln -s "+f.getAbsolutePath()+" "+getRelativeDirectory(f.getAbsolutePath())+"/"+nameLink;
+ Process p = Runtime.getRuntime().exec(cmdline);
+ return p.waitFor();
+ }
+
+ public static boolean move(File source,File destination) throws IOException {
+ if( !destination.exists() ) {
+ // On essaye avec renameTo
+ boolean result = source.renameTo(destination);
+ if( !result && !(source.isDirectory() || destination.isDirectory()) ) {
+ // On essaye de copier
+ copy(source,destination);
+ source.delete();
+ result = true;
+ }
+ return result;
+ } else {
+ // Si le fichier destination existe, on annule ...
+ return false;
+ }
+ }
+
+ public static boolean moveAllFilesToDirectory(File inDir,File outDir) throws IOException {
+
+ if (!outDir.exists()) {
+ BiomajLogger.getInstance().log("BiomajUtils::moveFlatFromFuturReleaseToOfflineDirectory out directory does not exist:["+outDir.getAbsolutePath()+"]");
+ return false;
+ }
+ boolean b = true;
+
+ if (inDir.exists()) {
+ //Dans un premier temps on essaye de faire un move direct si ce sont des repertoires
+ //ca fonctionne si le move s effectue sur le meme disk...
+ if (inDir.isDirectory()&&move(inDir,outDir))
+ return true;
+ File[] files = inDir.listFiles();
+ for (File fi : files) {
+ if (fi.isFile()) {
+ File newFi = new File(outDir.getAbsolutePath()+"/"+fi.getName());
+ b = move(fi,newFi) && b ;
+ } else if (fi.isDirectory()) {
+ File newD = new File(outDir.getAbsolutePath()+"/"+fi.getName());
+ if (!newD.exists()) {
+ if (!newD.mkdir())
+ return false;
+ }
+ boolean res = moveAllFilesToDirectory(fi,newD);
+ if (!res)
+ return false;
+ }
+ }
+ }
+
+ return b;
+ }
+
+
+ public static boolean fillConfig(String dbName, Configuration config) {
+
+ try {
+
+ BankFactory bf = new BankFactory();
+ BiomajBank b = bf.createBank(dbName,false);
+
+
+ /*
+ File file = new File(BiomajUtils.getBiomajRootDirectory()+"/"+BiomajConst.propertiesDirectory+"/"+dbName+".properties");
+ if (!file.exists())
+ return false;
+
+ Properties props = new Properties();
+
+ FileInputStream fis = new FileInputStream(file);
+ props.load(fis);
+ fis.close();
+ */
+
+ String dataDir = b.getPropertiesFromBankFile().getProperty(BiomajConst.dataDirProperty);
+ config.setId(new Long(new Date().getTime()));
+ config.setDate(BiomajUtils.getCurrentDate());
+ config.setFrequencyUpdate(b.getPropertiesFromBankFile().getProperty(BiomajConst.frequencyProperty));
+ config.setFullName(b.getPropertiesFromBankFile().getProperty(BiomajConst.dbFullNameProperty));
+ config.setLocalFilesRegexp(b.getPropertiesFromBankFile().getProperty(BiomajConst.localFilesProperty));
+ config.setName(dbName);
+ config.setNbVersionManagement(b.getPropertiesFromBankFile().getProperty(BiomajConst.keepOldVersionProperty));
+ config.setOfflineDirectory(dataDir+"/"+b.getPropertiesFromBankFile().getProperty(BiomajConst.offlineDirProperty));
+ try {
+ config.setPropertyFile(new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+dbName+".properties").getAbsolutePath());
+ } catch (BiomajException io) {
+ BiomajLogger.getInstance().log(io);
+ return false;
+ }
+
+ config.setProtocol(b.getPropertiesFromBankFile().getProperty(BiomajConst.protocolProperty));
+ config.setReleaseFile(b.getPropertiesFromBankFile().getProperty(BiomajConst.releaseFileProperty));
+ config.setReleaseRegExp(b.getPropertiesFromBankFile().getProperty(BiomajConst.releaseRegExpProperty));
+ config.setRemoteDirectory(b.getPropertiesFromBankFile().getProperty(BiomajConst.remoteDirProperty));
+ config.setRemoteFilesRegexp(b.getPropertiesFromBankFile().getProperty(BiomajConst.remoteFilesProperty));
+ if (b.getPropertiesFromBankFile().containsKey(BiomajConst.typeProperty))
+ config.setTypeBank(b.getPropertiesFromBankFile().getProperty(BiomajConst.typeProperty));
+ else
+ config.setTypeBank("unknown");
+
+ config.setUrl(b.getPropertiesFromBankFile().getProperty(BiomajConst.serverProperty));
+ config.setVersionDirectory(dataDir+"/"+b.getPropertiesFromBankFile().getProperty(BiomajConst.versionDirProperty));
+ //nouvelles donnees depuis 0.9.2
+ config.setPort(b.getPropertiesFromBankFile().getProperty(BiomajConst.portProperty));
+ config.setUsername(b.getPropertiesFromBankFile().getProperty(BiomajConst.userNameProperty));
+ config.setDoLinkCopy(b.getPropertiesFromBankFile().getProperty(BiomajConst.doLinkProperty));
+ config.setNoExtract(b.getPropertiesFromBankFile().getProperty(BiomajConst.noExtractProperty));
+ config.setLogFiles(b.getPropertiesFromBankFile().getProperty(BiomajConst.logFilesProperty));
+ config.setRemoteExcludedFiles(b.getPropertiesFromBankFile().getProperty(BiomajConst.remoteExcludedFilesProperty));
+ if (b.getPropertiesFromBankFile().containsKey(BiomajConst.dbFormatsProperty)) {
+ String[] dbFormats = b.getPropertiesFromBankFile().getProperty(BiomajConst.dbFormatsProperty).split(",");
+ for (String f : dbFormats)
+ config.getFormats().add(f);
+ }
+
+ /*
+ String l = b.getPropertiesFromBankFile().getProperty(BiomajConst.blockPostprocessProperty);
+ if (l != null) {
+ String[] blocks = l.split(",");
+ if (blocks.length >0) {
+ Vector<String> bs = new Vector<String>();
+ HashMap<String, Vector<String>> lMeta = new HashMap<String, Vector<String>>();
+ HashMap<String, Vector<String>> lProcess = new HashMap<String, Vector<String>>();
+ for (String bl : blocks) {
+ bs.add(bl);
+ String llMeta = b.getPropertiesFromBankFile().getProperty(bl);
+ if ((llMeta != null)&&(llMeta.trim().compareTo("")!=0)) {
+ String[] metas = llMeta.split(",");
+ Vector<String> mp = new Vector<String>();
+ for (String m : metas) {
+ mp.add(m);
+ String llProcess = b.getPropertiesFromBankFile().getProperty(m);
+ if ((llProcess != null)&&(llProcess.trim().compareTo("")!=0)) {
+ String[] processes = llProcess.split(",");
+ Vector<String> pp = new Vector<String>();
+ for (String p : processes)
+ pp.add(p);
+ lProcess.put(m, pp);
+ }
+ }
+ lMeta.put(bl, mp);
+ }
+ }
+ config.setBlocks(bs);
+ config.setMetaProcess(lMeta);
+ config.setProcess(lProcess);
+ }
+ }
+ */
+ return true;
+ } catch (BiomajException be) {
+ BiomajLogger.getInstance().log(be);
+ return false;
+ }
+ }
+
+
+ /*
+ * METHODES TO USE MD5 HASH
+ * ------------------------
+ * Use fast md5 :http://www.twmacinta.com/myjava/fast_md5.php
+ * Docs : http://www.twmacinta.com/myjava/fast_md5_javadocs/
+
+
+ public static String getHashMD5File(String absolFileName) throws IOException {
+
+ String hash = MD5.asHex(MD5.getHash(new File(absolFileName)));
+ return hash;
+
+ }
+
+
+ public static String getHashMD5String(String stringToHash) throws UnsupportedEncodingException {
+ MD5 md5 = new MD5();
+ md5.Update(stringToHash, null);
+ String hash = md5.asHex();
+ return hash;
+ }
+ */
+ //bankName,type
+ public static TreeMap<String,Vector<String>> getListBankFindInStatefile() throws BiomajException {
+
+ TreeMap<String,Vector<String>> res = new TreeMap<String,Vector<String>>();
+
+ File statefile = null ;
+ try {
+ statefile = new File(BiomajInformation.getInstance().getProperty(BiomajInformation.STATEFILESDIR));
+ } catch (BiomajException ioe) {
+ throw new BiomajException(ioe);
+ }
+
+ if (!statefile.exists())
+ {
+ BiomajLogger.getInstance().log("directory "+statefile.getAbsolutePath()+" does not exist.");
+ return res;
+ }
+
+ File[] lXml = statefile.listFiles();
+ for (File xml : lXml) {
+ if (xml.isDirectory())
+ continue;
+ if (xml.getName().charAt(0)=='.')
+ continue;
+ if (!xml.getName().endsWith(".xml"))
+ continue;
+ //on verifie qu il existe dabs conf/db_properties
+ String nameBank = xml.getName().split("\\.")[0];
+ try {
+ if (!new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+nameBank+".properties").exists())
+ continue;
+ } catch (BiomajException io) {
+ BiomajLogger.getInstance().log(io);
+ continue;
+ }
+ Configuration config = new Configuration();
+ if (!BiomajUtils.fillConfig(nameBank, config)) {
+ //System.out.println("Find xml file ["+xml.getAbsolutePath()+"] but no properties file find ["+prop+"]");
+ continue;
+ }
+ if (config.getTypeBank()==null)
+ config.setTypeBank("unknown");
+
+ if (res.containsKey(config.getTypeBank()))
+ res.get(config.getTypeBank()).add(nameBank);
+ else {
+ res.put(config.getTypeBank(),new Vector<String>());
+ res.get(config.getTypeBank()).add(nameBank);
+ }
+ }
+ return res;
+ }
+
+ /**
+ *
+ * @param pathDisk
+ * @return
+ * Modif java 1.6
+ */
+ public static long getFreeSize() {
+ Properties p = new Properties();
+ try {
+ p.load(new FileInputStream(new File(BiomajInformation.getInstance().getProperty(BiomajInformation.WORKFLOWSDIR)+"/"+BiomajConst.globalProperties)));
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (BiomajException e) {
+ e.printStackTrace();
+ }
+ String dataDir = p.getProperty(BiomajConst.dataDirProperty);
+ File f = new File(dataDir);
+ if (f.exists())
+ return f.getFreeSpace();
+ else
+ return 0;
+ }
+
+ public static long getUseSize(String pathDisk) {
+
+ final String PARSE_DF = "(\\S+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\S+";
+ long size = 0;
+ try {
+ String[] arg = new String[2];
+ arg[0] = "df";
+ arg[1] = pathDisk;
+
+ Process p = Runtime.getRuntime().exec(arg);
+ p.waitFor();
+
+ BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ //lecture de l entete
+ br.readLine();
+ String result = br.readLine();
+ if (result != null) {
+ //System.out.println(result);
+ Pattern pt = Pattern.compile(PARSE_DF);
+ Matcher m = pt.matcher(result);
+
+ if (m.find()) {
+ size = Long.valueOf(m.group(3))*1024;
+ }
+
+ }
+
+
+
+ } catch (Exception e) {
+ BiomajLogger.getInstance().log(e);
+ }
+ return size;
+
+ }
+
+ public static String currentBank (BuildEvent arg0) {
+
+ if (arg0.getProject().getProperty(BiomajConst.dbNameProperty)==null)
+ throw new BuildException("Internal error biomaj: property db.name not initialized!");
+
+ return arg0.getProject().getProperty(BiomajConst.dbNameProperty);
+ }
+
+
+ public static String getNameDirectoryFuturRelease(Project p) throws BiomajBuildException {
+ File f = new File(p.getProperty(BiomajConst.dataDirProperty)+"/"+p.getProperty(BiomajConst.versionDirProperty)+"/"+BiomajConst.futureReleaseLink);
+
+ if (!f.exists())
+ throw new BiomajBuildException(p,"error.futur.release.not.exist",f.getAbsolutePath(),new Exception());
+ try {
+ return f.getCanonicalPath();
+ } catch (IOException ioe) {
+ throw new BiomajBuildException(p,"io.error",ioe.getMessage(),ioe);
+ }
+ }
+
+
+ /**
+ * Recursively lists the content of the given directory.
+ * Hidden files are not taken into account.
+ *
+ * @param dir
+ * @param result
+ * @throws BiomajException
+ */
+ public static void getListFilesFromDir(String dir,Vector<FileDesc> result) throws BiomajException {
+
+ if (result == null)
+ return;
+
+ File d = new File(dir);
+ File[] l = d.listFiles();
+ for (File f : l) {
+ if (!f.isDirectory()) {
+ if (!f.isHidden())
+ result.add(new FileDesc(f,false));
+ }
+ else
+ getListFilesFromDir(f.getAbsolutePath(),result);
+ }
+
+ }
+
+ /**
+ * remove string ".."
+ * @param path
+ */
+ public static String getNormalizedPath(String path) {
+
+ String[] dirs = path.split("/");
+
+ String newValue=null;
+
+ for (String dir : dirs) {
+ if ((dir.compareTo("..")==0)&&(newValue!=null)) {
+ int lastDir = newValue.lastIndexOf("/");
+ if (lastDir==-1)
+ newValue = null;
+ else
+ newValue = newValue.substring(0, lastDir);
+ } else {
+ if (newValue==null)
+ newValue = dir;
+ else
+ newValue = newValue+"/"+dir;
+ }
+ }
+ return newValue;
+ }
+
+ public static void freeMemory() {
+ float percentFree = Runtime.getRuntime().freeMemory()/Runtime.getRuntime().maxMemory();
+ if (percentFree<0.2) {
+ System.out.println("call garbage....");
+ System.out.println("before["+Float.toString(percentFree*100)+"]");
+ Runtime.getRuntime().gc();
+ percentFree = Runtime.getRuntime().freeMemory()/Runtime.getRuntime().maxMemory();
+ System.out.println("next["+Float.toString(percentFree*100)+"]");
+ }
+ }
+
+
+ /**
+ * This function takes a filename from an ftp listing as input and returns
+ * the local filename. It is used to transform files like gbest120.seq.gz into
+ * gbest120.seq. It uses the local file pattern set by {@link #setFtpLocalFiles(String) setFtpLocalFiles}
+ *
+ * @param file A string representing the remote filename. Multiple patterns can be supplied by
+ * separating them with commas ','.
+ * @return String containing the filename on the local disk.
+ */
+ public static String getLocalFileName(String file) {
+
+ //Trop de bug avec le math sur le localfiles....
+ //simplement on enleve tous les extensions connues de compression;
+ String result = file.replace(".gz", "");
+ result = result.replace(".Z", "");
+ result = result.replace(".gzip", "");
+ result = result.replace(".zip", "");
+ return result;
+ }
+
+ public static void changeKey(File propertyFile,String key,String value) throws BiomajException {
+
+ if ((propertyFile == null) || (!propertyFile.exists()))
+ {
+ if (propertyFile != null)
+ BiomajLogger.getInstance().log("File ["+propertyFile.getAbsolutePath()+"] does not exist !");
+ else
+ BiomajLogger.getInstance().log("Bad value for var File [null]");
+
+ BiomajLogger.getInstance().log("key ["+key+"] --> can't be set with ["+value+"]");
+ return ;
+ }
+ try {
+ BufferedReader in = new BufferedReader(new FileReader(propertyFile.getAbsolutePath()));
+ BufferedWriter out = new BufferedWriter(new FileWriter(propertyFile.getAbsolutePath()+".tmp"));
+ String line = null ;
+ Pattern patKey = Pattern.compile("^\\s*"+key+"\\s*=\\S+");
+
+ while ((line = in.readLine()) != null) {
+ Matcher match = patKey.matcher(line);
+ if (match.find()) {
+ out.write(key+"="+value+"\n");
+ } else
+ out.write(line+"\n");
+ }
+ in.close();
+ out.close();
+ new File (propertyFile.getAbsolutePath()+".tmp").renameTo(propertyFile);
+
+ } catch (Exception e) {
+ throw new BiomajException(e);
+ }
+ }
+
+ public static String getHexString(byte[] buf) {
+ char[] TAB_BYTE_HEX = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
+ '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
+ StringBuilder sb = new StringBuilder(buf.length * 2);
+
+ for (int i = 0; i < buf.length; i++) {
+ sb.append(TAB_BYTE_HEX[(buf[i] >>> 4) & 0xf]);
+ sb.append(TAB_BYTE_HEX[buf[i] & 0x0f]);
+ }
+ return sb.toString();
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/HttpAuthenticateProxy.java
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/HttpAuthenticateProxy.java (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/HttpAuthenticateProxy.java 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,70 @@
+/**
+ * Copyright Copr. INRIA/INRA
+ * Contact : biomaj_AT_genouest.org
+ *
+ * BioMAJ is a workflow engine dedicated to biological bank management.
+ * The Software automates the update cycle and the supervision of the locally
+ * mirrored bank repository. The project is a collaborative effort between two
+ * French Research Institutes INRIA (Institut National de Recherche en
+ * Informatique
+ * et en Automatique) & INRA (Institut National de la Recherche Agronomique).
+ *
+ * Inter Deposit Digital Number : IDDN ...................................
+ *
+ * This software is governed by the CeCILL-A license under French law and
+ * abiding by the rules of distribution of free software. You can use,
+ * modify and/ or redistribute the software under the terms of the CeCILL-B
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty and the software's author, the holder of the
+ * economic rights, and the successive licensors have only limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading, using, modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean that it is complicated to manipulate, and that also
+ * therefore means that it is reserved for developers and experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and, more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL-A license and that you accept its terms.
+ */
+
+
+package org.inria.biomaj.utils;
+
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+
+public class HttpAuthenticateProxy extends Authenticator {
+
+ /**
+ * @uml.property name="username"
+ */
+ private String username;
+ /**
+ * @uml.property name="password"
+ */
+ private String password;
+
+ public HttpAuthenticateProxy(String username,String password) {
+
+ this.username = username;
+ this.password = password;
+ }
+
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ // TODO Auto-generated method stub
+ return new PasswordAuthentication(username,password.toCharArray());
+ }
+
+}
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/package.html
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/package.html (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/src/org/inria/biomaj/utils/package.html 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Package-level Javadoc</title>
+</head>
+<body>
+Definition of commons methodes and constantes.
+</body>
+</html>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank.xsd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank.xsd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank.xsd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="allUpdate" type="xs:string" />
+
+ <xs:element name="bank">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="configuration" maxOccurs="unbounded" />
+ <xs:element ref="production" />
+ </xs:sequence>
+ <xs:attribute name="xsi:noNamespaceSchemaLocation" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="configuration">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element ref="allUpdate" />
+ <xs:element ref="localInfos" />
+ <xs:element ref="remoteInfos" />
+ <xs:element ref="updateBank" />
+ </xs:choice>
+ <xs:attribute name="date" type="xs:string" use="required" />
+ <xs:attribute name="file" type="xs:string" use="required" />
+ <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="dbFullname">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="dbName">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="dbType">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="directory">
+ <xs:complexType>
+ <xs:attribute name="remove" type="xs:string" use="optional" />
+ <xs:attribute name="creation" type="xs:string" use="required" />
+ <xs:attribute name="size" type="xs:string" use="required" />
+ <xs:attribute name="state" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="available" />
+ <xs:enumeration value="deleted" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="session" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="path" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="dolinkcopy">
+ <xs:complexType>
+ <xs:attribute name="value" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="frequency">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="localFiles">
+ <xs:complexType>
+ <xs:attribute name="regexp" type="xs:string" use="required" fixed="imgt*\.*" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="localInfos">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element ref="dolinkcopy" />
+ <xs:element ref="frequency" />
+ <xs:element ref="localFiles" />
+ <xs:element ref="logFile" />
+ <xs:element ref="nversions" />
+ <xs:element ref="offlineDirectory" />
+ <xs:element ref="releaseInfo" />
+ <xs:element ref="remoteFiles" />
+ <xs:element ref="versionDirectory" />
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="logFile">
+ <xs:complexType>
+ <xs:attribute name="value" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="nversions">
+ <xs:complexType>
+ <xs:attribute name="nb" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="offlineDirectory">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="production">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="directory" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="productionDirectory">
+ <xs:complexType>
+ <xs:attribute name="deployed" type="xs:NMTOKEN" use="required" fixed="true" />
+ <xs:attribute name="path" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="protocol">
+ <xs:complexType mixed="true">
+ <xs:attribute name="port" type="xs:NMTOKEN" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="release">
+ <xs:complexType>
+ <xs:attribute name="value" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="releaseInfo">
+ <xs:complexType>
+ <xs:attribute name="file" type="xs:NMTOKEN" use="required" fixed="currentRelease" />
+ <xs:attribute name="regexp" type="xs:string" use="required" fixed="[\d-]+" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="remoteDir">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="remoteFiles">
+ <xs:complexType>
+ <xs:attribute name="regexp" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="remoteInfos">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="serverInfo" />
+ <xs:element ref="remoteDir" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="server">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="serverInfo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="protocol" />
+ <xs:element ref="dbName" />
+ <xs:element ref="dbFullname" />
+ <xs:element ref="dbType" />
+ <xs:element ref="server" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="sizeDownload">
+ <xs:complexType>
+ <xs:attribute name="size" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="sizeRelease">
+ <xs:complexType>
+ <xs:attribute name="size" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="updateBank">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="xi:include" maxOccurs="unbounded" />
+ <xs:element ref="workflowInfo" />
+ </xs:sequence>
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="ellapsedTime" type="xs:NMTOKEN" use="optional" />
+ <xs:attribute name="nbSessions" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="1" />
+ <xs:enumeration value="2" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="optional" />
+ <xs:attribute name="idLastSession" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="update" type="xs:NMTOKEN" use="required" fixed="true" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="versionDirectory">
+ <xs:complexType mixed="true" />
+ </xs:element>
+
+ <xs:element name="workflowInfo">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element ref="productionDirectory" />
+ <xs:element ref="release" />
+ <xs:element ref="sizeDownload" />
+ <xs:element ref="sizeRelease" />
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="xi:include">
+ <xs:complexType>
+ <xs:attribute name="status" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="false" />
+ <xs:enumeration value="true" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="href" type="xs:string" use="required" />
+ <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank_statefile.xsd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank_statefile.xsd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/bank_statefile.xsd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,429 @@
+<!--
+ Copyright or © or Copr. INRIA/INRA
+ mail David.Allouche at toulouse.inra.fr, Anthony.Assi at irisa.fr,Yoann.Beausse at toulouse.inra.fr,
+ Olivier.Filangi at irisa.fr, Christophe.Caron at jouy.inra.fr,Hugues.Leroy at irisa.fr,Veronique.Martin at jouy.inra.fr
+
+ Biomaj Software is a workflows motor engin dedicated to biological bank managenemt.
+
+ This software is governed by the CeCILL-B license under French law and
+ abiding by the rules of distribution of free software. You can use,
+ modify and/ or redistribute the software under the terms of the CeCILL-B
+ license as circulated by CEA, CNRS and INRIA at the following URL
+ "http://www.cecill.info".
+
+ As a counterpart to the access to the source code and rights to copy,
+ modify and redistribute granted by the license, users are provided only
+ with a limited warranty and the software's author, the holder of the
+ economic rights, and the successive licensors have only limited
+ liability.
+
+ In this respect, the user's attention is drawn to the risks associated
+ with loading, using, modifying and/or developing or reproducing the
+ software by the user in light of its specific status of free software,
+ that may mean that it is complicated to manipulate, and that also
+ therefore means that it is reserved for developers and experienced
+ professionals having in-depth computer knowledge. Users are therefore
+ encouraged to load and test the software's suitability as regards their
+ requirements in conditions enabling the security of their systems and/or
+ data to be ensured and, more generally, to use and operate it in the
+ same conditions as regards security.
+
+ The fact that you are presently reading this means that you have had
+ knowledge of the CeCILL-B license and that you accept its terms.
+-->
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:complexType name="productionType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" minOccurs="0"
+ name="directory" type="directoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ L'ensemble des repertoire mis en production
+ depuis la premiere mise à jour du fichier
+ statefile. Un repertoire à 2 etat : "available"
+ ou "deleted",
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="configurationType">
+
+ <xsd:sequence>
+ <xsd:element maxOccurs="1" minOccurs="1" name="remoteInfos"
+ type="remoteInfosType">
+ </xsd:element>
+ <xsd:element maxOccurs="1" minOccurs="1" name="localInfos"
+ type="localInfosType">
+ </xsd:element>
+ <xsd:element maxOccurs="unbounded" minOccurs="1"
+ name="updateBank" type="updateBankType">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:long" />
+ <xsd:attribute name="date" type="bmj-date" />
+ <xsd:attribute name="file" type="xsd:string" />
+ </xsd:complexType>
+
+
+
+
+
+
+ <xsd:complexType name="directoryType">
+ <xsd:attribute name="state" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="available" />
+ <xsd:enumeration value="deleted" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="creation" type="xsd:string" use="required" />
+ <xsd:attribute name="remove" type="xsd:string" use="optional" />
+ <xsd:attribute name="path" type="xsd:string" />
+ <xsd:attribute name="session" type="xsd:long" use="required" />
+ <xsd:attribute name="size" type="xsd:string" use="required" />
+ </xsd:complexType>
+
+ <xsd:complexType name="localInfosType">
+ <xsd:sequence>
+ <xsd:element name="offlineDirectory" type="xsd:string" />
+ <xsd:element name="versionDirectory" type="xsd:string" />
+ <xsd:element name="frequency" type="xsd:int" />
+ <xsd:element name="releaseInfo" type="releaseInfoType" />
+ <xsd:element name="remoteFiles"
+ type="RegularExpressionType" />
+ <xsd:element name="localFiles" type="RegularExpressionType" />
+ <xsd:element name="nversions" type="nbVersionType" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="remoteInfosType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="1" minOccurs="1" name="serverInfo"
+ type="serverInfoType" />
+ <xsd:element maxOccurs="1" minOccurs="1" name="remoteDir"
+ type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="updateBankType">
+ <xsd:sequence>
+ <xsd:element name="session" type="sessionType"
+ maxOccurs="unbounded" minOccurs="1">
+ </xsd:element>
+ <xsd:element name="workflowInfo" type="workflowInfoType"></xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="start" type="bmj-date" use="required"></xsd:attribute>
+ <xsd:attribute name="end" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="elapsedTime" type="bmj-time"></xsd:attribute>
+ <xsd:attribute name="update" type="xsd:boolean"></xsd:attribute>
+ <xsd:attribute name="nbSessions" type="xsd:int"></xsd:attribute>
+ <xsd:attribute name="idLastSession" type="xsd:long"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="serverInfoType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="1" minOccurs="1" name="protocol">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="ftp" />
+ <xsd:enumeration value="rsync" />
+ <xsd:enumeration value="local" />
+ <xsd:enumeration value="http" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element maxOccurs="1" minOccurs="1" name="dbName"
+ type="xsd:string" />
+ <xsd:element maxOccurs="1" minOccurs="1" name="dbFullname"
+ type="xsd:string" />
+ <xsd:element minOccurs="1" name="dbType" type="xsd:string" />
+ <xsd:element maxOccurs="1" minOccurs="1" name="server"
+ type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="releaseInfoType">
+ <xsd:attribute name="regexp" type="xsd:string" />
+ <xsd:attribute name="file" type="xsd:string" />
+ </xsd:complexType>
+
+ <xsd:complexType name="RegularExpressionType">
+ <xsd:attribute name="regexp" type="xsd:string" />
+ </xsd:complexType>
+
+ <xsd:complexType name="bankType">
+ <xsd:sequence>
+ <xsd:element name="configuration"
+ type="configurationType">
+ </xsd:element>
+ <xsd:element name="production" type="productionType" />
+ </xsd:sequence>
+ <xsd:anyAttribute />
+ </xsd:complexType>
+
+ <xsd:element name="bank" type="bankType" />
+
+ <xsd:simpleType name="bmj-date">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern
+ value="[0-9]{2}-[0-9]{2}-[0-9]{4}\s[0-9]{2}:[0-9]{2}">
+ </xsd:pattern>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="bmj-time">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[0-9]{2}:[0-9]{2}:[0-9]{2}"></xsd:pattern>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="nbVersionType">
+ <xsd:attribute name="nb" type="xsd:int"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="sessionType">
+ <xsd:sequence>
+ <xsd:element name="preprocess" type="preprocessTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="release" type="releaseTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="check" type="checkTaskType" maxOccurs="1"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="download" type="downloadTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="extract" type="extractTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="addLocalFiles"
+ type="addLocalFilesTaskType" maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="makeRelease" type="makeReleaseTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="postprocess" type="postprocessTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="deployment" type="deploymentTaskType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="warning" type="messageType" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ <xsd:element name="error" type="messageType" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:long"></xsd:attribute>
+ <xsd:attribute name="start" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="end" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="elapsedTime" type="bmj-time"></xsd:attribute>
+ <xsd:attribute name="logfile" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="status" type="xsd:boolean"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="workflowInfoType">
+ <xsd:sequence>
+ <xsd:element name="release" type="releaseType" maxOccurs="1"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="productionDirectory"
+ type="productionDirectoryType" maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="sizeDownload" type="sizeType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="sizeRelease" type="sizeType"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="releaseType">
+ <xsd:attribute name="value" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="productionDirectoryType">
+ <xsd:attribute name="path" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="deployed" type="xsd:boolean"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="sizeType">
+ <xsd:attribute name="size" type="bmj-size"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="simpleTaskSessionType">
+ <xsd:sequence>
+ <xsd:element name="files" type="filesType" maxOccurs="1"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="move" type="filesType" maxOccurs="1"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="copy" type="filesType" maxOccurs="1" minOccurs="0"></xsd:element>
+ <xsd:element name="warning" type="messageType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="error" type="messageType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="start" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="end" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="elapsedTime" type="bmj-time"></xsd:attribute>
+ <xsd:attribute name="status" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="messageType">
+ <xsd:attribute name="message" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="preprocessTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ <xsd:sequence>
+ <xsd:element name="metaprocess" type="metaProcessType" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="nbreMetaProcess" type="xsd:int"></xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="releaseTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ <xsd:attribute name="value" type="xsd:string"></xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="checkTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ <xsd:attribute name="nbextract" type="xsd:int"></xsd:attribute>
+ <xsd:attribute name="nbLocalOnlineFiles" type="xsd:int"></xsd:attribute>
+ <xsd:attribute name="nbLocalOfflineFiles" type="xsd:int"></xsd:attribute>
+ <xsd:attribute name="nbDownloadFiles" type="xsd:int"></xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="downloadTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ <xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="bandWidth" type="xsd:float"></xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="extractTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="addLocalFilesTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="makeReleaseTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ <xsd:attribute name="nbFilesMoved" type="xsd:int"></xsd:attribute>
+ <xsd:attribute name="nbFilesCopied" type="xsd:int"></xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="postprocessTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="preprocessTaskType">
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="deploymentTaskType">
+ <xsd:complexContent>
+ <xsd:extension base="simpleTaskSessionType">
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="filesType">
+ <xsd:sequence>
+ <xsd:element name="file" type="fileWithAttributsType" maxOccurs="unbounded" minOccurs="1"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="fileWithAttributsType">
+ <xsd:attribute name="location" type="xsd:string"
+ use="required">
+ </xsd:attribute>
+ <xsd:attribute name="size" type="xsd:long" use="required"></xsd:attribute>
+ <xsd:attribute name="time" type="xsd:long" use="required"></xsd:attribute>
+ <xsd:attribute name="link" type="xsd:boolean"></xsd:attribute>
+ <xsd:attribute name="extract" type="xsd:boolean"></xsd:attribute>
+ <xsd:attribute name="volatile" type="xsd:boolean"></xsd:attribute>
+ <xsd:attribute name="refHash" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:simpleType name="bmj-size">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[0-9]*(,[0-9]*)?(K|M|G|T)"></xsd:pattern>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="metaProcessType">
+ <xsd:sequence>
+ <xsd:element name="process" type="processType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="warning" type="messageType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="error" type="messageType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="start" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="end" type="bmj-date"></xsd:attribute>
+ <xsd:attribute name="elapsedTime" type="bmj-time"></xsd:attribute>
+ <xsd:attribute name="status" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="logfile" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="xml:base" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="processType">
+ <xsd:sequence>
+ <xsd:element name="files" type="filesType" maxOccurs="1"
+ minOccurs="1">
+ </xsd:element>
+ <xsd:element name="warning" type="messageType"></xsd:element>
+ <xsd:element name="error" type="messageType"></xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="keyname" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="exe" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="args" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="desc" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="type" type="xsd:string"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:attribute name="NewAttribute" type="xsd:string"></xsd:attribute>
+
+</xsd:schema>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/biomaj_common.xml
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/biomaj_common.xml (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/biomaj_common.xml 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,160 @@
+<?xml version="1.0" ?>
+<!--
+ Copyright or © or Copr. INRIA/INRA
+ mail David.Allouche at toulouse.inra.fr, Anthony.Assi at irisa.fr,Yoann.Beausse at toulouse.inra.fr,
+ Olivier.Filangi at irisa.fr, Christophe.Caron at jouy.inra.fr,Hugues.Leroy at irisa.fr,Veronique.Martin at jouy.inra.fr
+
+ Biomaj Software is a workflows motor engin dedicated to biological bank managenemt.
+
+ This software is governed by the CeCILL-B license under French law and
+ abiding by the rules of distribution of free software. You can use,
+ modify and/ or redistribute the software under the terms of the CeCILL-B
+ license as circulated by CEA, CNRS and INRIA at the following URL
+ "http://www.cecill.info".
+
+ As a counterpart to the access to the source code and rights to copy,
+ modify and redistribute granted by the license, users are provided only
+ with a limited warranty and the software's author, the holder of the
+ economic rights, and the successive licensors have only limited
+ liability.
+
+ In this respect, the user's attention is drawn to the risks associated
+ with loading, using, modifying and/or developing or reproducing the
+ software by the user in light of its specific status of free software,
+ that may mean that it is complicated to manipulate, and that also
+ therefore means that it is reserved for developers and experienced
+ professionals having in-depth computer knowledge. Users are therefore
+ encouraged to load and test the software's suitability as regards their
+ requirements in conditions enabling the security of their systems and/or
+ data to be ensured and, more generally, to use and operate it in the
+ same conditions as regards security.
+
+ The fact that you are presently reading this means that you have had
+ knowledge of the CeCILL-B license and that you accept its terms.
+-->
+<project name="biomaj_common" basedir="../">
+
+ <property name="project.name" value="biomaj"/>
+ <property name="project.version" value="1.0"/>
+ <property name="lib.dir" location="lib"/>
+ <property name="projectfiles.dir" location="workflows"/>
+
+
+ <property environment="env"/>
+
+ <property file="${env.BIOMAJ_ROOT}/general.conf"/>
+
+
+ <fail message="Property [statefiles.dir] is not defined in ${env.BIOMAJ_ROOT}/general.conf" unless="statefiles.dir" />
+ <fail message="Property [log.dir] is not defined in ${env.BIOMAJ_ROOT}/general.conf" unless="log.dir"/>
+ <fail message="Property [workflows.dir] is not defined in ${env.BIOMAJ_ROOT}/general.conf" unless="workflows.dir"/>
+ <fail message="Property [webreport.dir] is not defined in ${env.BIOMAJ_ROOT}/general.conf" unless="webreport.dir"/>
+ <fail message="Property [tmp.dir] is not defined in ${env.BIOMAJ_ROOT}/general.conf" unless="tmp.dir"/>
+
+ <property name="dbprop.dir" location="${workflows.dir}/"/>
+ <property name="bin.dir" location="bin"/>
+ <property name="api.dir" location="${docs.dir}/api"/>
+ <property name="xslt.dir" location="xslt"/>
+ <property name="rapport.dir" value="${webrepport.dir}"/>
+ <property name="runtime.dir" location="${log.dir}/${db.name}/runtime/"/>
+
+
+ <!-- Sub project files for building the java source and the database mirroring. -->
+ <property name="build.file" value="build-dist.xml"/>
+ <property name="biomaj-listener.file" value="biomaj-listener.xml"/>
+ <property name="mirror.file" value="mirror.xml"/>
+
+
+ <!--===================== End of Properties =======================-->
+
+ <!--========================Classpaths=========================-->
+ <path id="compile.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="run.classpath">
+ <path refid="compile.classpath"/>
+ <!--
+ Add other jar files here if necessary.
+ -->
+ </path>
+
+ <!-- Set ant to use the built in Sun java regex -->
+ <!--
+ # org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
+ # org.apache.tools.ant.util.regexp.JakartaOroRegexp
+ # org.apache.tools.ant.util.regexp.JakartaRegexpRegexp
+ -->
+ <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/>
+
+ <!--=================Properties====================-->
+
+ <!-- Read in the global properties that weren't overloaded by the database properties file. -->
+ <property file="${dbprop.dir}/global.properties"/>
+ <mkdir dir="${runtime.dir}"/>
+ <!-- Set the names for the database log files -->
+ <property name="wget.out.log" location="${runtime.dir}/${db.name}.wget.log"/>
+ <property name="wget.err.log" location="${runtime.dir}/${db.name}.wget.err"/>
+ <property name="wget.filelist" location="${runtime.dir}/${db.name}.diff.filelist"/>
+ <property name="wget.copy.filelist" location="${runtime.dir}/${db.name}.copy.filelist"/>
+ <property name="extract.filelist" location="${runtime.dir}/${db.name}.extract.filelist"/>
+ <property name="protocol.listing.file" location="${runtime.dir}/${db.name}.remote.filelist"/>
+ <property name="keep.offline.listing.file" location="${runtime.dir}/${db.name}.keep.offline.filelist"/>
+ <property name="up2date.file" location="${runtime.dir}/${db.name}.update.properties"/>
+ <property name="current.release.file" location="${runtime.dir}/${db.name}.release"/>
+ <!--
+ Temp file used to store symlink information during the copy phase.
+ This file is written in the offline database directory
+ -->
+ <property name="link.file.name" value="${db.name}_links.txt"/>
+ <!-- Set the online and offline directories for the database. -->
+ <property name="offline.dir" location="${data.dir}/${offline.dir.name}"/>
+
+ <!-- To handle internal error. -->
+ <property name="biomaj.error" value="__internal_error"/>
+
+ <!--================End of Properties===================-->
+
+ <!--==================Taskdefs Citrina =======================-->
+ <typedef name="bmaj-directoryhasfiles" classname="org.gmod.biomaj.ant.conditions.DirectoryHasFilesCondition" classpathref="run.classpath"/>
+ <typedef name="bmaj-include-filename-regex" classname="org.gmod.ant.selectors.FilenamePatternSelector" classpathref="run.classpath"/>
+ <typedef name="bmaj-symlinklist" classname="org.gmod.biomaj.ant.task.SymlinkList" classpathref="run.classpath"/>
+ <taskdef name="bmaj-filecheck" classname="org.gmod.biomaj.ant.task.net.FileCheck" classpathref="run.classpath"/>
+ <!--================End of Taskdefs Citrina ====================-->
+
+ <!--==================Taskdefs Biomaj =======================-->
+ <typedef name="bmaj-exclude-filename-regex" classname="org.gmod.ant.selectors.FilenamePatternExcludeSelector" classpathref="run.classpath"/>
+ <taskdef name="bmaj-remotelisting" classname="org.inria.biomaj.ant.task.net.BmajRemoteListing" classpathref="run.classpath"/>
+ <taskdef name="bmaj-link" classname="org.inria.biomaj.ant.task.BmajLink" classpathref="run.classpath"/>
+ <taskdef name="bmaj-release" classname="org.inria.biomaj.ant.task.net.BmajGetRelease" classpathref="run.classpath"/>
+ <taskdef name="bmaj-frequency" classname="org.inria.biomaj.ant.task.BmajCheckFrequency" classpathref="run.classpath"/>
+ <taskdef name="bmaj-versionsmanagement" classname="org.inria.biomaj.ant.task.BmajVersionManagement" classpathref="run.classpath"/>
+ <taskdef name="bmaj-rsync" classname="org.inria.biomaj.ant.task.net.BmajRsync" classpathref="run.classpath"/>
+ <taskdef name="bmaj-wget" classname="org.inria.biomaj.ant.task.net.BmajWget" classpathref="run.classpath"/>
+ <taskdef name="bmaj-sftp" classname="org.inria.biomaj.ant.task.net.BmajSftp" classpathref="run.classpath"/>
+ <taskdef name="bmaj-download" classname="org.inria.biomaj.ant.task.net.BmajDownload" classpathref="run.classpath"/>
+ <taskdef name="bmaj-copy" classname="org.inria.biomaj.ant.task.BmajCopy" classpathref="run.classpath"/>
+ <taskdef name="bmaj-delete" classname="org.inria.biomaj.ant.task.BmajDelete" classpathref="run.classpath"/>
+ <taskdef name="bmaj-execute" classname="org.inria.biomaj.ant.task.BmajExecute" classpathref="run.classpath"/>
+ <taskdef name="bmaj-extract" classname="org.inria.biomaj.ant.task.BmajExtract" classpathref="run.classpath"/>
+ <taskdef name="bmaj-getrelativepath" classname="org.inria.biomaj.ant.task.BmajGetRelativePath" classpathref="run.classpath"/>
+ <taskdef name="bmaj-move" classname="org.inria.biomaj.ant.task.BmajMove" classpathref="run.classpath"/>
+ <taskdef name="bmaj-createlistlinkfilename" classname="org.inria.biomaj.ant.task.BmajCreateListLinkFileName" classpathref="run.classpath"/>
+ <taskdef name="bmaj-addlocalfile" classname="org.inria.biomaj.ant.task.BmajAddLocalFile" classpathref="run.classpath"/>
+ <taskdef name="bmaj-checkfreespace" classname="org.inria.biomaj.ant.task.BmajCheckFreeSpace" classpathref="run.classpath"/>
+ <!-- Fixed a bug from original ant symlink task -->
+ <taskdef name="bmaj-symlink" classname="org.inria.biomaj.ant.task.BmajSymlink" classpathref="run.classpath"/>
+
+ <!--==================Taskdefs Biomaj =======================-->
+
+ <!-- Bring in the ant-contrib package. -->
+ <taskdef resource="net/sf/antcontrib/antlib.xml" onerror="fail" >
+ <classpath>
+ <pathelement location="${lib.dir}/ant-contrib-1.0b3.jar"/>
+ </classpath>
+ </taskdef>
+
+
+</project>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/handle_process.xml
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/handle_process.xml (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/handle_process.xml 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,62 @@
+<?xml version="1.0" ?>
+<!--
+ Copyright or � or Copr. INRIA/INRA
+ mail David.Allouche at toulouse.inra.fr, Anthony.Assi at irisa.fr,Yoann.Beausse at toulouse.inra.fr,
+ Olivier.Filangi at irisa.fr, Christophe.Caron at jouy.inra.fr,Hugues.Leroy at irisa.fr,Veronique.Martin at jouy.inra.fr
+
+ Biomaj Software is a workflows motor engin dedicated to biological bank managenemt.
+
+ This software is governed by the CeCILL-B license under French law and
+ abiding by the rules of distribution of free software. You can use,
+ modify and/ or redistribute the software under the terms of the CeCILL-B
+ license as circulated by CEA, CNRS and INRIA at the following URL
+ "http://www.cecill.info".
+
+ As a counterpart to the access to the source code and rights to copy,
+ modify and redistribute granted by the license, users are provided only
+ with a limited warranty and the software's author, the holder of the
+ economic rights, and the successive licensors have only limited
+ liability.
+
+ In this respect, the user's attention is drawn to the risks associated
+ with loading, using, modifying and/or developing or reproducing the
+ software by the user in light of its specific status of free software,
+ that may mean that it is complicated to manipulate, and that also
+ therefore means that it is reserved for developers and experienced
+ professionals having in-depth computer knowledge. Users are therefore
+ encouraged to load and test the software's suitability as regards their
+ requirements in conditions enabling the security of their systems and/or
+ data to be ensured and, more generally, to use and operate it in the
+ same conditions as regards security.
+
+ The fact that you are presently reading this means that you have had
+ knowledge of the CeCILL-B license and that you accept its terms.
+-->
+<project name="handle_process" basedir="../" >
+ <import file="biomaj_common.xml"/>
+
+ <description>
+ Ant file that controls processing biological database files.
+ </description>
+
+ <target name="execute_process_sequentialy">
+ <fail unless="list_process_seq">
+ The required property list_post_process was not specified.
+ </fail>
+ <foreach list="${list_process_seq}" target="execute_process" delimiter="," inheritall="true" inheritrefs="true" param="name_process" trim="true" parallel="false"/>
+ </target>
+
+ <target name="execute_process">
+ <property file="${up2date.file}"/>
+ <bmaj-execute
+ keyName="${name_process}"
+ name ="${name_process}.name"
+ exe ="${name_process}.exe"
+ args ="${name_process}.args"
+ description ="${name_process}.desc"
+ type ="${name_process}.type"
+ killAllOnError ="${name_process}.killAllOnError"
+ timeout ="${name_process}.timeout"
+ />
+ </target>
+</project>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/messages.properties
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/messages.properties (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/messages.properties 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,156 @@
+
+# USERS ERRORS DEFINITION
+unknown.error=Unknown error, message:$0
+io.error = I/O error, message:$0
+interrupted.exeception.error=Interrupted exception:$0.
+kill.application=\n ** Biomaj stopped. \n ** Please consult the logs [$0] to obtain more information.
+kill.application.withoutlog=\n ** Biomaj stopped.
+directory.not.exist=Directory $0 does not exist!
+biomaj.property.define.error=$0 : Biomaj property $1 not set. Please check your properties file.
+error.dev=$0.
+
+
+#DEVEL
+xml.statefile.corrupted=State file is corrupted. BioMAJ can't add information. Please, erase last tags or delete the statefile.
+session.not.find=Internal error : Can't use getSession if no XmlBankLogger is defined!
+session.not.find.session=Can't find xml file session : $0.
+error.implementation.find=Internal error : Can't find implementation of:$0
+directoryHasFilesCondition.error.fileset=Internal error : A fileset should be provided!
+bmajVersionManagement.error.copy=Internal error : $0 can't be copied (not exist!)
+bmajVersionManagement.error.construction.name=Internal error : bad directory version name. Biomaj c'ant create release directory.\n Check release.regexp in properties file.
+bmajVersionManagement.error.directory.find=Internal error : one subdirectory with remote release has been created, but is not find !
+bmajVersionManagement.error.create.directory=Internal error : $0, this directory ever exist,it can't be created!
+bmajVersionManagement.error.devl=Internal error : $0, bad mode. there are only "create" or "get".
+fileCheck.error.extract.file=Internal error : File $0, Can't write fileName in extract file list.
+fileCheck.error.add.file=Internal error : File $0, Can't write fileName in copy file list.
+ftplistingParser.error.init=Internal error : Initialize a line on a ListingParser before parse!
+ftplistingParser.error.match=Internal error : No matches found for line : $0.
+getRelease.error.directory.mis=Internal error : Remote Directory is required for GetRelease Task!
+rsyncListingParser.error.init=Internal error : Initialize a line on a ListingParser before parse!
+rsyncListingParser.error.parse=Internal error : A problem occurs during parsing line from rsync output \nline:$0
+rsyncListingParser.error.link=Internal error : Link are not managed in rsync mode!\nline:$0
+bmajtask.error.parse.downloadfile=Internal error : expression [$0] can't be parse.
+ftpimpl.error.algo=Internal error : Problem on algo listingFtpClient!
+ftpimpl.error.match=Internal error : Couldn't match any date/file size in text:$0
+bankfactory.error.banks.blank=$0 : Internal error : Can't create a bank with no name.
+bankfactory.recursive.key=error :definition of a recursive key : [$0].
+bmajVersionManagement.error.releasename=Can't get a release from this directory name : $0.
+process.error.name.config=Attribute name not set in object Configuration : $0.
+process.error.session.current=Current Session is not initialized : $0.
+
+#GENERALS ERRORS
+error.remote.directory.malformed=Remote directory not found : $0.\nPlease check the properties file or remote server organization.
+error.remote.port.malformed=Port number have to be defined in the property file.
+error.futur.release.not.exist=Can't find $0 directory.
+remotebankworkflow.error.session.find=Can't get a valid update.
+remotebankworkflow.error.configuration.find=Can't get a last valid configuration.
+
+# ERRORS
+error.not.find.properties=$0 properties file not found. db.name must have the same name that the argument name bank give with -update!
+inputvalidation.checkstring=Biomaj property $0 not set. Please check your property file.
+
+bmajCheckFrequency.error.frequency=Frequency update error : [frequency:"$0"]\nValue have to be a integer.\nCheck frequency update in property file.
+bmajcheckfrequency.error.date=Frequency update error : [session update:$0][today:$1][freq prop:$2]\nValue have to be a integer.\nCheck frequency update in property file.
+
+bmajExtract.error.file=Extract error on file:$0.
+bmajExtract.error.exec=Binary not found : $0.
+bmajExtract.error.format=Extract error : $0 Compression format unknown.
+
+bmajVersionManagement.error.number=Keep.old.version error : [$0] \nKeep.old.version must be a postive integer.\nPlease check your properties file.
+bmajVersionManagement.error.root.exist=Directory version not found [$0].
+
+bmajVersionManagement.error.xml=xml state file not found.
+bmajVersionManagement.error.link=Can't create link $0.
+bmajVersionManagement.error.delete.link.current=Can't delete current link.
+bmajVersionManagement.create.link=Can't create link $0 on directory $1.
+bmajVersionManagement.error.rebuild.statefile=Current directory on statefile [$0] don't check with current link [$1].
+bmajVersionManagement.error.current.not.exist=Current directory [$0] not find in statefile database.
+
+fileCheck.error.correct.file=$0 is not a valid file or is not readable.
+
+
+getRelease.error.remote.attributes.malformed=Task release error : unable to extract the remote server date.\nCheck your properties file or the remote server state.
+getRelease.error.date.format.malformed=release.dateformat is not correctly specified:$0.\nPlease check global properties file.
+rsync.error.binary=To use rsync mode, you have to define the binary rsync.bin in general.conf file.
+rsync.error.download=Download error : $0 transfert error.
+copy.error=Copy error : $0 file copy error.
+wget.error.download=Download error : transfert error.
+bmajGetRelativePath.error.file=Link error : $0 doesn't exist!
+
+#developp error
+
+ftp.error.link.invalid=Ftp error : $0 is a dead link on remote server.
+
+bankfactory.error.incompatible.virtual.depends=Biomaj error : Conflict between virtual.bank.list and db.depends.list, Please check $0.properties.
+bankfactory.error.banks.exist=Bank "$0" not found. Check $0.properties is set.
+bankfactory.error.property.exist=Property "$0" is not defined in the properties in $1.
+bankfactory.error.property="Biomaj error : File properties for [$0]"
+bankfactory.error.property.regexpr=Regular expression "$0" from "$1" is mal formed in $2.
+bankfactory.error.process.exist=$0 : Biomaj error : Process $1 not defined in the properties file.
+bankfactory.error.metaprocess.exist=$0 : Biomaj error : MetaProcess $1 not defined in the properties file.
+bankfactory.error.metaprocess.empty=$0 : Meta process $1 is empty.
+bankfactory.error.block.dbproperty=$0 : db.post.process for block $1 is not define.
+bankfactory.error.block-process.name=$0 : Biomaj error : process name can't have the same name with a block.
+bankfactory.error.meta-process.name=$0 : Biomaj error : process name can't have the same name with a meta-process.
+bankfactory.error.block-meta.name=$0 : Biomaj error : meta-process name can't have the same name with a block.
+
+citrinautils.error.property=Biomaj property $0 not set. Please check your properties file.
+citrinautils.error.property.value=Property $0 not correctly set.
+citrinautils.error.project="Internal error: Can't get the project."
+
+workflowengine.error.subprocess=Biomaj find error on sub workflow from $0.
+workflowengine.makeproduction.error=Can't find directory production in this cycle update.
+remotebank.workflow.dirprod.error=No production directory find.
+remotebank.workflow.idsession.dirprod.error=Production directory update with update bank [last session:$0]. Can't get update bank with idLastSession=[$0].
+
+bankset.workflow.error.name.bank.synchro=Can't synchronized block [$1] process on bank [$0] (bank $0 does not exist!).
+bankset.workflow.error.name.block.synchro=Can't synchronized block [$1] process on bank [$0] (block $1 does not exist!).
+computedbank.workflow.error.internal.deps=Bad construc bank.nameblock : [$0].
+computedbank.workflow.error.datalocation=Can't find directory data.location [$0].
+
+workflow.error.synchro.block=Internal error : Block Semaphore [$0] is lock in bank $1!
+workflow.error.synchro.null.block=Internal error : Block Semaphore [$0] is not set in bank $1!
+workflow.error.interrupetd.synchro.block=Internal error : Interrupted exception : $0!
+
+remote.error.autoreconnect=Biomaj failed to connect on the server ($0 tries).
+remote.error.connect=Biomaj can't not connect to $0, message:$1
+remote.error.connection.closed=Biomaj loose connection, message:$0
+ftp.error=FTP error : message:$0
+ftp.socket.error=Socket error, message:$0
+ftp.loggin.error=Login failed: $0
+html.error.malformed=Url mal formed, message:$0
+
+sftp.error.io.fileNotFound=File could not be created or opened
+sftp.error.remoteCommand=Execution of remote command failed
+
+bmajmove.unknow.mode=unknow mode:[$0]
+bmajmove.todir.not.exist=target directory does not exist:[$0]
+
+postprocess.define.process.fail="Process $0 is not defined!"
+workflowengine.subtask.defined="sub task is not defined!"
+
+process.param.undefined="Process $0.$1 is not defined in the bank property."
+process.error="Process $0 (with executable $1) generate an error."
+process.same.name="Two process can't have the same name : $0"
+process.not.blank="Property $0 can't contain blank caractere. ($0=$1)"
+
+xmlwriteandread.error.dbname=Can't write file with dbname :$0.
+remote.file.error:Internal Error::Error with a RemoteFile :$0.
+filedesc.error:Internal Error::Error with a FileDesc :$0.
+
+checkfreespace.error=Production directory does not have enough free space : $0 (need $1).
+banksession.error.addbank=Bank object is ever initialized for bank:[$0].
+banksession.error.nullobject=Bad value to insert bank object [value=null] [dbname:$0].
+banksession.error.getbank=dbName [$0] have not initialized session.
+
+remotebankworkflow.error.change.versiondir=A new version directory have been set [$0]. Please, execute BioMAJ with option --move-production-directories to import old production directories.
+production.directory.does.not.exist=Biomaj does not find production directory:[$0]. Remove [$1] to update the bank.
+
+error.rebuild.execute=A construction version has been detected. Run BioMAJ with --update to finalize the workflow.
+error.rebuild.nofind.updatebank.with.prod.version=Unable to find the corresponding session to update the directory production.
+error.rebuild.nofind.configuration.with.prod.version=Unable to find the corresponding configuration to update the directory production.
+
+cant.write.object.bank.without.config=You can not save the XML bank file without setting the configuration of the bank.
+updatebank.not.find = BioMAJ can't find update bank $0.
+session.not.find= BioMAJ don't find session for bank $0.
+# WARNING DEFINITION
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/mirror.xml
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/mirror.xml (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/mirror.xml 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,678 @@
+<?xml version="1.0" ?>
+<!--
+# Copyright (c) 2004, Indiana University
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Indiana University, Bloomington nor the names
+# of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<project name="mirror" basedir="../">
+ <description>
+ Ant file that controls downloading and the production of biological database files.
+ </description>
+ <import file="biomaj_common.xml"/>
+ <!--==================TARGETS==================-->
+
+ <target name="frequency" if="frequency.update">
+ <bmaj-frequency
+ frequency="${frequency.update}"
+ value="frequency.ok"
+ />
+ <echo message="Allow workflow to ${db.name} by with frequency update ${frequency.update} days : ${frequency.ok}" level="info"/>
+ </target>
+
+ <target name="needCheckRelease">
+
+ <if>
+ <available property="releaseNeeded" value="false" file="${current.release.file}"/>
+ <then>
+ <property file="${current.release.file}"/>
+ <echo message="Load release - value:${remote.release}" level="info"/>
+ </then>
+ <else>
+ <echo message="Need to search release" level="info"/>
+ <property name="releaseNeeded" value="true"/>
+ </else>
+ </if>
+ </target>
+
+ <!--<target name="release" depends="frequency" unless="workflow.stop">-->
+ <target name="release" depends="needCheckRelease" if="releaseNeeded">
+ <!-- If Release file is'nt initialized, the value of release.file is a empty string -->
+ <condition property="release.file" value="">
+ <not>
+ <isset property="release.file" />
+ </not>
+ </condition>
+
+ <condition property="release.regexp" value="">
+ <not>
+ <isset property="release.regexp" />
+ </not>
+ </condition>
+
+ <echo message="Value of release.file:${release.file}" level="debug"/>
+
+ <bmaj-release
+ protocol="${protocol}"
+ server="${server}"
+ port="${port}"
+ username="${username}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ nameFile="${release.file}"
+ regexp="${release.regexp}"
+ dateFormat="${release.dateformat}"
+ releaseProperty="remote.release"
+ />
+
+
+ <!--
+ Checks the remote server for the files specified and generates a listing.
+ The listing is then parsed to extract file dates and these dates are compared to the
+ local dates of either offline or online files.
+ -->
+ <fail message="Internal error : Impossible to find a remote release " unless="remote.release"/>
+ <propertyfile
+ file="${current.release.file}"
+ comment="Release properties">
+ <entry key="remote.release" value="${remote.release}"/>
+ <entry key="adate" type="date" value="now"/>
+ </propertyfile>
+ <echo message="Release found on the remote server:${remote.release}" level="info" />
+ </target>
+
+
+
+ <target name="needDoRemoteLs">
+ <if>
+ <available property="remoteLsNeeded" value="false" file="${protocol.listing.file}"/>
+ <then>
+ <echo message="Remote Ls is ok." level="info"/>
+ </then>
+ <else>
+ <echo message="Need to launch remote ls" level="info"/>
+ <property name="remoteLsNeeded" value="true"/>
+ </else>
+ </if>
+ </target>
+
+ <target name="remoteLs" depends="needDoRemoteLs" if="remoteLsNeeded">
+ <bmaj-remotelisting protocol="${protocol}"
+ server="${server}"
+ port="${port}"
+ username="${username}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ listingfile="${protocol.listing.file}"
+ remotefiles="${remote.files}"
+ excludedfiles="${remote.excluded.files}"
+ />
+ </target>
+
+ <!--
+ Checks the remote server for the files specified and generates a listing.
+ The listing is then parsed to extract file dates and these dates are compared to the
+ local dates of either offline or online files.
+ -->
+ <target name="check" depends="release" unless="workflow.stop">
+
+
+ <condition property="remote.excluded.files" value="">
+ <not>
+ <isset property="remote.excluded.files" />
+ </not>
+ </condition>
+
+ <available file="${data.dir}/${dir.version}/future_release/flat" type="dir" property="futurDirectoryExist"/>
+
+ <if>
+ <istrue value="${futurDirectoryExist}"/>
+ <then>
+ <property name="flat.directory" value="${data.dir}/${dir.version}/future_release/flat"/>
+ </then>
+ <else>
+ <property name="flat.directory" value="${data.dir}/${dir.version}/current/flat"/>
+ </else>
+ </if>
+
+ <runtarget target="remoteLs" />
+ <bmaj-filecheck
+ fromScratch="${fromScratch}"
+ listingfile="${protocol.listing.file}"
+ keepofflinefilelist="${keep.offline.listing.file}"
+ localfiles="${local.files}"
+ output="${wget.filelist}"
+ copyfilelist="${wget.copy.filelist}"
+ extractfilelist="${extract.filelist}"
+ updatefile="${up2date.file}"
+ server="${server}"
+ port="${port}"
+ protocol="${protocol}"
+ remotedir="${remote.dir}"
+ onlinedir="${flat.directory}"
+ offlinedir="${offline.dir}"
+ />
+ <bmaj-delete
+ dir="${offline.dir}"
+ listingExclude="${keep.offline.listing.file}"
+ />
+
+ <!--Read in the number of new files to download -->
+ <property file="${up2date.file}"/>
+
+ <echo level="info">${db.name}: ${num.new.files.download_and_extract} new file(s) to download </echo>
+ <echo level="info">${db.name}: ${num.new.files.extract} new file(s) to extract </echo>
+ </target>
+
+ <!--Downloading and copying of new remotes files-->
+ <!--
+ This task downloads the files needed as determined by the check task above.
+ Downloading is done via wget and the options are specified in the database
+ properties file or the global.properties file if not defined in the database file.
+ -->
+ <target name="download" depends="checkfordownload" if="download.needed" unless="workflow.stop" >
+
+ <!-- Free space have to be bigger than last size release!! since v0.9.2.1-->
+ <bmaj-checkfreespace/>
+
+ <echo level="info">${db.name}: Downloading from ${protocol}://${server}${remote.dir} to ${offline.dir}.</echo>
+ <!--
+ If protocol is local, copy.mode determines if bank can be linked!
+ -->
+ <switch value="${protocol}">
+ <case value="local">
+ <echo message="bmaj-copy" level="info"/>
+ <bmaj-copy
+ from="${remote.dir}"
+ failonerror="false"
+ listing="${wget.filelist}"
+ toDir="${offline.dir}"
+ />
+ </case>
+ <case value="rsync">
+ <bmaj-rsync
+ server="${server}"
+ userid="${username}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ failonerror="false"
+ listing="${wget.filelist}"
+ toDir="${offline.dir}"
+ />
+ </case>
+ <default>
+ <bmaj-download
+ protocol="${protocol}"
+ server="${server}"
+ port="${port}"
+ userid="${username}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ listing="${wget.filelist}"
+ todir="${offline.dir}"
+ />
+ </default>
+ <!--
+ <case value="sftp">
+ <bmaj-sftp
+ server="${server}"
+ userid="${username}"
+ port="${port}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ listing="${wget.filelist}"
+ toDir="${offline.dir}"
+ />
+ </case>
+ <default>
+ <bmaj-wget
+ protocol="${protocol}"
+ server="${server}"
+ port="${port}"
+ userid="${username}"
+ password="${password}"
+ remotedir="${remote.dir}"
+ listing="${wget.filelist}"
+ todir="${offline.dir}"
+ usewget="false"
+ />
+ </default> -->
+ </switch>
+ <var name="offline.has.files" unset="true" />
+ <condition property="offline.has.files">
+ <bmaj-directoryhasfiles>
+ <fileset dir="${offline.dir}" includes="**">
+ <bmaj-include-filename-regex pattern="${local.files}"/>
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ </bmaj-directoryhasfiles>
+ </condition>
+ </target>
+
+ <!--
+ This task copies files from the online directory to the offline directory rather than re-downloading them.
+ This happens in cases where some local files have not changed but some new files have been added
+ to the remote server.
+ -->
+ <target name="copy" if="copy.needed" depends="checkforcopy" unless="workflow.stop">
+ <echo message="inside copy" />
+ <available file="${data.dir}/${dir.version}/current/flat" type="dir" property="onlineDirectoryExist"/>
+ <if>
+ <istrue value="${onlineDirectoryExist}"/>
+ <then>
+ <if>
+ <isfalse value="${do.link.copy}"/>
+ <then>
+ <echo level="info">${db.name}: Copying unchanged local files listed in ${wget.copy.filelist}.</echo>
+ <copy overwrite="true" preservelastmodified="true" todir="${offline.dir}" verbose="true">
+ <fileset dir="${data.dir}/${dir.version}/current/flat" includesfile="${wget.copy.filelist}"/>
+ </copy>
+ </then>
+ <else>
+ <echo level="info">${db.name}: Linking unchanged local files listed in ${wget.copy.filelist} to the offline directory.</echo>
+
+ <!--
+ This task takes a file with a list of file names on separate lines and sets a property
+ containing each name delimited by the delimiter given.
+ -->
+ <bmaj-symlinklist delimiter="," sourcefile="${wget.copy.filelist}" propertyname="link.copy.list"/>
+ <runtarget target="linkcopy"/>
+ </else>
+ </if>
+ <!-- Pas terrible, le mieux etant d introduire le fichier apres chaque copie....-->
+ <!-- <bmaj-addlocalfile filelist="${wget.copy.filelist}"/> -->
+ </then>
+ </if>
+ </target>
+
+ <!--This target has to be run from the copy/copyfiles target. Do not run this independently -->
+ <target name="linkcopy" if="link.copy.list">
+ <for list="${link.copy.list}" param="file" delimiter="," keepgoing="false">
+ <sequential>
+ <var name="file.exist" unset="true" />
+ <available file="${offline.dir}/@{file}" type="file" property="file.exist"/>
+ <!-- TEST SUPPLEMENTAIRE SI LE FICHIER EXISTE DEJA, ON NE LE LINK PAS !! (Cas reprise sur erreur avec linkcopy partiellement effectue)-->
+ <if>
+ <isfalse value="${file.exist}"/>
+ <then>
+ <!-- OFI 08/2007 Correction bug sur les links, si le repertoire n existait pas erreur d exec... -->
+ <var name="file.dir" unset="true" />
+ <dirname property="file.dir" file="${offline.dir}/@{file}"/>
+ <mkdir dir="${file.dir}"/>
+ <symlink link="${offline.dir}/@{file}" failonerror="false" overwrite="true" resource="${data.dir}/${dir.version}/current/flat/@{file}"/>
+ </then>
+ <else>
+ <echo message="${offline.dir}/@{file} : link is ok." level="verbose"/>
+ </else>
+ </if>
+ </sequential>
+ </for>
+ <!--
+ <bmaj-getrelativepath
+ absolutePath ="${online.flat.dir}"
+ fromPath ="${offline.dir}"
+ relativPath ="rel.path"
+ />
+ Have to recreate links in this convoluded manner because we need relative
+ versus absolute links. The Ant symlink task only generates absolute links
+ which break environments like nfs shares, or any place where the link
+ won't work on different machines.
+
+ REMARQUE : OFI - LE code suivant remplace les liens symboliques chemin asbolue en chemin relatif:
+ /udd/toto/tata/fichier.dat par ../tata/fichier.dat
+ -->
+ <symlink action="record" linkfilename="${link.file.name}">
+ <fileset dir="${offline.dir}" includes="**"/>
+ </symlink>
+
+
+ <bmaj-createlistlinkfilename propertyfilelist="list.link.file.name"/>
+
+ <for list="${list.link.file.name}" param="file" delimiter=",">
+ <sequential>
+ <propertyregex property="current_path"
+ input="@{file}"
+ regexp="(\S+\/[\\+\w\.-]+\/)[\\+\w\.-]+$"
+ select="\1"
+ casesensitive="false" />
+ <bmaj-getrelativepath
+ absolutePath ="${data.dir}/${dir.version}/current/flat"
+ fromPath ="${current_path}"
+ relativPath ="rel.path"
+ />
+ <replaceregexp file="@{file}"
+ match="^([\w\.-]+\=)${data.dir}/${dir.version}/current/flat\/([\w\.-/]+)$"
+ replace="\1${rel.path}\2"
+ byline="true"
+ />
+
+ <bmaj-symlink action="recreate" overwrite="true" failonerror="true">
+ <fileset dir="${current_path}" includes="${link.file.name}"/>
+ </bmaj-symlink>
+ <delete verbose="false" file="@{file}"/>
+ <var name="current_path" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+
+ <!-- Extracts all the downloaded files. All binaries for extracting are defined in global.properties. -->
+ <target name="extract" if="extract.needed" depends="checkforextract" unless="workflow.stop">
+ <echo message="no.extract:${no.extract}" level="verbose"/>
+ <if>
+ <isfalse value="${no.extract}"/>
+ <then>
+ <bmaj-extract
+ includesfile="${extract.filelist}"
+ dir="${offline.dir}"
+ failonerror="true"
+ />
+ </then>
+ </if>
+ </target>
+
+
+ <!-- Moves files from the offline directory to the online dir. -->
+ <target name="move" if="offline.has.files" depends="checkOfflineHasFiles" unless="workflow.stop">
+ <bmaj-versionsmanagement
+ mode = "create"
+ bank = "${db.name}"
+ root = "${data.dir}/${dir.version}"
+ release = "${remote.release}"
+ flatdirectory = "online.flat.dir"
+ proddirectory = "online.dir"
+ />
+ <!-- Remove ^ from local files -->
+
+ <propertyregex property="new.local.files"
+ input="${local.files}"
+ regexp="\^"
+ replace=""
+ casesensitive="false" />
+ <!-- <echo message="NEW LOCAL FILES:${new.local.files}" level="warning"/> -->
+
+ <condition property="new.local.files" value="${local.files}">
+ <not>
+ <isset property="new.local.files" />
+ </not>
+ </condition>
+ <bmaj-move mode="move" todir="${data.dir}/${dir.version}/future_release/flat" taskId="${taskId}">
+ <fileset dir="${offline.dir}" followsymlinks="false" defaultexcludes="no">
+ <bmaj-include-filename-regex pattern="${new.local.files}"/>
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ </bmaj-move>
+ <bmaj-move mode="copy" todir="${data.dir}/${dir.version}/future_release/flat" taskId="${taskId}">
+ <fileset dir="${offline.dir}" includes="**" defaultexcludes="no">
+ <bmaj-include-filename-regex pattern="${new.local.files}" />
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ </bmaj-move>
+
+ <!-- Ajout le 19/10 les liens n etaient pas efface bizarre....-->
+ <delete verbose="true">
+ <fileset dir="${offline.dir}" includes="**" followsymlinks="true" defaultexcludes="no">
+ <bmaj-include-filename-regex pattern="${local.files}" />
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ <!--
+ <fileset dir="${offline.dir}" includes="**">
+ <bmaj-include-filename-regex pattern="${remote.files}" />
+ </fileset>-->
+ </delete>
+ </target>
+
+ <target name="deployment">
+
+ <property name="current.dir" value="${data.dir}/${dir.version}/current"/>
+ <property name="futur.dir" value="${data.dir}/${dir.version}/future_release"/>
+
+ <condition property="exist.current.link">
+ <available file="${current.dir}"/>
+ </condition>
+ <condition property="exist.futur.link">
+ <available file="${futur.dir}"/>
+ </condition>
+
+ <if>
+ <and>
+ <isset property="exist.current.link"/>
+ <isset property="exist.futur.link"/>
+ </and>
+ <then>
+ <!-- On efface l ancien lien current si il existe -->
+ <symlink action="delete" link="${current.dir}"/>
+ </then>
+ </if>
+
+ <if>
+ <isset property="exist.futur.link"/>
+ <then>
+ <symlink action="delete" link="${futur.dir}"/>
+ <!-- Creation du lien current -->
+ <symlink link="${current.dir}" resource="${online.dir}" />
+ <echo message="change mode for directory:${data.dir}/${dir.version}/current with [${production.directory.chmod}]" level="info"/>
+ <!--<chmod dir="${online.dir}" perm="${production.directory.chmod}" type="both" includes="**/*" verbose="true"/>-->
+ <chmod dir="${online.dir}" perm="${production.directory.chmod}" type="dir" verbose="true"/>
+ <!-- On efface le contenu du offlinedir-->
+ <echo message="delete all files/directories in offline directory [${offline.dir}]" level="info" />
+ <delete verbose="true">
+ <fileset dir="${offline.dir}">
+ <include name="**"/>
+ </fileset>
+ </delete>
+ </then>
+ </if>
+ </target>
+
+
+ <target name="deleteOldVersions">
+ <!-- On efface les anciennes version -->
+ <bmaj-versionsmanagement
+ mode = "delete"
+ bank = "${db.name}"
+ root = "${data.dir}/${dir.version}"
+ nbversion = "${keep.old.version}"
+ />
+ <echo message="End of Biomaj process. You can close this window." level="info"/>
+ </target>
+
+ <target name="createFutureReleaseLink">
+
+ <property name="futur.dir" value="${data.dir}/${dir.version}/future_release"/>
+
+ <bmaj-versionsmanagement
+ mode = "rebuild"
+ bank = "${db.name}"
+ root = "${data.dir}/${dir.version}"
+ />
+ <!--
+ <move overwrite="true" failonerror="false" verbose="true" todir="${offline.dir}">
+ <fileset dir="${futur.dir}/flat"/>
+ </move>
+
+
+ <symlink action="delete" link="${futur.dir}" />
+
+ <delete dir="${dir.version.to.delete}" verbose="true" />
+ -->
+ </target>
+
+ <!-- If switch links are not being used then simply move the data files online. Also removes the old files.-->
+
+
+ <!-- Main build target for mirroring. -->
+ <target name="action_frequency" depends="frequency"/>
+ <target name="action_clean_log" depends="cleandblogs"/>
+ <target name="action_mirror" depends="check,download,copy,extract"/>
+ <target name="action_move" depends="move"/>
+ <target name="action_deployment" depends="deployment"/>
+ <target name="action_delete_version" depends="deleteOldVersions"/>
+ <target name="action_rebuild" depends="createFutureReleaseLink"/>
+
+ <!-- It's the only entry point for mirror.xml : -->
+ <target name="workflow_control" depends="init">
+
+ <!-- ***********************-->
+ <!-- Pre Workflow treatment -->
+ <!-- ***********************-->
+ <!-- Banks dependences -->
+ <!-- if task is move, the bank dependencies isn't call -->
+
+ <!-- ENLEVER TRY CATCH POUR LE DEV POUR RECUPERER L'EXCEPTION -->
+
+ <trycatch property="ex">
+ <try>
+ <runtarget target="${task}" />
+ <var name="task" unset="true" />
+
+ <!-- Task call-->
+ <!-- *********************** -->
+ <!-- Post Workflow treatment -->
+ <!-- *********************** -->
+ <!-- -->
+ </try>
+ <catch>
+ <echo message="A problem occurs during the execution of biomaj:${ex}" level="error"/>
+ <echo message="${biomaj.error}" level="debug"/>
+ <property name="stop.workflow" value="true"/>
+ </catch>
+ </trycatch>
+ </target>
+
+
+ <!--Initialize the project to check for directories, files, and property values. -->
+ <target name="init" unless="workflow.is.init">
+ <property name="workflow.is.init" value="true"/>
+ <if>
+ <not>
+ <available file="${data.dir}" type="dir"/>
+ </not>
+ <then>
+ <echo message="Data directory does not exist, Biomaj try to create it. (value:${data.dir})"/>
+ <mkdir dir="${data.dir}"/>
+ </then>
+ </if>
+ <if>
+ <not>
+ <available file="${offline.dir}" type="dir"/>
+ </not>
+ <then>
+ <echo message="Offline directory does not exist, Biomaj will create it. (value:${offline.dir})"/>
+ <mkdir dir="${offline.dir}"/>
+ </then>
+ </if>
+ <if>
+ <not>
+ <available file="${data.dir}/${dir.version}" type="dir"/>
+ </not>
+ <then>
+ <echo message="Production directory does not exist, Biomaj will create it. (value:${data.dir}/${dir.version})"/>
+ <mkdir dir="${data.dir}/${dir.version}"/>
+ </then>
+ </if>
+
+ <condition property="three.versions.management.is.not.ok">
+ <not>
+ <and>
+ <isset property="keep.old.version"/>
+ <isset property="dir.version"/>
+ </and>
+ </not>
+ </condition>
+
+ <fail if="three.versions.management.is.not.ok">
+ One of these properties are not defined !
+ keep.old.version : ${keep.old.version}
+ dir.version : ${dir.version}
+ You have to defined a target directory to create release version of a bank and the number of version you want to keep !
+ </fail>
+ </target>
+
+ <target name="checkfordownload">
+ <property file="${up2date.file}"/>
+ <condition property="download.needed">
+ <istrue value="${files.download.needed}"/>
+ </condition>
+ <condition property="offline.has.files">
+ <bmaj-directoryhasfiles>
+ <fileset dir="${offline.dir}" includes="**">
+ <bmaj-include-filename-regex pattern="${local.files}"/>
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ </bmaj-directoryhasfiles>
+ </condition>
+ </target>
+
+ <target name="checkforcopy">
+ <property file="${up2date.file}"/>
+
+ <condition property="copy.needed">
+ <istrue value="${files.copy.needed}"/>
+ </condition>
+ </target>
+
+
+ <target name="checkforextract">
+ <property file="${up2date.file}"/>
+ <condition property="extract.needed">
+ <istrue value="${files.extract.needed}"/>
+ </condition>
+ </target>
+
+ <target name="checkOfflineHasFiles">
+ <property file="${up2date.file}"/>
+ <condition property="offline.has.files">
+ <bmaj-directoryhasfiles>
+ <fileset dir="${offline.dir}" includes="**">
+ <bmaj-include-filename-regex pattern="${local.files}"/>
+ <bmaj-exclude-filename-regex pattern="${local.files.excluded}"/>
+ </fileset>
+ </bmaj-directoryhasfiles>
+ </condition>
+ </target>
+ <!--
+ <target name="call_dependences" if="db.depends">
+ <exec executable="${bin.dir}/citrina.sh" dir="${bin.dir}" failonerror="true">
+ <arg value="-d"/>
+ <arg value="${db.depends}"/>
+ </exec>
+ </target>
+ -->
+ <!-- Cleans the log directory of all database log files -->
+ <target name="clean">
+ <echo level="info">Cleaning up log in ${log.dir}</echo>
+ <delete verbose="false">
+ <fileset dir="${log.dir}" includes="**"/>
+ </delete>
+ </target>
+
+ <target name="cleandblogs">
+ <echo level="info">${db.name}: Cleaning up log files in ${log.dir}/${db.name}/runtime/</echo>
+ <delete verbose="false">
+ <fileset dir="${log.dir}/${db.name}/runtime/" includes="${db.name}*"/>
+ </delete>
+ </target>
+</project>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/process.xsd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/process.xsd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/process.xsd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="error">
+ <xs:complexType>
+ <xs:attribute name="message" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="file">
+ <xs:complexType>
+ <xs:attribute name="location" type="xs:string" use="required" />
+ <xs:attribute name="volatile" type="xs:NMTOKEN" use="required" fixed="false" />
+ <xs:attribute name="size" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="link" type="xs:NMTOKEN" use="required" fixed="false" />
+ <xs:attribute name="extract" type="xs:NMTOKEN" use="required" fixed="false" />
+ <xs:attribute name="time" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="files">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="file" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="metaprocess">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="process" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="logfile" type="xs:string" use="required" />
+ <xs:attribute name="block" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="process">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="files" />
+ <xs:element ref="warning" />
+ <xs:element ref="error" minOccurs="0" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="desc" type="xs:string" use="required" />
+ <xs:attribute name="keyname" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="timestamp" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="args" type="xs:string" use="required" />
+ <xs:attribute name="type" type="xs:string" use="required" />
+ <xs:attribute name="value" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="exe" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="biomaj_error" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="warning">
+ <xs:complexType>
+ <xs:attribute name="message" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/session.xsd
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/session.xsd (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/workflows/session.xsd 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="addLocalFiles">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="check">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbLocalOfflineFiles" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbextract" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbLocalOnlineFiles" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbDownloadFiles" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="deployment">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="download">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="warning" />
+ </xs:sequence>
+ <xs:attribute name="bandWidth" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="extract">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="makeRelease">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbFilesCopied" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="nbFilesMoved" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="postprocess">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="nbreMetaProcess" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="preprocess">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="nbreMetaProcess" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="release">
+ <xs:complexType>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="value" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="session">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="preprocess" />
+ <xs:element ref="release" />
+ <xs:element ref="check" />
+ <xs:element ref="download" />
+ <xs:element ref="extract" />
+ <xs:element ref="addLocalFiles" />
+ <xs:element ref="makeRelease" />
+ <xs:element ref="postprocess" />
+ <xs:element ref="deployment" />
+ <xs:element ref="warning" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="status" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="end" type="xs:string" use="required" />
+ <xs:attribute name="elapsedTime" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="logfile" type="xs:string" use="required" />
+ <xs:attribute name="start" type="xs:string" use="required" />
+ <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="warning">
+ <xs:complexType>
+ <xs:attribute name="message" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Closed_Folder_yellow.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Closed_Folder_yellow.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/DNA-biomaj.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/DNA-biomaj.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/HeaderToolsBox.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/HeaderToolsBox.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Untitled-1.psd
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/Untitled-1.psd
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/asc.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/asc.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/background_rnaback.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/background_rnaback.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.tif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/banner.tif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/bmenu1_t.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/bmenu1_t.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/clickhere.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/clickhere.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/col.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/col.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/colbleu.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/colbleu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/comment.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/comment.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/cycle_biomaj.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/cycle_biomaj.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/degra.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/degra.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/delete.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/delete.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/des.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/des.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna2.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna2.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna3.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna3.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna4.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna4.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna5.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/dna5.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/email.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/email.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/env.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/env.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/exe.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/exe.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fond.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fondbleu.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/fondbleu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/header.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/header.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/headerbkg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/headerbkg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/help.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/help.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_dep.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_dep.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_post.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_post.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_pre.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_pre.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_remove.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_remove.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync_dep.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icon_cycle_biomaj_sync_dep.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-anglais.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-anglais.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-francais.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/icone-drapeau-francais.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/lignebleu.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/lignebleu.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/loading.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/loading.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo-inra.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo-inra.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logoBio.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logoBio.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa_petit.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/logo_hexa_petit.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes/dwsync.xml
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes/dwsync.xml (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/_notes/dwsync.xml 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="about_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="enrichment_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="resources_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="forum_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="register_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="home_o.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="articles_over.jpg" local="127747892220000000" remote="0" testing="127747888040000000" />
+<file name="bar.gif" local="127747892220000000" remote="0" testing="127747888040000000" />
+</dwsync>
\ No newline at end of file
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about_o.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/about_o.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/bar.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/biomaj_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/globalStats_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/home_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/localBank_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/procFile_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile_o.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/menu/propFile_o.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/minus.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/minus.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/misc.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/misc.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/obsolete.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/obsolete.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/pdficon.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/pdficon.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/plus.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/plus.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/quote.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/quote.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccro.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccro.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccrobleu.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/raccrobleu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow_w.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/right_arrow_w.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/rightbar.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/rightbar.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/shortblackbar.psd
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/shortblackbar.psd
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/spacer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/spacer.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/star.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/star.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/tagline.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/tagline.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/text.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/text.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.psd
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topLeft.psd
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.psd
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/topRight.psd
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/trash.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/trash.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/updating.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/updating.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/uptodate.gif
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/images/uptodate.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/xmlToSql.xsl
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/xmlToSql.xsl (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/biomaj/xslt/xmlToSql.xsl 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,904 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="2.0">
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:template match="/bank">
+
+ <!-- TABLE BANK -->
+ <xsl:text>INSERT INTO bank(name) VALUES('</xsl:text>
+ <xsl:value-of select="configuration/remoteInfos/serverInfo/dbName" />
+ <xsl:text>'); </xsl:text>
+
+ <xsl:for-each select="configuration">
+
+ <!-- TABLE REMOTEINFO -->
+ <xsl:choose>
+ <xsl:when test="remoteInfos/serverInfo/protocol/@port">
+ <xsl:text>INSERT INTO remoteInfo(protocol,port,dbName,dbFullname,dbType,server,remoteDir) VALUES('</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/protocol" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/protocol/@port"/>
+ <xsl:text>,'</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>INSERT INTO remoteInfo(protocol,dbName,dbFullname,dbType,server,remoteDir) VALUES('</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/protocol" />
+ <xsl:text>','</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="remoteInfos/serverInfo/dbName" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/dbFullname" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/dbType" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="remoteInfos/serverInfo/server" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="remoteInfos/remoteDir" />
+ <xsl:text>'); </xsl:text>
+
+ <!-- TABLE LOCALINFO -->
+ <xsl:text>INSERT INTO localInfo(offlineDirectory,versionDirectory,frequency,dolinkcopy,logfile,releaseFile,releaseRegexp,remoteFiles,localFiles,nversions) VALUES('</xsl:text>
+ <xsl:value-of select="localInfos/offlineDirectory" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/versionDirectory" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="localInfos/frequency" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="localInfos/dolinkcopy/@value" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/logfile/@value" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/releaseInfo/@file" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/releaseInfo/@regexp" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/remoteFiles/@regexp" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="localInfos/localFiles/@regex" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="localInfos/nversions/@nb" />
+ <xsl:text>); </xsl:text>
+
+ <!-- TABLE CONFIGURATION -->
+ <xsl:text>INSERT INTO configuration(idconfiguration,date,file,ref_idremoteInfo,ref_idlocalInfo,ref_idbank,insert_hack) VALUES(</xsl:text>
+ <xsl:value-of select="@id" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@date" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@file" />
+ <xsl:text>',(SELECT max(idremoteInfo) FROM remoteInfo),(SELECT max(idlocalInfo) FROM localInfo),(SELECT max(idbank) FROM bank),NEXT VALUE FOR generator); </xsl:text>
+
+
+ <!-- TABLE UPDATEBANK -->
+ <xsl:for-each select="updateBank">
+
+ <xsl:choose>
+ <xsl:when test="@end">
+ <xsl:text>INSERT INTO updateBank(ref_idconfiguration,release,productionDirectoryPath,productionDirectoryDeployed,sizeDownload,sizeRelease,startTime,endTime,elapsedTime,update,nbSessions,idLastSession) VALUES(</xsl:text>
+ <xsl:text>(SELECT idconfiguration FROM configuration WHERE insert_hack = (SELECT max(insert_hack) FROM configuration)),'</xsl:text>
+ <xsl:value-of select="workflowInfo/release/@value" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/productionDirectory/@path" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/productionDirectory/@deployed" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/sizeDownload/@size" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/sizeRelease/@size" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>INSERT INTO updateBank(ref_idconfiguration,release,productionDirectoryPath,productionDirectoryDeployed,sizeDownload,sizeRelease,startTime,elapsedTime,update,nbSessions,idLastSession) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idconfiguration) FROM configuration),'</xsl:text>
+ <xsl:value-of select="workflowInfo/release/@value" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/productionDirectory/@path" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/productionDirectory/@deployed" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/sizeDownload/@size" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="workflowInfo/sizeRelease/@size" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@update" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbSessions" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@idLastSession" />
+ <xsl:text>); </xsl:text>
+
+ <!-- TABLE SESSION -->
+ <xsl:for-each select="session">
+ <xsl:text>INSERT INTO session(idsession,ref_idupdateBank,status,startTime,endTime,elapsedTime,logfile,insert_hack) VALUES(</xsl:text>
+ <xsl:value-of select="@id" />
+ <xsl:text>,(SELECT max(idupdateBank) FROM updateBank),'</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@logfile" />
+ <xsl:text>',NEXT VALUE FOR generator); </xsl:text>
+
+ <!-- TABLE SESSIONTASK -->
+ <xsl:apply-templates select="preprocess" />
+ <xsl:apply-templates select="release" />
+ <xsl:apply-templates select="check" />
+ <xsl:apply-templates select="download" />
+ <xsl:apply-templates select="extract" />
+ <xsl:apply-templates select="addLocalFiles" />
+ <xsl:apply-templates select="makeRelease" />
+ <xsl:apply-templates select="postprocess" />
+ <xsl:apply-templates select="deployment" />
+ <xsl:apply-templates select="removeprocess" />
+
+ <!-- TABLE MESSAGE + SESSION_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO session_has_message(ref_idsession,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO session_has_message(ref_idsession,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE PRODUCTIONDIRECTORY -->
+ <xsl:for-each select="production/directory">
+
+ <xsl:text>INSERT INTO productionDirectory(remove,creation,size,state,session,path,ref_idbank) VALUES('</xsl:text>
+ <xsl:value-of select="@remove" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@creation" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@state" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@session" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@path" />
+ <xsl:text>',(SELECT max(idbank) FROM bank)); </xsl:text>
+
+ </xsl:for-each>
+
+
+ </xsl:template>
+
+
+ <xsl:template match="preprocess">
+
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,nbreMetaProcess,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbreMetaProcess" />
+ <xsl:text>,'preprocess'); </xsl:text>
+
+ <!-- TABLE METAPROCESS -->
+ <xsl:for-each select="metaprocess">
+ <xsl:text>INSERT INTO metaprocess(idmetaprocess,name,startTime,endTime,elapsedTime,status,logfile,block,ref_idsessionTask,insert_hack) VALUES(</xsl:text>
+ <xsl:text>CONCAT((SELECT max(idsessionTask) FROM sessionTask),RAND()),'</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@logfile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@block" />
+ <xsl:text>',(SELECT max(idsessionTask) FROM sessionTask),NEXT VALUE FOR generator); </xsl:text>
+
+ <!-- TABLE PROCESS -->
+ <xsl:for-each select="process">
+ <xsl:text>INSERT INTO process(name,keyname,exe,args,desc,type,startTime,endTime,elapsedTime,biomaj_error,timestamp,value,ref_idmetaprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@keyname" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@exe" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@args" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@desc" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@type" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@biomaj_error" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@timestamp" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@value" />
+ <xsl:text>',(SELECT idmetaprocess FROM metaprocess WHERE insert_hack = SELECT max(insert_hack) FROM metaprocess)); </xsl:text>
+
+ <!-- TABLE FILE -->
+ <xsl:for-each select="files/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','file',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="move/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','move',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="copy/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','copy',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+
+
+ <!-- TABLE MESSAGE + PROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE MESSAGE + METAPROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+
+ </xsl:template>
+
+ <xsl:template match="release">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,value,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@value" />
+ <xsl:text>','release'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="check">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,nbextract,nbLocalOnlineFiles,nbLocalOfflineFiles,nbDownloadFiles,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbextract" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@nbLocalOnlineFiles" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@nbLocalOfflineFiles"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@nbDownloadFiles"/>
+ <xsl:text>,'check'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="download">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,bandwidth,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status"/>
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@bandWidth"/>
+ <xsl:text>,'download'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="extract">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status"/>
+ <xsl:text>','extract'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="addLocalFiles">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','addLocalFiles'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="makeRelease">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,nbFilesMoved,nbFilesCopied,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbFilesMoved" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@nbFilesCopied" />
+ <xsl:text>,'makeRelease'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="postprocess">
+
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,nbreMetaProcess,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbreMetaProcess" />
+ <xsl:text>,'postprocess'); </xsl:text>
+
+ <!-- TABLE METAPROCESS -->
+ <xsl:for-each select="metaprocess">
+ <xsl:text>INSERT INTO metaprocess(idmetaprocess,name,startTime,endTime,elapsedTime,status,logfile,block,ref_idsessionTask,insert_hack) VALUES(</xsl:text>
+ <xsl:text>CONCAT((SELECT max(idsessionTask) FROM sessionTask),RAND()),'</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@logfile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@block" />
+ <xsl:text>',(SELECT max(idsessionTask) FROM sessionTask),NEXT VALUE FOR generator); </xsl:text>
+
+ <!-- TABLE PROCESS -->
+ <xsl:for-each select="process">
+ <xsl:text>INSERT INTO process(name,keyname,exe,args,desc,type,startTime,endTime,elapsedTime,biomaj_error,timestamp,value,ref_idmetaprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@keyname" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@exe" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@args" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@desc" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@type" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@biomaj_error" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@timestamp" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@value" />
+ <xsl:text>',(SELECT idmetaprocess FROM metaprocess WHERE insert_hack = SELECT max(insert_hack) FROM metaprocess)); </xsl:text>
+
+ <!-- TABLE FILE -->
+ <xsl:for-each select="files/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','file',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="move/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','move',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="copy/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','copy',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+
+
+ <!-- TABLE MESSAGE + PROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE MESSAGE + METAPROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+
+ </xsl:template>
+
+ <xsl:template match="deployment">
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','deployment'); </xsl:text>
+
+ <xsl:apply-templates select="files/file" />
+ <xsl:apply-templates select="move/file" />
+ <xsl:apply-templates select="copy/file" />
+
+ <xsl:apply-templates select="warning" />
+ <xsl:apply-templates select="error" />
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="removeprocess">
+
+ <xsl:text>INSERT INTO sessionTask(startTime,endTime,elapsedTime,status,nbreMetaProcess,taskType) VALUES('</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@nbreMetaProcess" />
+ <xsl:text>,'removeprocess'); </xsl:text>
+
+ <!-- TABLE METAPROCESS -->
+ <xsl:for-each select="metaprocess">
+ <xsl:text>INSERT INTO metaprocess(idmetaprocess,name,startTime,endTime,elapsedTime,status,logfile,block,ref_idsessionTask,insert_hack) VALUES(</xsl:text>
+ <xsl:text>CONCAT((SELECT max(idsessionTask) FROM sessionTask),RAND()),'</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@status" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@logfile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@block" />
+ <xsl:text>',(SELECT max(idsessionTask) FROM sessionTask),NEXT VALUE FOR generator); </xsl:text>
+
+ <!-- TABLE PROCESS -->
+ <xsl:for-each select="process">
+ <xsl:text>INSERT INTO process(name,keyname,exe,args,desc,type,startTime,endTime,elapsedTime,biomaj_error,timestamp,value,ref_idmetaprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@name" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@keyname" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@exe" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@args" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@desc" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@type" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@start" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@end" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@elapsedTime" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@biomaj_error" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@timestamp" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@value" />
+ <xsl:text>',(SELECT idmetaprocess FROM metaprocess WHERE insert_hack = SELECT max(insert_hack) FROM metaprocess)); </xsl:text>
+
+ <!-- TABLE FILE -->
+ <xsl:for-each select="files/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','file',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="move/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','move',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="copy/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,fileType,ref_idprocess) VALUES('</xsl:text>
+ <xsl:value-of select="@location" />
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size" />
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time" />
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','copy',(SELECT max(idprocess) FROM process)); </xsl:text>
+ </xsl:for-each>
+
+
+ <!-- TABLE MESSAGE + PROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO process_has_message(ref_idprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idprocess) FROM process),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE MESSAGE + METAPROCESS_HAS_MESSAGE -->
+ <xsl:for-each select="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO metaprocess_has_message(ref_idmetaprocess,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idmetaprocess) FROM metaprocess),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:for-each>
+
+ </xsl:for-each>
+
+ <!-- TABLE SESSION_HAS_SESSIONTASK -->
+ <xsl:text>INSERT INTO session_has_sessionTask(ref_idsession,ref_idsessionTask) VALUES(</xsl:text>
+ <xsl:text>(SELECT idsession FROM session WHERE insert_hack=(SELECT max(insert_hack) FROM session)),(SELECT max(idsessionTask) FROM sessionTask)); </xsl:text>
+
+ </xsl:template>
+
+ <xsl:template match="files/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,refHash,fileType) VALUES('</xsl:text>
+ <xsl:value-of select="@location"/>
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time"/>
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@refHash"/>
+ <xsl:text>','file'); </xsl:text>
+
+ <xsl:text>INSERT INTO sessionTask_has_file(ref_idsessionTask,ref_idfile) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idsessionTask) FROM sessionTask),(SELECT max(idfile) FROM file)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="move/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,refHash,fileType) VALUES('</xsl:text>
+ <xsl:value-of select="@location"/>
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time"/>
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@refHash"/>
+ <xsl:text>','move'); </xsl:text>
+
+ <xsl:text>INSERT INTO sessionTask_has_file(ref_idsessionTask,ref_idfile) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idsessionTask) FROM sessionTask),(SELECT max(idfile) FROM file)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="copy/file">
+ <xsl:text>INSERT INTO file(location,size,time,link,_extract,volatile,refHash,fileType) VALUES('</xsl:text>
+ <xsl:value-of select="@location"/>
+ <xsl:text>',</xsl:text>
+ <xsl:value-of select="@size"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="@time"/>
+ <xsl:text>,'</xsl:text>
+ <xsl:value-of select="@link"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@extract"/>
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@volatile" />
+ <xsl:text>','</xsl:text>
+ <xsl:value-of select="@refHash"/>
+ <xsl:text>','copy'); </xsl:text>
+
+ <xsl:text>INSERT INTO sessionTask_has_file(ref_idsessionTask,ref_idfile) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idsessionTask) FROM sessionTask),(SELECT max(idfile) FROM file)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="warning">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','warning'); </xsl:text>
+ <xsl:text>INSERT INTO sessionTask_has_message(ref_idsessionTask,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idsessionTask) FROM sessionTask),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="error">
+ <xsl:text>INSERT INTO message(message,type) VALUES('</xsl:text>
+ <xsl:value-of select="@message" />
+ <xsl:text>','error'); </xsl:text>
+ <xsl:text>INSERT INTO sessionTask_has_message(ref_idsessionTask,ref_idmessage) VALUES(</xsl:text>
+ <xsl:text>(SELECT max(idsessionTask) FROM sessionTask),(SELECT max(idmessage) FROM message)); </xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/README.Debian
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/README.Debian (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/README.Debian 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,5 @@
+Biomaj for Debian
+-----------------
+
+ Biomaj configuration file has been adapted to Debian file structure
+
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.odt.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.odt.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.odt.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.odt.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.pdf.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/UsersGuide_BioMAJ_FR.pdf.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/biomaj.1
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/biomaj.1 (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/biomaj.1 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,49 @@
+.TH biomaj 1 "January 05, 2011" "version 1.1.0" "USER COMMANDS"
+.SH NAME
+biomaj \- downloads and transform remote biological data banks
+.SH SYNOPSIS
+.B biomaj
+[\-h]
+.SH INSTALL
+.B biomaj
+After installation, BioMAJ requires a database to run. If using MySQL (recommended), one should create a database (biomaj_log) and a database user (the one used at installation setup) and populate the database help with the script /usr/share/biomaj/sql/mysql.sql. The database configuration for biomaj is set in /etc/biomaj/db_properties/global.properties
+.PP
+.SH DESCRIPTION
+BioMAJ (BIOlogie Mise A Jour) is a workflow engine dedicated
+ to data synchronization and processing.The Software automates
+ the update cycle and the supervision of the locally mirrored
+ databank repository.
+User must have roots rights to run biomaj.
+.PP
+biomaj downloads and synchronize remote data repositories
+ and apply data transformation.
+.SH OPTIONS
+.TP
+\-h
+display the list of commands
+speed.
+.SH DATA BANKS
+By default, biomaj is configured (data.dir in global.properties) to write banks to /var/lib/biomaj.
+.PP
+.SH EXAMPLES
+.TP
+Update a bank:
+.B biomaj
+\-\-update genbank
+.PP
+.TP
+Show console
+.B biomaj
+\-\-update genbank \-\-console
+.PP
+.TP
+Show status:
+.B biomaj
+\-\-status
+.PP
+
+.SH EXIT STATUS
+biomaj returns a zero exist status if it succeeds, it does not represent the bank update status.
+.SH AUTHOR
+Olivier Sallou (olivier.sallou (at) irisa.fr)
+Romaric Sabas (romaric.sabas (at) irisa.fr)
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/changelog.Debian.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/changelog.Debian.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/copyright
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/copyright (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc/biomaj/copyright 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,507 @@
+Copyright: 2011 GenOuest Platform <support at genouest.org>
+Licence: CeCILL
+
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+ Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+ * firstly, compliance with the principles governing the distribution
+ of Free Software: access to source code, broad rights granted to
+ users,
+ * secondly, the election of a governing law, French law, with which
+ it is conformant, both as regards the law of torts and
+ intellectual property law, and the protection that it offers to
+ both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+ Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+ Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+ Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software.
+
+
+ Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+ * (i) loading the Software by any or all means, notably, by
+ downloading from a remote server, or by loading from a physical
+ medium;
+ * (ii) the first time the Licensee exercises any of the rights
+ granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+ Article 4 - EFFECTIVE DATE AND TERM
+
+
+ 4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+ 4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+ Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+ 5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+ 1. permanent or temporary reproduction of all or part of the Software
+ by any or all means and in any or all form.
+
+ 2. loading, displaying, running, or storing the Software on any or
+ all medium.
+
+ 3. entitlement to observe, study or test its operation so as to
+ determine the ideas and principles behind any or all constituent
+ elements of said Software. This shall apply when the Licensee
+ carries out any or all loading, displaying, running, transmission
+ or storage operation as regards the Software, that it is entitled
+ to carry out hereunder.
+
+
+ 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+ 5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+ 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+ 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+ 5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+ 5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+ Article 6 - INTELLECTUAL PROPERTY
+
+
+ 6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+ 6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+ 6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+ 6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+ 1. not to remove, or modify, in any manner, the intellectual property
+ notices attached to the Software;
+
+ 2. to reproduce said notices, in an identical manner, in the copies
+ of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-Ã -vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+ Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+ Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+ Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+ Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+ Article 11 - MISCELLANEOUS
+
+
+ 11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+ 11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+ Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+ Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc-base/biomaj
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc-base/biomaj (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj/usr/share/doc-base/biomaj 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,8 @@
+Document: biomaj
+Title: BioMAJ User Manual
+Author: Romaric Sabas
+Abstract: Usage instructions for BioMAJ and BMajWatcher
+Section: Science/Biology
+
+Format: PDF
+Files: /usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
Added: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/man/man1/biomaj.1.gz
===================================================================
(Binary files differ)
Property changes on: trunk/packages/biomaj/trunk/debian/biomaj/usr/share/man/man1/biomaj.1.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/biomaj/trunk/debian/biomaj.debhelper.log
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.debhelper.log (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.debhelper.log 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,48 @@
+dh_prep
+dh_installdirs
+dh_installdirs
+dh_install
+dh_install
+dh_install
+dh_install
+dh_installdebconf
+dh_installdocs
+dh_installexamples
+dh_installmenu
+dh_installcron
+dh_installman
+dh_installinfo
+dh_installchangelogs
+dh_link
+dh_strip
+dh_compress
+dh_fixperms
+dh_installdeb
+dh_shlibdeps
+dh_gencontrol
+dh_md5sums
+dh_builddeb
+dh_prep
+dh_installdirs
+dh_installdirs
+dh_install
+dh_install
+dh_install
+dh_install
+dh_installdebconf
+dh_installdocs
+dh_installexamples
+dh_installmenu
+dh_installcron
+dh_installman
+dh_installinfo
+dh_installchangelogs
+dh_link
+dh_strip
+dh_compress
+dh_fixperms
+dh_installdeb
+dh_shlibdeps
+dh_gencontrol
+dh_md5sums
+dh_builddeb
Added: trunk/packages/biomaj/trunk/debian/biomaj.doc-base
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.doc-base (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.doc-base 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,8 @@
+Document: biomaj
+Title: BioMAJ User Manual
+Author: Romaric Sabas
+Abstract: Usage instructions for BioMAJ and BMajWatcher
+Section: Science/Biology
+
+Format: PDF
+Files: /usr/share/doc/biomaj/UsersGuide_BioMAJ_EN.pdf.gz
Added: trunk/packages/biomaj/trunk/debian/biomaj.manpages
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.manpages (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.manpages 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1 @@
+usr/share/doc/biomaj/biomaj.1
Added: trunk/packages/biomaj/trunk/debian/biomaj.postrm.debhelper
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.postrm.debhelper (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.postrm.debhelper 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,6 @@
+# Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
+# End automatically added section
Added: trunk/packages/biomaj/trunk/debian/biomaj.substvars
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.substvars (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.substvars 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1 @@
+misc:Depends=debconf (>= 0.5) | debconf-2.0
Added: trunk/packages/biomaj/trunk/debian/changelog
===================================================================
--- trunk/packages/biomaj/trunk/debian/changelog (rev 0)
+++ trunk/packages/biomaj/trunk/debian/changelog 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,6 @@
+biomaj (1.1.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #609038)
+ First Debian package
+
+ -- Olivier Sallou <olivier.sallou at irisa.fr> Wed, 05 Jan 2011 10:39:00 +0100
Added: trunk/packages/biomaj/trunk/debian/compat
===================================================================
--- trunk/packages/biomaj/trunk/debian/compat (rev 0)
+++ trunk/packages/biomaj/trunk/debian/compat 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1 @@
+7
Added: trunk/packages/biomaj/trunk/debian/config
===================================================================
--- trunk/packages/biomaj/trunk/debian/config (rev 0)
+++ trunk/packages/biomaj/trunk/debian/config 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,64 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# jdk_home
+db_input critical biomaj/jdk_home || true
+db_go
+
+# admin login
+#db_input critical biomaj/login || true
+#db_go
+
+# admin passwd
+#db_input critical biomaj/password || true
+#db_go
+
+# db type
+#db_input critical biomaj/db_type || true
+#db_go
+
+# Configure mysql ?
+#db_get biomaj/db_type
+#if [ $RET = "MySQL" ]; then
+ db_input critical biomaj/mysql || true
+ db_go
+ db_get biomaj/mysql
+ if [ $RET = "true" ]; then
+ # MySQL server
+ db_input critical biomaj/mysql_host || true
+ db_go
+
+ # MySQL login
+ db_input critical biomaj/mysql_login || true
+ db_go
+
+ # MySQL password
+ db_input critical biomaj/mysql_passwd || true
+ db_go
+ fi
+#fi
+
+# Configure LDAP ?
+#db_input critical biomaj/ldap || true
+#db_go
+#db_get biomaj/ldap
+#if [ $RET = "true" ]; then
+ # LDAP server
+# db_input critical biomaj/ldap_server || true
+# db_go
+
+ # LDAP dn
+# db_input critical biomaj/ldap_dn || true
+# db_go
+
+ # LDAP filter
+# db_input critical biomaj/ldap_filter || true
+# db_go
+#fi
+
+# Tomcat port
+#db_input critical biomaj/tomcat_port || true
+#db_go
+
Property changes on: trunk/packages/biomaj/trunk/debian/config
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/control
===================================================================
--- trunk/packages/biomaj/trunk/debian/control (rev 0)
+++ trunk/packages/biomaj/trunk/debian/control 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,22 @@
+Source: biomaj
+Section: science
+Priority: optional
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Olivier Sallou <olivier.sallou at irisa.fr>
+DM-Upload-Allowed: yes
+Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/biomaj/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/biomaj/trunk/?rev=0&sc=0
+Homepage: http://biomaj.genouest.org
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: debconf, po-debconf, libhsqldb-java,ant-contrib,liblog4j1.2-java,libcommons-net-java,libcommons-dbcp-java, libgnumail-java, libcommons-pool-java, libgnujaf-java, libjgoodies-forms-java,liboro-java,libregexp-java,libjfreechart-java,libjcommon-java,libjsch-java,libjdom1-java,junit4,libsaxonb-java
+Standards-Version: 3.9.1
+
+Package: biomaj
+Architecture: all
+Depends: openjdk-6-jdk, ant, libmysql-java, debconf, ${misc:Depends}, libhsqldb-java,ant-contrib,liblog4j1.2-java,libcommons-net-java (>= 1.4),libcommons-dbcp-java (>= 1.2), libgnumail-java, libcommons-pool-java (>= 1.5), libgnujaf-java, libjgoodies-forms-java (>= 1.2),liboro-java (>= 2.0),libregexp-java (>= 1.4),libjfreechart-java (>= 1.0),libjcommon-java (>= 1.0),libjsch-java (>= 0.1.42),libjdom1-java (>= 1.1),junit4,libsaxonb-java (>= 0.9)
+Suggests: mysql-community-server-5.0, ncbi-tools-bin, blast2
+Description: Biological banks updater
+ BioMAJ downloads remote data banks, check their status and apply transformation
+ workflows, with consistent state,to provide ready-to-use data to biologists and
+ bioinformaticians. For example, it can transform original fasta files to blast
+ indexes. It is very flexible and post-processes can be extended very easily.
Added: trunk/packages/biomaj/trunk/debian/copyright
===================================================================
--- trunk/packages/biomaj/trunk/debian/copyright (rev 0)
+++ trunk/packages/biomaj/trunk/debian/copyright 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,507 @@
+Copyright: 2011 GenOuest Platform <support at genouest.org>
+Licence: CeCILL
+
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+ Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+ * firstly, compliance with the principles governing the distribution
+ of Free Software: access to source code, broad rights granted to
+ users,
+ * secondly, the election of a governing law, French law, with which
+ it is conformant, both as regards the law of torts and
+ intellectual property law, and the protection that it offers to
+ both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+ Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+ Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+ Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software.
+
+
+ Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+ * (i) loading the Software by any or all means, notably, by
+ downloading from a remote server, or by loading from a physical
+ medium;
+ * (ii) the first time the Licensee exercises any of the rights
+ granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+ Article 4 - EFFECTIVE DATE AND TERM
+
+
+ 4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+ 4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+ Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+ 5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+ 1. permanent or temporary reproduction of all or part of the Software
+ by any or all means and in any or all form.
+
+ 2. loading, displaying, running, or storing the Software on any or
+ all medium.
+
+ 3. entitlement to observe, study or test its operation so as to
+ determine the ideas and principles behind any or all constituent
+ elements of said Software. This shall apply when the Licensee
+ carries out any or all loading, displaying, running, transmission
+ or storage operation as regards the Software, that it is entitled
+ to carry out hereunder.
+
+
+ 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+ 5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+ 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+ 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+ 1. a copy of the Agreement,
+
+ 2. a notice relating to the limitation of both the Licensor's
+ warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+ 5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+ 5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+ Article 6 - INTELLECTUAL PROPERTY
+
+
+ 6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+ 6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+ 6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+ 6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+ 1. not to remove, or modify, in any manner, the intellectual property
+ notices attached to the Software;
+
+ 2. to reproduce said notices, in an identical manner, in the copies
+ of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-Ã -vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+ Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+ Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+ Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+ Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+ Article 11 - MISCELLANEOUS
+
+
+ 11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+ 11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+ Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+ Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
Added: trunk/packages/biomaj/trunk/debian/files
===================================================================
--- trunk/packages/biomaj/trunk/debian/files (rev 0)
+++ trunk/packages/biomaj/trunk/debian/files 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,2 @@
+biomaj_1.1.0-1_all.deb science optional
+biomaj_1.1.0-1_all.deb science optional
Added: trunk/packages/biomaj/trunk/debian/po/POTFILES.in
===================================================================
--- trunk/packages/biomaj/trunk/debian/po/POTFILES.in (rev 0)
+++ trunk/packages/biomaj/trunk/debian/po/POTFILES.in 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
Added: trunk/packages/biomaj/trunk/debian/po/fr.po
===================================================================
--- trunk/packages/biomaj/trunk/debian/po/fr.po (rev 0)
+++ trunk/packages/biomaj/trunk/debian/po/fr.po 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,105 @@
+# Biomaj configuration.
+# Copyright (C) 2011 Olivier Sallou
+# This file is distributed under the same license as the PACKAGE package.
+# Olivier Sallou <olivier.sallou at irisa.fr>, 2011.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: biomaj 1.1.0\n"
+"Report-Msgid-Bugs-To: biomaj at packages.debian.org\n"
+"POT-Creation-Date: 2011-01-06 14:55+0100\n"
+"PO-Revision-Date: 2011-01-06 14:55+0100\n"
+"Last-Translator: Olivier Sallou <olivier.sallou at irisa.fr>\n"
+"Language-Team: fr_FR <olivier.sallou at irisa.fr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "The JDK home directory:"
+msgstr "Repertoire d'installation du JDK"
+
+#. Type: string
+#. Description
+#: ../templates:2001
+#msgid "Administration interface admin login:"
+#msgstr "Login de l'interface d'administration"
+
+#. Type: password
+#. Description
+#: ../templates:3001
+#msgid "Administration interface admin password:"
+#msgstr "Mot de passe administrateur"
+
+#. Type: select
+#. Description
+#: ../templates:4001
+#msgid "Database type."
+#msgstr "Sélectionner la base de donnée"
+
+#. Type: select
+#. Description
+#: ../templates:4001
+#msgid ""
+#"(HSQLDB is an embedded database that requires very few configuration as it "
+#"is shipped with BioMAJ. MySQL is recommended though for performance and "
+#"reliability issues)"
+#msgstr "HSQLDB est un base de donne embarquée qui requiert peu de configuration, elle est fournie avec BioMAJ. MySQL est recommandée pour de la performance et une meilleure stabilité"
+
+#. Type: boolean
+#. Description
+#: ../templates:5001
+msgid "Want to configure MySQL connection now ?"
+msgstr "Souhaitez vous configurer MySQL maintenant?"
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid "Enter MySQL server address:"
+msgstr "Nom du serveur hébergeant MySQL:"
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid "User login for biomaj database:"
+msgstr "Login de la base de donnée:"
+
+#. Type: password
+#. Description
+#: ../templates:8001
+msgid "User password for biomaj database:"
+msgstr "Mot de passe de la base de donnée:"
+
+#. Type: boolean
+#. Description
+#: ../templates:9001
+#msgid "Want to configure LDAP now ?"
+#msgstr "Souhaitez vous configurer le LDAP?"
+
+#. Type: string
+#. Description
+#: ../templates:10001
+#msgid "Enter LDAP server:"
+#msgstr "Adresse du LDAP:"
+
+#. Type: string
+#. Description
+#: ../templates:11001
+#msgid "Enter LDAP DN:"
+#msgstr "DN (directory name) du LDAP:"
+
+#. Type: string
+#. Description
+#: ../templates:12001
+#msgid "Enter LDAP filter (empty if not needed):"
+#msgstr "Filtre pour la recherche LDAP (vide si non nécessaire):"
+
+#. Type: string
+#. Description
+#: ../templates:13001
+#msgid "Enter port you want the provided tomcat server to listen to:"
+#msgstr "Entrer le port pour le serveur Tomcat"
+
Added: trunk/packages/biomaj/trunk/debian/po/templates.pot
===================================================================
--- trunk/packages/biomaj/trunk/debian/po/templates.pot (rev 0)
+++ trunk/packages/biomaj/trunk/debian/po/templates.pot 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,105 @@
+# Biomaj configuration.
+# Copyright (C) 2011 Olivier Sallou
+# This file is distributed under the same license as the PACKAGE package.
+# Olivier Sallou <olivier.sallou at irisa.fr>, 2011.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: biomaj 1.1.0\n"
+"Report-Msgid-Bugs-To: biomaj at packages.debian.org\n"
+"POT-Creation-Date: 2011-01-06 14:55+0100\n"
+"PO-Revision-Date: 2011-01-06 14:55+0100\n"
+"Last-Translator: Olivier Sallou <olivier.sallou at irisa.fr>\n"
+"Language-Team: fr_FR <olivier.sallou at irisa.fr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "The JDK home directory:"
+msgstr "Repertoire d'installation du JDK"
+
+#. Type: string
+#. Description
+#: ../templates:2001
+#msgid "Administration interface admin login:"
+#msgstr "Login de l'interface d'administration"
+
+#. Type: password
+#. Description
+#: ../templates:3001
+#msgid "Administration interface admin password:"
+#msgstr "Mot de passe administrateur"
+
+#. Type: select
+#. Description
+#: ../templates:4001
+#msgid "Database type."
+#msgstr "Sélectionner la base de donnée"
+
+#. Type: select
+#. Description
+#: ../templates:4001
+#msgid ""
+#"(HSQLDB is an embedded database that requires very few configuration as it "
+#"is shipped with BioMAJ. MySQL is recommended though for performance and "
+#"reliability issues)"
+#msgstr "HSQLDB est un base de donne embarquée qui requiert peu de configuration, elle est fournie avec BioMAJ. MySQL est recommandée pour de la performance et une meilleure stabilité"
+
+#. Type: boolean
+#. Description
+#: ../templates:5001
+msgid "Want to configure MySQL connection now ?"
+msgstr "Souhaitez vous configurer MySQL maintenant?"
+
+#. Type: string
+#. Description
+#: ../templates:6001
+msgid "Enter MySQL server address:"
+msgstr "Nom du serveur hébergeant MySQL:"
+
+#. Type: string
+#. Description
+#: ../templates:7001
+msgid "User login for biomaj database:"
+msgstr "Login de la base de donnée:"
+
+#. Type: password
+#. Description
+#: ../templates:8001
+msgid "User password for biomaj database:"
+msgstr "Mot de passe de la base de donnée:"
+
+#. Type: boolean
+#. Description
+#: ../templates:9001
+#msgid "Want to configure LDAP now ?"
+#msgstr "Souhaitez vous configurer le LDAP?"
+
+#. Type: string
+#. Description
+#: ../templates:10001
+#msgid "Enter LDAP server:"
+#msgstr "Adresse du LDAP:"
+
+#. Type: string
+#. Description
+#: ../templates:11001
+#msgid "Enter LDAP DN:"
+#msgstr "DN (directory name) du LDAP:"
+
+#. Type: string
+#. Description
+#: ../templates:12001
+#msgid "Enter LDAP filter (empty if not needed):"
+#msgstr "Filtre pour la recherche LDAP (vide si non nécessaire):"
+
+#. Type: string
+#. Description
+#: ../templates:13001
+#msgid "Enter port you want the provided tomcat server to listen to:"
+#msgstr "Entrer le port pour le serveur Tomcat"
+
Added: trunk/packages/biomaj/trunk/debian/postinst
===================================================================
--- trunk/packages/biomaj/trunk/debian/postinst (rev 0)
+++ trunk/packages/biomaj/trunk/debian/postinst 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+
+ant_home="/usr/share/ant"
+biomaj_root="/usr/share/biomaj"
+
+db_get biomaj/jdk_home
+jdk_home="$RET"
+
+#db_get biomaj/login
+#app_login="$RET"
+#db_get biomaj/password
+#app_passwd="$RET"
+
+#db_get biomaj/ldap
+#use_ldap="$RET"
+#db_get biomaj/ldap_server
+#ldap_host="$RET"
+#db_get biomaj/ldap_dn
+#ldap_dn="$RET"
+#db_get biomaj/ldap_filter
+#opt_filer="$RET"
+
+#db_get biomaj/db_type
+db_type="MySQL"
+db_get biomaj/mysql_host
+db_url="jdbc:mysql://$RET/biomaj_log"
+db_get biomaj/mysql_login
+db_login="$RET"
+db_get biomaj/mysql_passwd
+db_passwd="$RET"
+
+#db_get biomaj/tomcat_port
+tomcat_port="0"
+
+# Link general.conf
+cd $biomaj_root
+ln -s /etc/biomaj/general.conf general.conf
+
+javac -d $biomaj_root/bin $biomaj_root/bin/Configurator.java
+
+java -cp $biomaj_root/bin Configurator java_home:=$jdk_home ant_home:=$ant_home biomaj_root:=$biomaj_root use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter db_type:=$db_type db_url:=$db_url db_login:=$db_login db_passwd:=$db_passwd app_login:=$app_login app_passwd:=$app_passwd tomcat_port:=$tomcat_port
+
+#ln -s $biomaj_root/lib/biomaj.jar $biomaj_root/apache-tomcat-6.0.24/lib/biomaj.jar
+
+if [ $db_type = "MySQL" ]; then
+ echo "Installation Complete."
+ echo "You now need to create the biomaj_log database on your MySQL server."
+ echo "The creation script is provided at /usr/share/biomaj/sql/mysql.sql."
+fi
+
Property changes on: trunk/packages/biomaj/trunk/debian/postinst
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/postrm
===================================================================
--- trunk/packages/biomaj/trunk/debian/postrm (rev 0)
+++ trunk/packages/biomaj/trunk/debian/postrm 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+# Remove all
+if [ -e /usr/share/biomaj ]; then
+ rm -rf /usr/share/biomaj
+fi
+
+echo "Warning, BioMAJ database for MySQL is not deleted by process removal."
Property changes on: trunk/packages/biomaj/trunk/debian/postrm
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/prerm
===================================================================
--- trunk/packages/biomaj/trunk/debian/prerm (rev 0)
+++ trunk/packages/biomaj/trunk/debian/prerm 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# Shutdown hsqldb server
+#db_get biomaj/db_type
+#if [ $RET = "HSQLDB" ]; then
+# bash /usr/share/biomaj/bin/shutdown_dbserver.sh
+#fi
+
+# Shutdown tomcat server
+#sh /usr/share/biomaj/apache-tomcat-6.0.24/bin/shutdown.sh >/dev/null 2>&1
+
+# Remove post installation created files
+
+# Remove admin credentials
+if [ -e /usr/share/biomaj/.bmajwatcherpasswd ]; then
+ rm /usr/share/biomaj/.bmajwatcherpasswd
+fi
+# Remove biomaj.jar
+if [ -e /usr/share/biomaj/lib/biomaj.jar ]; then
+ rm /usr/share/biomaj/lib/biomaj.jar
+fi
+# Remove build content
+if [ -e /usr/share/biomaj/build ]; then
+ rm -rf /usr/share/biomaj/build
+fi
+# hsql server startup log
+if [ -e /usr/share/biomaj/dbserver.log ]; then
+ rm /usr/share/biomaj/dbserver.log
+fi
+# distribution directory
+if [ -e /usr/share/biomaj/dist ]; then
+ rm -rf /usr/share/biomaj/dist
+fi
+# Installation logs
+if [ -e /usr/share/biomaj/install_log.log ]; then
+ rm /usr/share/biomaj/install_log.log
+fi
+# Internal tmp directory
+if [ -e /usr/share/biomaj/tmp ]; then
+ rm -rf /usr/share/biomaj/tmp
+fi
+# Link to general.conf
+if [ -L /usr/share/biomaj/general.conf ]; then
+ rm /usr/share/biomaj/general.conf
+fi
+# Link to biomaj.jar
+if [ -L /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar ]; then
+ rm /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar
+fi
+
+#DEBHELPER#
Property changes on: trunk/packages/biomaj/trunk/debian/prerm
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/rules
===================================================================
--- trunk/packages/biomaj/trunk/debian/rules (rev 0)
+++ trunk/packages/biomaj/trunk/debian/rules 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# Partie de debian/rules utilisant debhelper.
+# GNU copyright 1997-1999 par Joey Hess.
+
+# Décommentez ceci pour enclencher le mode verbeux.
+#export DH_VERBOSE=1
+
+# Ceci est la version de compatibilité à utiliser avec debhelper.
+#export DH_COMPAT=7
+
+export ANT_HOME=/usr/share/ant
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ # ajoutez ici les commandes de compilation du paquet
+ #./configure
+ #make all
+ # --- fin de la partie personnalisée de compilation
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ # ajoutez ici les commandes de nettoyage après le processus de empaquetage
+ #make clean
+ # --- fin de la partie personnalisée de nettoyage
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ #dh_clean -k
+ dh_prep
+ dh_installdirs
+
+# compilez des fichiers indépendants de l'architecture ici
+binary-indep: build install
+ # ant -f usr/local/biomaj/build.xml
+ # Il n'y a rien à faire par défaut
+ #dh_installdirs /etc/biomaj
+ #dh_installdirs /var/log/biomaj
+ #dh_installdirs /usr/local
+ # DESTDIR Doit Etre Exctement /usr/src/packages/BUILD/debian/<nomDuPaquet>
+ #dh_install general.conf.deb /etc/biomaj/general.conf
+ #dh_install conf/* /etc/biomaj/
+ #dh_install * /usr/local/biomaj/
+ #dh_link /etc/biomaj/general.conf /usr/local/biomaj/general.conf
+ dh_installdirs
+ dh_install
+ dh_install usr
+ dh_install var
+ dh_install etc
+ dh_testdir
+ dh_testroot
+ dh_installdebconf
+ dh_installdocs
+ dh_installexamples
+ dh_installmenu
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+ dh_installcron
+ dh_installman
+ dh_installinfo
+# dh_undocumented
+ dh_installchangelogs
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_makeshlibs
+ dh_installdeb
+# dh_perl
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-arch:
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
+
+
Property changes on: trunk/packages/biomaj/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/biomaj/trunk/debian/source/format
===================================================================
--- trunk/packages/biomaj/trunk/debian/source/format (rev 0)
+++ trunk/packages/biomaj/trunk/debian/source/format 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1 @@
+3.0 (quilt)
Added: trunk/packages/biomaj/trunk/debian/templates
===================================================================
--- trunk/packages/biomaj/trunk/debian/templates (rev 0)
+++ trunk/packages/biomaj/trunk/debian/templates 2011-01-11 12:30:18 UTC (rev 5649)
@@ -0,0 +1,19 @@
+Template: biomaj/jdk_home
+Type: string
+_Description: The JDK home directory:
+
+Template: biomaj/mysql
+Type: boolean
+_Description: Want to configure MySQL connection now ?
+
+Template: biomaj/mysql_host
+Type: string
+_Description: Enter MySQL server address:
+
+Template: biomaj/mysql_login
+Type: string
+_Description: User login for biomaj database:
+
+Template: biomaj/mysql_passwd
+Type: password
+_Description: User password for biomaj database:
Property changes on: trunk/packages/biomaj/trunk/debian/templates
___________________________________________________________________
Added: svn:executable
+ *
More information about the debian-med-commit
mailing list