Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Generic Reporting Framework
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Custom Export Fields (v2.0+ only)=== To specify which fields should appear in the custom export box for a specific report plugin, include an 'export_conf' parameter in the plugin's configuration that defines an ID for locating configuration relating to exports. E.g. <pre> #in the report plugin's 'sub new' constructor $self->{export_conf} = 'hefce_report'; </pre> The export fields themselevs should then be defined at the local archive configuration level, using this 'export_conf' ID. Export fields are described using a hash of 1 or more arrays, allowing fields to be grouped under a particular heading. Note, that as per a search config, fields of other datasets may be defined also, providing the dataset has a connection with the parent dataset (e.g. document fields can be defined within an eprint context as documents.fieldname). E.g. <pre> $c->{hefce_report}->{exportfields} = { ref_core => [ qw( eprintid documents.content type title abstract creators publisher divisions dates id_number isbn issn official_url )], ref_rioxx => [ qw( rioxx2_free_to_read rioxx2_license_ref rioxx2_coverage rioxx2_source rioxx2_subject rioxx2_dateAccepted rioxx2_publication_date rioxx2_apc rioxx2_project rioxx2_version rioxx2_version_of_record )], ref_exceptions => [ qw( hoa_compliant hoa_problems hoa_ref_pan hoa_ex_dep hoa_ex_dep_txt hoa_ex_acc hoa_ex_acc_txt hoa_ex_tec hoa_ex_tec_txt hoa_ex_oth hoa_ex_oth_txt )], }; </pre> For each of the fields defined above a checkbox will be displayed in the Report's 'Export Options' box. Some of these may be selected by default, by defining an "exportfield_defaults" value, also at the local archive configuration level, E.g. <pre> $c->{hefce_report}->{exportfield_defaults} = [ qw( eprintid documents.content type title creators dvisisions dates hoa_compliant hoa_problems ) ]; </pre> Finally, functions may be defined that allow fields to be displayed in a bespoke manner. These functions are also defined at the local archive level via use of the 'export_conf' ID, with each field mapping on to a function. The functions take the DataObj and Report plugin as parameters. E.g. <pre> $c->{hefce_report}->{custom_export} = { hoa_compliant => sub { my( $dataobj, $plugin ) = @_; my $compliance = "Compliant"; my @problems = $plugin->validate_dataobj( $dataobj ); if( scalar( @problems ) > 0 ) { $compliance = "Not Compliant"; } $compliance = "Compliant pending open access" if defined $plugin->get_state( $dataobj ); return $compliance; }, creators => sub { my( $dataobj ) = @_; my @creator_names; my $creators = $dataobj->get_value( "creators" ); foreach my $c ( @{$creators} ) { push @creator_names, EPrints::Utils::make_name_string( $c->{name} ); } return join( ";", @creator_names ); }, </pre>
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)