do not attempt get the person object when no one is logged in...
[sgn.git] / lib / CXGN / Analysis / AnalysisMetadata.pm
blob38f8f15004086f56a3269e3684f3f57b1b3da5d0
2 =head1 NAME
4 CXGN::Analysis::AnalysisMetadata - manage metadata for analyses in breedbase
6 =head1 DESCRIPTION
8 CXGN::Analysis::AnalysisMetadata manages analysis metadata using a projectprop. It extends CXGN::JSONProp.
10 =head1 AUTHOR
12 Lukas Mueller <lam87@cornell.edu>
14 =head1 METHODS
16 =cut
18 package CXGN::Analysis::AnalysisMetadata;
20 use Moose;
22 extends 'CXGN::JSONProp';
24 =head2 dataset_id()
26 =cut
28 has 'dataset_id' => ( isa => 'Maybe[Int]', is => 'rw');
30 =head2 dataset_data()
32 =cut
34 has 'dataset_data' => (isa => 'Maybe[Str]', is => 'rw');
36 =head2 analysis_protocol()
38 =cut
40 has 'analysis_protocol' => (isa => 'Maybe[Str]', is => 'rw');
42 =head2 traits()
44 =cut
46 has 'traits' => (isa => 'Maybe[Ref]', is => 'rw');
48 =head2 create_timestamp()
50 =cut
52 has 'create_timestamp' => (isa => 'Maybe[Str]', is =>'rw');
54 =head2 modified_timestamp()
56 =cut
58 has 'modified_timestamp' => (isa => 'Maybe[Str]', is => 'rw');
60 =head2 result_summary()
62 =cut
64 has 'result_summary' => (isa => 'Maybe[HashRef]', is => 'rw');
66 =head2 analysis_model_type()
68 =cut
70 has 'analysis_model_type' => (isa => 'Maybe[Str]', is => 'rw');
72 =head1 INHERITED METHODS
74 =head2 store()
76 =head2 delete()
78 =cut
80 sub BUILD {
81 my $self = shift;
82 my $args = shift;
84 $self->prop_table('projectprop');
85 $self->prop_namespace('Project::Projectprop');
86 $self->prop_primary_key('projectprop_id');
87 $self->prop_type('analysis_metadata_json');
88 $self->prop_id($args->{prop_id});
89 $self->cv_name('project_property');
90 $self->allowed_fields([ qw | dataset_id dataset_data analysis_protocol create_timestamp modified_timestamp result_summary analysis_model_type| ]);
91 $self->parent_table('project');
92 $self->parent_primary_key('project_id');
94 $self->load();