Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / lib / CXGN / BrAPI.pm
blob490584f8b23bdf852fa4db8dc12586b6fcab028c
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;
17 use CXGN::BrAPI::v1::Traits;
18 use CXGN::BrAPI::v1::GenomeMaps;
19 use CXGN::BrAPI::v1::Samples;
20 use CXGN::BrAPI::v1::VendorSamples;
21 use CXGN::BrAPI::v1::Observations;
22 use CXGN::BrAPI::v1::ObservationUnits;
23 use CXGN::BrAPI::v1::ObservationTables;
24 use CXGN::BrAPI::v1::ServerInfo;
25 use CXGN::BrAPI::v1::Results;
26 use CXGN::BrAPI::v1::Images;
27 use CXGN::BrAPI::v1::Markers;
28 use CXGN::BrAPI::v1::Variables;
29 use CXGN::BrAPI::v2::Authentication;
30 use CXGN::BrAPI::v2::BreedingMethods;
31 use CXGN::BrAPI::v2::Calls;
32 use CXGN::BrAPI::v2::CommonCropNames;
33 use CXGN::BrAPI::v2::CallSets;
34 use CXGN::BrAPI::v2::Crossing;
35 use CXGN::BrAPI::v2::GenomeMaps;
36 use CXGN::BrAPI::v2::Germplasm;
37 use CXGN::BrAPI::v2::GermplasmAttributes;
38 use CXGN::BrAPI::v2::GermplasmAttributeValues;
39 use CXGN::BrAPI::v2::Events;
40 use CXGN::BrAPI::v2::Images;
41 use CXGN::BrAPI::v2::Lists;
42 use CXGN::BrAPI::v2::Locations;
43 use CXGN::BrAPI::v2::MarkerPositions;
44 use CXGN::BrAPI::v2::Nirs;
45 use CXGN::BrAPI::v2::Observations;
46 use CXGN::BrAPI::v2::ObservationTables;
47 use CXGN::BrAPI::v2::ObservationUnits;
48 use CXGN::BrAPI::v2::ObservationVariables;
49 use CXGN::BrAPI::v2::People;
50 use CXGN::BrAPI::v2::Programs;
51 use CXGN::BrAPI::v2::ReferenceSets;
52 use CXGN::BrAPI::v2::References;
53 use CXGN::BrAPI::v2::Results;
54 use CXGN::BrAPI::v2::Samples;
55 use CXGN::BrAPI::v2::Seasons;
56 use CXGN::BrAPI::v2::SeedLots;
57 use CXGN::BrAPI::v2::ServerInfo;
58 use CXGN::BrAPI::v2::Studies;
59 use CXGN::BrAPI::v2::Traits;
60 use CXGN::BrAPI::v2::Trials;
61 use CXGN::BrAPI::v2::Variants;
62 use CXGN::BrAPI::v2::VariantSets;
63 use CXGN::BrAPI::v2::Pedigree;
64 use CXGN::BrAPI::v2::Plates;
68 has 'version' => (
69 isa => 'Str',
70 is => 'rw',
71 required => 1,
74 has 'brapi_module_inst' => (
75 isa => 'HashRef',
76 is => 'rw',
77 required => 1,
80 sub brapi_wrapper {
81 my $self = shift;
82 my $module = shift;
84 my $brapi_package = 'CXGN::BrAPI::'.$self->version().'::'.$module;
85 push @{$self->brapi_module_inst->{status}}, { 'INFO' => "Loading $brapi_package" };
86 my $brapi_module = $brapi_package->new($self->brapi_module_inst);
87 return $brapi_module;