brapi phenotypes search refactor
[sgn.git] / lib / CXGN / BrAPI.pm
blobdb62e8dcf96048b62aaa2cda28f01336991670cc
1 package CXGN::BrAPI;
3 use Moose;
4 use Data::Dumper;
5 use CXGN::BrAPI::v1::Authentication;
6 use CXGN::BrAPI::v1::Calls;
7 use CXGN::BrAPI::v1::Crops;
8 use CXGN::BrAPI::v1::ObservationVariables;
9 use CXGN::BrAPI::v1::Studies;
10 use CXGN::BrAPI::v1::Germplasm;
11 use CXGN::BrAPI::v1::GermplasmAttributes;
12 use CXGN::BrAPI::v1::Trials;
13 use CXGN::BrAPI::v1::Markerprofiles;
14 use CXGN::BrAPI::v1::Programs;
15 use CXGN::BrAPI::v1::Locations;
16 use CXGN::BrAPI::v1::Phenotypes;
18 has 'version' => (
19 isa => 'Str',
20 is => 'rw',
21 required => 1,
24 has 'brapi_module_inst' => (
25 isa => 'HashRef',
26 is => 'rw',
27 required => 1,
30 sub brapi_wrapper {
31 my $self = shift;
32 my $module = shift;
34 my $brapi_package = 'CXGN::BrAPI::'.$self->version().'::'.$module;
35 push @{$self->brapi_module_inst->{status}}, { 'info' => "Loading $brapi_package" };
36 my $brapi_module = $brapi_package->new($self->brapi_module_inst);
37 return $brapi_module;