1 package CXGN
::Location
::LocationLookup
;
5 CXGN::Location::LocationLookup - a module to lookup geolocations by name.
10 my $location_lookup = CXGN::Location::LocationLookup->new({ schema => $schema} );
15 Looks up geolocations ("NaturalDiversity::NdGeolocation") by name. Provides the NaturalDiversity::NdGeolocation object when a geolocation matches.
19 Jeremy D. Edwards (jde22@cornell.edu)
24 use MooseX
::FollowPBP
;
25 use Moose
::Util
::TypeConstraints
;
30 isa
=> 'DBIx::Class::Schema',
33 has
'location_name' => (isa
=> 'Str', is
=> 'rw', predicate
=> 'has_location_name', clearer
=> 'clear_location_name');
37 my $schema = $self->get_schema();
39 if (!$self->has_location_name()){
42 $geolocation = $schema->resultset("NaturalDiversity::NdGeolocation")
44 description
=> $self->get_location_name(),