EPrints for RePEc with ReDIF metadata
-------------------------------------


Installation

- Install EPrints (2.3.13.1 is the latest known compatible stable version),
  create and configure an EPrints archive and make sure it works.

- Get RePEc archive code and decide where to store ReDIF files
  http://repec.org/ - for more info

- Create archive template and series templates in ???arch.rdf and ???seri.rdf
  files respectively (follow ReDIF documentation and Guildford protocol).

- Get the PIDAID database parameters and RAS metadata update parameters from
  RAS administrator (currently: Ivan Kurmanov, kurmanov@openlib.org)

- Get the latest ACIS distribution (from http://acis.openlib.org/code/) and
  unpack it.

- Change directory to ACIS-.../EPrints.  You'll find install.pl and
  install-redif.pl there (among other files).

- Use install-redif.pl script

    $ install-redif.pl /opt/eprints2/archives/Archive

  and answer the questions.  You'll need to enter PIDAID database parameters
  and RAS metadata update parameters.

  Enter nothing for the identifier prefix question at step 6.  ("Identifier
  prefix for the ReDIF templates?")  (*Unless you want to have all ReDIF files
  in one RePEc series....*)


- edit /opt/eprints2/archives/Archive/cfg/ArchiveConfig.pm:

  add archive configuration parameters:

  eprint_metadata_export_ReDIF_id_func

     Should point to a function, which accepts an eprint object
     (EPrints::EPrint) and returns a valid ReDIF template handle.  Handles
     must follow Guildford protocol and ReDIF format, and must be unique
     across all templates of your archive.

     Example:

     $c->{eprint_metadata_export_ReDIF_id_func} = sub { 
        my $e = shift;
        my $id = $e -> get_value( 'eprintid' );
        return "aaa:cccbbb:$id";
     };

  eprint_metadata_export_ReDIF_filename_func

     Should point to a function, which accepts an eprint object
     (EPrints::EPrint) and returns the core part of the ReDIF file name.

     Example:

     $c->{eprint_metadata_export_ReDIF_filename_func} = sub { 
        my $e = shift;
        my $id = $e -> get_value( 'eprintid' );
        return "cccbbb/$id";
     };

     ".rdf" will be added to the value, and directory will be prefixed to it:

      my $file = $id;
      if ( $filefunc ) {
         $file = &{ $filefunc }( $eprint, $handle );
      }
      my $filename = $dir . "/" . $file . ".rdf";
      





