package GO::Object::Publication; =head1 NAME GO::Object::Publication - represents a publication of some sort =cut use strict; use Data::Dumper; use Exporter; #use GO::MiniTests qw/:std/; use lib '/Users/gwg/go/scratch/tools'; use vars qw(@ISA); use base qw(GO::Object::Generic); #GO::MiniTests); use GO::Object::Dbxref; use GO::TestSet qw(dfv_test); sub _specification { my $self = shift; return ( # required "title", { test => dfv_test('is_a_string_p', { this => 1 }), }, "author", { test => dfv_test('is_a_string_p', { this => 1 }), }, "journal", { test => dfv_test('is_a_string_p', { this => 1 }), }, "volume", { test => dfv_test('is_a_string_p', { this => 1 }), }, "issue", { test => dfv_test('is_a_string_p', { this => 1 }), }, "publication-date", { # could this just be the year? test => dfv_test('is_a_date_p', { this => 1 }), }, # "keywords", { # allow_multiple => 1, # test => 'is_valid_list_p', # valid => '', # }, "epub", { # if it's an epub ahead of print test => dfv_test('is_boolean_p', { this => 1 }), }, "abstract_url", { test => dfv_test('is_an_url_p', { this => 1 }), }, "full_text_url", { test => dfv_test('is_an_url_p', { this => 1 }), }, "pdf_url", { test => dfv_test('is_an_url_p', { this => 1 }), }, "dbxref", { # should we specify that it has to be either a PMID or a DOI? allow_multiple => 1, test => dfv_test('is_a_dbxref_obj_p', { this => 1 }), }, ); } 1;