add trial design store subclasses.
[sgn.git] / lib / CXGN / Trial / TrialDesignStore / CrossingTrial.pm
blob0febb6836d3fdf30dec7428ec0bf2b7f1f21b77b
1 package CXGN::Trial::TrialDesignStore::CrossingTrial;
3 use Moose;
4 use Try::Tiny;
6 extends 'CXGN::Trial::TrialDesignStore::PhenotypingTrial';
8 sub BUILD { # adjust the cvterm ids for phenotyping trials
9 my $self = shift;
11 #print STDERR "PhenotypingTrial BUILD setting stock type id etc....\n";
12 my @source_stock_types;
13 $self->set_nd_experiment_type_id(SGN::Model::Cvterm->get_cvterm_row($self->get_bcs_schema(), 'field_layout', 'experiment_type')->cvterm_id());
14 $self->set_stock_type_id($self->get_plot_cvterm_id());
15 $self->set_source_stock_types( [ $self->get_cross_cvterm_id() ] );
16 $self->set_stock_relationship_type_id($self->get_plot_of_cvterm_id());
17 $self->set_valid_properties(
19 'seedlot_name',
20 'num_seed_per_plot',
21 'weight_gram_seed_per_plot',
22 'stock_name',
23 'plot_name',
24 'plot_number',
25 'block_number',
26 'rep_number',
27 'is_a_control',
28 'range_number',
29 'row_number',
30 'col_number',
31 'plant_names',
32 'plot_num_per_block',
33 'subplots_names', #For splotplot
34 'treatments', #For splitplot
35 'subplots_plant_names', #For splitplot
36 ]);