# #- # - # - # - # - # - # - # - # - # - # - * # - # - # - # - # - # - # - # - # - # - # # # $c->{plugins}->{"Export::ETD_MS"}->{params}->{disable}=0; $c->{etd_ms}->{fields} = [ { tagname => 'etd_ms:title', eprint_fieldname => 'title', type => 'simple_text', include_null_value => 1 }, { tagname => 'etd_ms:creator', eprint_fieldname => 'creators_name', type => 'name', multiple => 1}, { tagname => 'etd_ms:subject', eprint_fieldname => 'keywords', type => 'simple_text', include_null_value => 1 }, { tagname => 'etd_ms:description', eprint_fieldname => 'abstract', type => 'simple_text' }, { tagname => 'etd_ms:publisher', eprint_fieldname => 'institution', type => 'simple_text' }, { tagname => 'etd_ms:contributor', eprint_fieldname => 'thesis_advisors_name', type => 'name', opts => { role => 'advisor' }, multiple => 1}, { tagname => 'etd_ms:date', eprint_fieldname => 'date', type => 'simple_text' }, { tagname => 'etd_ms:type', type=> 'constant', value => "Electronic Thesis or Dissertation" }, { tagname => 'etd_ms:identifier', type => 'function', function => 'generate_etd_ms_item_identifier' }, { tagname => 'null', type => 'function', function => 'generate_etd_ms_document_tags' }, { tagname => 'etd_ms:degree', type => 'compound', parts => [ { tagname => 'etd_ms:name', type => 'simple_text', eprint_fieldname => 'thesis_degree_name' }, { tagname => 'etd_ms:level', type => 'simple_text', eprint_fieldname => 'thesis_type' }, { tagname => 'etd_ms:discipline', type => 'simple_text', eprint_fieldname => 'department' }, { tagname => 'etd_ms:grantor', type => 'simple_text', eprint_fieldname => 'institution' }, ] }, ]; $c->{generate_etd_ms_document_tags} = sub { my ($plugin, $eprint, $field_conf) = @_; my $tags = []; my @documents = $eprint->get_all_documents(); my $mimetypes = $plugin->{session}->get_repository->get_conf( "oai", "mime_types" ); foreach my $document ( @documents ) { my $format = $mimetypes->{$document->get_value("format")}; $format = $document->get_value("format") unless defined $format; push @{$tags}, $plugin->{session}->render_data_element(8, "etd_ms:format", $format ) ; push @{$tags}, $plugin->{session}->render_data_element(8, "etd_ms:identifier", $document->get_url() ); push @{$tags}, $plugin->{session}->render_data_element(8, "etd_ms:language", $document->get_value("language") ); } return $tags; }; $c->{generate_etd_ms_item_identifier} = sub { my ($plugin, $eprint, $field_conf) = @_; my $repo = $plugin->repository; my $library_identifier = $repo->get_conf('etd_ms','libaray_identifier'); return [ $plugin->_simple_tag($field_conf, $library_identifier . $eprint->id)]; };