xmlgp
Class Util

java.lang.Object
  extended by xmlgp.Util

public final class Util
extends java.lang.Object

This class has the utility methods for XMLGP.

Author:
dharani

Constructor Summary
Util()
           
 
Method Summary
static Experiment getExperimentById(Project project, int id)
          Returns experiment for the given id of the experiment.
static Generation getGenerationtById(Trial trial, int id)
          Returns generation for the given id of the generation.
static Individual getIndividualById(Generation generation, int id)
          Returns individual for the given id of the individual.
 int getNumberOfChildren(Node node)
          Returns the number of children of a node.
 Representation getRepresentationById(Individual individual, int id)
          Returns representation for the given id of the representation.
 Representation getRepresentationByType(Individual individual, java.lang.String type)
           
static Treatment getTreatmentById(Experiment experiment, int id)
          Returns treatment for the given id of the treatment.
static Trial getTrialtById(Treatment treatment, int id)
          Returns trial for the given id of the trial.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getExperimentById

public static Experiment getExperimentById(Project project,
                                           int id)
Returns experiment for the given id of the experiment.

Parameters:
project - the data holder of project
id - the id of the experiment
Returns:
the data holder of experiment

getTreatmentById

public static Treatment getTreatmentById(Experiment experiment,
                                         int id)
Returns treatment for the given id of the treatment.

Parameters:
experiment - the data holder of experiment
id - the id of the treatment
Returns:
treatment the data holder of treatment

getTrialtById

public static Trial getTrialtById(Treatment treatment,
                                  int id)
Returns trial for the given id of the trial.

Parameters:
treatment - the data holder of treatment
id - the id of the trial
Returns:
the data holder of trial

getGenerationtById

public static Generation getGenerationtById(Trial trial,
                                            int id)
Returns generation for the given id of the generation.

Parameters:
trial - the data holder of trial
id - the id of the generation
Returns:
the data holder of generation

getIndividualById

public static Individual getIndividualById(Generation generation,
                                           int id)
Returns individual for the given id of the individual.

Parameters:
generation - the data holder of individual
id - the id of the individual
Returns:
the data holder of individual

getRepresentationById

public Representation getRepresentationById(Individual individual,
                                            int id)
Returns representation for the given id of the representation.

Parameters:
individual - the data holder of individual
id - the id of the representation
Returns:
representation the data holder of representation

getRepresentationByType

public Representation getRepresentationByType(Individual individual,
                                              java.lang.String type)

getNumberOfChildren

public int getNumberOfChildren(Node node)
Returns the number of children of a node.

Parameters:
node - the data holder of node
Returns:
the number of children of the node