1 package CXGN
::BrAPI
::v1
::Locations
;
5 use SGN
::Model
::Cvterm
;
7 use CXGN
::BrAPI
::Pagination
;
8 use CXGN
::BrAPI
::JSONResponse
;
10 extends
'CXGN::BrAPI::v1::Common';
14 my $page_size = $self->page_size;
15 my $page = $self->page;
16 my $status = $self->status;
18 my $locations = CXGN
::Trial
::get_all_locations
($self->bcs_schema);
19 my ($data_window, $pagination) = CXGN
::BrAPI
::Pagination
->paginate_array($locations,$page_size,$page);
21 foreach (@
$data_window){
23 locationDbId
=> qq|$_->[0]|,
24 locationType
=> $_->[8],
25 locationName
=> $_->[1],
27 abbreviation
=>$_->[9],
28 countryCode
=> $_->[6],
29 countryName
=> $_->[5],
34 instituteAddress
=>$_->[10],
35 additionalInfo
=> $_->[7],
36 documentationURL
=> undef
40 my %result = (data
=>\
@data);
42 return CXGN
::BrAPI
::JSONResponse
->return_success(\
%result, $pagination, \
@data_files, $status, 'Locations list result constructed');