package GO::Object::BiblioSearchEntry; =head1 NAME GO::Object::BiblioSearchEntry - represents a GO biblio entry for searching =cut use strict; use Data::Dumper; use Exporter; use lib '/Users/gwg/go/scratch/tools'; use base 'GO::Object::BiblioEntry'; #GO::MiniTests); use GO::TestSet qw(dfv_test); sub _specification { my $self = shift; my @biblio_entry_spec = $self->SUPER::_specification; push @biblio_entry_spec, ( "all_params_as_text", { test => dfv_test('is_a_string_p', { this => 1 }), constructor => [ sub { my $obj = shift; my $input_h = shift; $obj->{all_params_as_text} = join("\0", values %$input_h); }, ], }, ); return @biblio_entry_spec; } sub transform_parsed_data { my $self = shift; my $data_h = $self->SUPER::transform_parsed_data(@_); $data_h->{all_params_as_text} = join("\0", map { if (ref $_ eq 'ARRAY') { join("\0", @$_); } else { $_; } } values %$data_h); return $data_h; } sub all_params_as_text { my $self = shift; return $self->{all_params_as_text} || ''; } 1;