org.genealogie.arbre.defaut
Class ChargementArbreAscImpl

java.lang.Object
  |
  +--org.genealogie.arbre.defaut.ChargementArbreAscImpl
All Implemented Interfaces:
ChargementArbreAsc

public class ChargementArbreAscImpl
extends java.lang.Object
implements ChargementArbreAsc

Classe de bibliothŠque de fonctions de chargement d'un arbre ascendant en un nombre minimum de requˆte.

Version:
$Revision: 1.27 $, $Date: 2003/03/26 14:46:36 $
Author:
Templth

Field Summary
private  FactoryDAO factory
           
private  java.util.Hashtable generations
           
private  boolean hommeRacine
           
private  int idRacine
           
private  int nbGenerations
           
private  EltArbreAsc racine
           
 
Constructor Summary
ChargementArbreAscImpl()
           
 
Method Summary
 void chargerArbre()
          Cette m‚thode permet de charger un arbre ascendant.
 void chargerArbreFromArbre(ChargementArbreAsc ca)
          Cette m‚thode permet de charger un arbre ascendant … partir d'un autre arbre.
 java.util.Vector chargerFiches(int numeroBase, int generationBase)
          Cette m‚thode permet de r‚cup‚rer la liste des fiches des personnes d'un arbre.
private  void construireGenerations()
           
private  void convertirArbre(EltAsc r, java.util.Hashtable personnes)
           
private  EltArbreAsc convertirElement(EltAsc elt, java.util.Hashtable listeElts)
           
 EltArbreAsc getElement(int id)
           
private  java.util.Vector getElements(EltAsc elt)
           
private  java.util.Vector getElements(java.util.Vector liste, EltAsc elt)
           
private  void getElementsPourGeneration(EltArbreAsc elt, int position, int noGeneration)
           
private  java.util.Vector getExtremites(java.util.Vector liste, EltAsc elt, int noGeneration)
           
private  java.util.Vector getFeuillesMax(EltAsc r)
           
private  java.util.Vector getFeuillesMax(java.util.Vector elements)
           
 java.util.Vector getGeneration(int numeroGeneration)
          Cette m‚thode permet de r‚cup‚rer la liste des personnes d'une g‚n‚ration identifi‚e par un num‚ro.
 int getNbGenerations()
          Cette m‚thode permet de r‚cup‚rer le nombre de g‚n‚rations charg‚es.
 EltArbreAsc getRacine()
          Cette m‚thode permet de r‚cup‚rer la racine de l'arbre.
 void init(FactoryDAO factory, int idRacine, boolean hommeRacine)
           
 void init(FactoryDAO factory, int idRacine, boolean hommeRacine, int nbGenerations)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

factory

private FactoryDAO factory

nbGenerations

private int nbGenerations

idRacine

private int idRacine

hommeRacine

private boolean hommeRacine

racine

private EltArbreAsc racine

generations

private java.util.Hashtable generations
Constructor Detail

ChargementArbreAscImpl

public ChargementArbreAscImpl()
Method Detail

init

public void init(FactoryDAO factory,
                 int idRacine,
                 boolean hommeRacine)
          throws JGeneaException
Specified by:
init in interface ChargementArbreAsc

init

public void init(FactoryDAO factory,
                 int idRacine,
                 boolean hommeRacine,
                 int nbGenerations)
          throws JGeneaException
Specified by:
init in interface ChargementArbreAsc

getExtremites

private java.util.Vector getExtremites(java.util.Vector liste,
                                       EltAsc elt,
                                       int noGeneration)

getElements

private java.util.Vector getElements(java.util.Vector liste,
                                     EltAsc elt)

getElements

private java.util.Vector getElements(EltAsc elt)

getFeuillesMax

private java.util.Vector getFeuillesMax(EltAsc r)

getFeuillesMax

private java.util.Vector getFeuillesMax(java.util.Vector elements)

convertirElement

private EltArbreAsc convertirElement(EltAsc elt,
                                     java.util.Hashtable listeElts)

convertirArbre

private void convertirArbre(EltAsc r,
                            java.util.Hashtable personnes)

getElementsPourGeneration

private void getElementsPourGeneration(EltArbreAsc elt,
                                       int position,
                                       int noGeneration)

construireGenerations

private void construireGenerations()

getElement

public EltArbreAsc getElement(int id)
Specified by:
getElement in interface ChargementArbreAsc

chargerArbreFromArbre

public void chargerArbreFromArbre(ChargementArbreAsc ca)

Cette m‚thode permet de charger un arbre ascendant … partir d'un autre arbre.

Specified by:
chargerArbreFromArbre in interface ChargementArbreAsc

chargerArbre

public void chargerArbre()
                  throws JGeneaException

Cette m‚thode permet de charger un arbre ascendant.

Specified by:
chargerArbre in interface ChargementArbreAsc
Returns:
la racine

getRacine

public EltArbreAsc getRacine()

Cette m‚thode permet de r‚cup‚rer la racine de l'arbre.

Specified by:
getRacine in interface ChargementArbreAsc
Returns:
la racine

getNbGenerations

public int getNbGenerations()

Cette m‚thode permet de r‚cup‚rer le nombre de g‚n‚rations charg‚es.

Specified by:
getNbGenerations in interface ChargementArbreAsc
Returns:
le nombre de g‚n‚rations

getGeneration

public java.util.Vector getGeneration(int numeroGeneration)

Cette m‚thode permet de r‚cup‚rer la liste des personnes d'une g‚n‚ration identifi‚e par un num‚ro.

Specified by:
getGeneration in interface ChargementArbreAsc
Parameters:
numeroGeneration - le num‚ro de la g‚n‚ration
Returns:
la liste des personnes d'une g‚n‚ration
See Also:
org.genealogie.utils.EltArbreAsc

chargerFiches

public java.util.Vector chargerFiches(int numeroBase,
                                      int generationBase)
                               throws JGeneaException

Cette m‚thode permet de r‚cup‚rer la liste des fiches des personnes d'un arbre.

Specified by:
chargerFiches in interface ChargementArbreAsc
Parameters:
numeroBase - le num‚ro de la base de l'arbre
generationBase - le num‚ro de la g‚n‚ration de base de l'arbre
Returns:
la liste des fiches
See Also:
Fiche


Copyright © 2002 JGenea DAO. All Rights Reserved.