Difference between revisions of "API:EPrints/RepositoryConfig"
(Created page with '<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' com…') |
|||
Line 8: | Line 8: | ||
'''EPrints::RepositoryConfig''' - Repository Configuration | '''EPrints::RepositoryConfig''' - Repository Configuration | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_synopsis --> | ||
+ | ==SYNOPSIS== | ||
+ | $c->add_dataset_field( "eprint", { | ||
+ | name => "title", | ||
+ | type => "longtext", | ||
+ | }, reuse => 1 ); | ||
+ | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 52: | Line 66: | ||
See [[API:EPrints/Const|EPrints::Const]] for available triggers. | See [[API:EPrints/Const|EPrints::Const]] for available triggers. | ||
− | See | + | See [[API:EPrints/RepositoryConfig#add_trigger|add_trigger]] for %opts. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 73: | Line 87: | ||
priority - used to determine the order triggers are executed in (defaults to 0). | priority - used to determine the order triggers are executed in (defaults to 0). | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_dataset_field --> | ||
+ | ====add_dataset_field==== | ||
+ | |||
+ | $c->add_dataset_field( $datasetid, $fielddata, %opts ) | ||
+ | Add a field spec $fielddata to dataset $datasetid. | ||
+ | |||
+ | This method will abort if the field already exists and 'reuse' is unspecified. | ||
+ | |||
+ | Options: | ||
+ | reuse - re-use an existing field if it exists (must be same type) | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_copyright --> | ||
+ | ==COPYRIGHT== | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> |
Revision as of 10:46, 25 August 2011
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.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::RepositoryConfig - Repository Configuration
SYNOPSIS
$c->add_dataset_field( "eprint", { name => "title", type => "longtext", }, reuse => 1 );
DESCRIPTION
This provides methods for reading and setting a repository configuration. Setter methods may only be used in the configuration.
METHODS
Setter Methods
add_dataset_trigger
$c->add_dataset_trigger( $datasetid, TRIGGER_ID, $f, %opts )
Register a function reference $f to be called when the TRIGGER_ID event happens on $datasetid.
See EPrints::Const for available triggers.
See add_trigger for %opts.
add_trigger
$c->add_trigger( TRIGGER_ID, $f, %opts )
Register a function reference $f to be called when the TRIGGER_ID event happens.
See EPrints::Const for available triggers.
Options:
priority - used to determine the order triggers are executed in (defaults to 0).
add_dataset_field
$c->add_dataset_field( $datasetid, $fielddata, %opts )
Add a field spec $fielddata to dataset $datasetid.
This method will abort if the field already exists and 'reuse' is unspecified.
Options: reuse - re-use an existing field if it exists (must be same type)
COPYRIGHT