1 package CXGN
::Trial
::ParseUpload
;
6 use Moose
::Util
::TypeConstraints
;
8 with
'MooseX::Object::Pluggable';
11 has
'chado_schema' => (
13 isa
=> 'DBIx::Class::Schema',
23 has
'parse_warnings' => (
26 writer
=> '_set_parse_warnings',
27 reader
=> 'get_parse_warnings',
28 predicate
=> 'has_parse_warnings'
31 has
'parse_errors' => (
34 writer
=> '_set_parse_errors',
35 reader
=> 'get_parse_errors',
36 predicate
=> 'has_parse_errors'
39 has
'_parsed_data' => (
42 writer
=> '_set_parsed_data',
43 predicate
=> '_has_parsed_data'
46 has
'trial_stock_type' => (
49 predicate
=> 'has_trial_stock_type',
51 default => 'accession'
58 if (!$self->_validate_with_plugin($args)) {
59 my $errors = $self->get_parse_errors();
60 print STDERR
"\nCould not validate trial file: ".$self->get_filename()."\nError:".Dumper
($errors)."\n";
64 # print STDERR "Check 3.1: ".localtime();
66 if (!$self->_parse_with_plugin($args)) {
67 my $errors = $self->get_parse_errors();
68 print STDERR
"\nCould not parse trial file: ".$self->get_filename()."\nError:".Dumper
($errors)."\n";
72 # print STDERR "Check 3.2: ".localtime();
74 if (!$self->_has_parsed_data()) {
75 my $errors = $self->get_parse_errors();
76 print STDERR
"\nNo parsed data for trial file: ".$self->get_filename()."\nError:".Dumper
($errors)."\n";
79 return $self->_parsed_data();
82 #print STDERR "Check 3.3: ".localtime();
84 my $errors = $self->get_parse_errors();
85 print STDERR
"\nError parsing trial file: ".$self->get_filename()."\nError:".Dumper
($errors)."\n";