From EPrints Documentation
Revision as of 19:13, 25 August 2009 by Cjg (Talk | contribs)

Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki


EPrints::Repository - A single eprint repository

User Comments


 $repository = $handle->get_repository;
 # without a $handle available
 $repository = EPrints->get_repository( $id );
 $id = $repository->get_id;
 $dataset = $repository->get_dataset( $setname );
 $repository->log( $msg );
 $confitem = $repository->get_conf( $key, [@subkeys] );
 # calling subtroutines in the config  
 $boolean = $repository->can_call( @cmd_conf_path );
 $result = $repository->call( $cmd, @params );
 # calling external commands
 $returncode = $repository->exec( $cmd_id, %map );

User Comments


This class is a single eprint repository with its own configuration, database and website.

User Comments

@dataset_ids = $repository->get_dataset_ids()

Returns a list of dataset ids in this repository.

User Comments

$dataset = $repository->get_dataset( $setname )

Returns the cached EPrints::DataSet with the given dataset id name.

User Comments

$confitem = $repository->get_conf( $key, [@subkeys] )

Returns a named configuration setting.

$repository->get_conf( "stuff", "en", "foo" )

is equivalent to

$repository->get_conf( "stuff" )->{en}->{foo}

User Comments

$repository->log( $msg )

Calls the log method from ArchiveConfig.pm for this repository with the given parameters. Basically logs the comments wherever the site admin wants them to go. Printed to STDERR by default.

User Comments

$result = $repository->call( $cmd, @params )

Calls the subroutine named $cmd from the configuration perl modules for this repository with the given params and returns the result.

User Comments

$boolean = $repository->can_call( @cmd_conf_path )

Return true if the given subroutine exists in this repository's config package.

User Comments

$id = $repository->get_id

Returns the id string of this repository.

User Comments

$returncode = $repository->exec( $cmd_id, %map )

Executes a system command. $cmd_id is the id of the command as set in SystemSettings and %map contains a list of things to "fill in the blanks" in the invocation line in SystemSettings.

User Comments