|
|
(12 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| <!-- Pod2Wiki=_preamble_ | | <!-- 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' comments will be lost. | | This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. |
− | --> | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints|package_name=EPrints}}[[Category:API|EPRINTS]]<div><!-- Edit below this comment --> |
− | __NOTOC__
| |
− | {{API}}{{Pod2Wiki}}{{API:Source|file=EPrints.pm|package_name=EPrints}}[[Category:API|EPrints]]<div><!-- Edit below this comment --> | |
| | | |
| | | |
− | <!-- Pod2Wiki=head_name --></div> | + | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> |
| ==NAME== | | ==NAME== |
− | '''EPrints''' - Institutional Repository software
| + | EPrints - Institutional Repository software |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=head_synopsis --></div> | + | <!-- Pod2Wiki= --> |
| + | <!-- Pod2Wiki=head_synopsis --> |
| ==SYNOPSIS== | | ==SYNOPSIS== |
− | #!/usr/bin/perl -w -I/opt/eprints3/perl_lib
| + | <source lang="perl">use EPrints qw(); |
− |
| |
− | use EPrints;
| |
− | use strict;
| |
− |
| |
− | # cgi script
| |
− | my $handle = EPrints->get_handle();
| |
− | exit( 1 ) unless( defined $handle );
| |
− |
| |
− | # bin script
| |
− | my $handle = EPrints->get_handle( repository => $repository_id, noise => $noise );
| |
− | exit( 1 ) unless( defined $handle );
| |
− |
| |
− | $eprint = $handle->get_eprint( $eprintid );
| |
− | my $title = $eprint->get_value( 'title' );
| |
− |
| |
− | $eprint->set_value( 'creators',
| |
− | [
| |
− | {
| |
− | name => { given=>'John', family=>'Smith' },
| |
− | id => 'js@example.com',
| |
− | },
| |
− | {
| |
− | name => { given=>'Marvin', family=>'Fenderson' },
| |
− | id => 'marvin@totl.net',
| |
− | },
| |
− | ]
| |
− | );
| |
− | $eprint->commit;
| |
− |
| |
− | my $eprint_ds = $handle->get_dataset( "eprint" );
| |
− | my $new_eprint = $eprint_ds->create_object(
| |
− | $handle, { title=>"My new EPrint!" } );
| |
− |
| |
− | my $archive_ds = $handle->get_dataset( "archive" );
| |
− | my $search = new EPrints::Search(
| |
− | handle => $handle,
| |
− | dataset => $archive_ds );
| |
− | my $date_mf = $archive_ds->get_field( "date" );
| |
− | $search->add_field( $date_mf, "2000-2003" );
| |
− |
| |
− | my $list = $search->perform_search;
| |
− | $list->map(
| |
− | sub {
| |
− | my( $handle, $dataset, $eprint, $info ) = @_;
| |
− |
| |
− | printf( "%s: %s\n",
| |
− | $eprint->get_value( "date" ),
| |
− | $eprint->get_value( "title" ) );
| |
− | }
| |
− | );
| |
− | $list->dispose();
| |
− |
| |
− | $handle->log( "We did some stuff." );
| |
− |
| |
− | if( some_test() ) { EPrints::abort( "Something bad happened" ); }
| |
− |
| |
− | $handle->terminate;
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | # don't check current user (CLI only) |
| + | use EPrints qw( no_check_user ); |
| | | |
− | <!-- Pod2Wiki=head_description --></div>
| + | $eprints = EPrints->new; |
− | ==DESCRIPTION==
| |
− | Using this module will cause all the other EPrints modules to be used also.
| |
| | | |
− | See http://www.eprints.org/ for more information about EPrints. Much more documentation can be found at http://wiki.eprints.org/w/Documentation
| + | # CLI |
| + | $repo = $eprints->repository( "demoprints" ); |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| + | # CGI |
− | <h4><span style='display:none'>User Comments</span></h4>
| + | $repo = $eprints->current_repository; |
− | <!-- Edit below this comment -->
| |
| | | |
| + | if( EPrints->VERSION() gt v3.2.0 ) |
| + | { |
| + | ... |
| + | }</source> |
| | | |
− | <!-- Pod2Wiki=head_key_api_eprints_modules --></div>
| |
− | ===Key API EPrints Modules===
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints==== | + | <!-- Pod2Wiki=head_description --> |
| + | ==DESCRIPTION== |
| + | See http://www.eprints.org/. |
| | | |
− | This module! Used to load the other modules.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::DataObj==== | + | <!-- Pod2Wiki=head_available_symbols --> |
− | | + | ===Available Symbols=== |
− | Abstract object representing a single record in a DataSet. Has one subclass for each type of DataSet. The most important subclasses are listed below. This module documents generic functions which work on all (or most) data objects. Every DataObj has a unique ID within the dataset (an integer, with the exception of Subject). Every DataObj is given a URI of the form <em>repository_url</em>/id/<em>datasetid</em>/<em>dataobj_id</em>
| + | You can pass options to the EPrints package that effect the EPrints initialisation e.g. |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | <pre> use EPrints qw( no_check_user );</pre> |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj_document --></div>
| + | * no_check_user |
− | ====EPrints::DataObj::Document====
| + | : Do not check the current user/group is the same as the user/group in SystemSettings. |
| | | |
− | Represents a single document. A document is a set of metadata plus files. It *may* have some repository configuraed metadata in addition to the default. The metadata describes the document and is mostly concerned with formats, and rights. Documents belong to exactly one EPrints::DataObj::EPrint are are destroyed if it is destroyed. A document has one or more file. If there's more than one file then they are related, like a .css file for a .html
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj_eprint --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::DataObj::EPrint==== | + | <!-- Pod2Wiki=head_debugging --> |
| + | ===Debugging=== |
| + | To get a full stack trace on errors and warnings use {{API:PodLink|file=Carp|package_name=Carp|section=|text=Carp}}'s verbose mode. E.g. in ''perl_lib/EPrints/SystemSettings.pm'' add: |
| | | |
− | Represents a single submission to the repository. May have 0+ documents as sub-objects. Has both system defined metafields plus many defined in the repository configuration.
| + | <pre> use Carp 'verbose';</pre> |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataset --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::DataSet==== | + | <!-- Pod2Wiki=head_methods --> |
| + | ==METHODS== |
| + | <!-- Pod2Wiki=head_VERSION --> |
| + | ===VERSION=== |
| | | |
− | This object represents a set of objects of the same time, and has associated MetaFields and database tables. A dataset may represent a subset of another dataset. For example, "eprint" represents all EPrints::DataObj::EPrint objects, but the "buffer" dataset only represents those which are "under review".
| + | <source lang="perl">$version = EPrints->VERSION() |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | + | </source> |
− | <h4><span style='display:none'>User Comments</span></h4>
| + | Returns the version of EPrints in 'v' format (this is the UNIVERSAL method). |
− | <!-- Edit below this comment -->
| |
| | | |
− |
| |
− | <!-- Pod2Wiki=item_eprints_handle --></div>
| |
− | ====EPrints::Handle====
| |
− |
| |
− | the core of the EPrints API. This object represents a connection between the configuration for a repository, the database connection and either the CGI (web) or CLI (command line) interface.
| |
− |
| |
− | Handle has a large number of methods, which are documented in more than one file:
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_handle_language --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Handle::Language==== | + | <!-- Pod2Wiki=head_human_version --> |
| + | ===human_version=== |
| | | |
− | Handle methods for i18n.
| + | <source lang="perl">EPrints->human_version() |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| + | </source> |
− | <h4><span style='display:none'>User Comments</span></h4>
| + | Returns the EPrints version in a human-readable form. |
− | <!-- Edit below this comment -->
| |
| | | |
− |
| |
− | <!-- Pod2Wiki=item_eprints_handle_render --></div>
| |
− | ====EPrints::Handle::Render====
| |
− |
| |
− | Handle methods for generating XHTML as XML::DOM objects.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_handle_cgi --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Handle::CGI==== | + | <!-- Pod2Wiki=head_abort --> |
| + | ===abort=== |
| | | |
− | Handle methods for working with the mod_perl connection.
| + | <source lang="perl">EPrints->abort( $errmsg ) |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| + | </source> |
− | <h4><span style='display:none'>User Comments</span></h4>
| + | This subroutine is loaded before other modules so that it may be used to report errors when initialising modules. |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_handle_page --></div>
| |
− | ====EPrints::Handle::Page====
| |
− | | |
− | Handle methods for generating and serving XHTML web pages.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_handle_xml --></div>
| |
− | ====EPrints::Handle::XML====
| |
− | | |
− | Handle methods for creating XML::DOM objects.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_list --></div>
| |
− | ====EPrints::List====
| |
| | | |
− | A list of zero or more data-objects in a single dataset. It can be constructed from a list of ID's or returned as the result of a search.
| + | When running under Mod_Perl this method is replaced. |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_metafield --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::MetaField==== | + | <!-- Pod2Wiki=head_dump --> |
− | | + | ===dump=== |
− | A single field in a dataset. It has many subclasses, one for each type of field.
| |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | + | <source lang="perl">EPrints->dump( $VAR1 [, $VAR2 ... ] ) |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | </source> |
| + | Use {{API:PodLink|file=Data/Dumper|package_name=Data::Dumper|section=|text=Data::Dumper}} to dump the passed variables to STDERR. |
| | | |
− | <!-- Pod2Wiki=item_eprints_repository --></div>
| |
− | ====EPrints::Repository====
| |
− |
| |
− | Represents the configuration, datasets and dataobjects of a single repository. It is loaded from the configuration files and is essentially read-only.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_search --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Search==== | + | <!-- Pod2Wiki=head_new --> |
| + | ===new=== |
| | | |
− | The search object takes parameters and returns a List object of matching dataobjs from a given dataset. It can also be used it reverse to test if a dataobj matches it's parameters.
| + | <source lang="perl">$ep = EPrints->new(); |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| + | </source> |
− | <h4><span style='display:none'>User Comments</span></h4>
| + | Construct a new EPrints system object. |
− | <!-- Edit below this comment -->
| |
| | | |
− |
| |
− | <!-- Pod2Wiki=head_other_api_eprints_modules --></div>
| |
− | ===Other API EPrints Modules===
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_box --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Box==== | + | <!-- Pod2Wiki=head_repository --> |
− | | + | ===repository=== |
− | A utitility module to render HTML boxes with style and javascript roll-up animations.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | <source lang="perl">$repo = $ep->repository( $repository_id, [%options] ); |
| | | |
− | <!-- Pod2Wiki=item_eprints_database --></div>
| + | </source> |
− | ====EPrints::Database====
| + | Return the [[API:EPrints/Repository|EPrints::Repository]] with the given ID, or undef. Options are... optional. |
| | | |
− | An object representing a connection to the database for a repository. This is an abstraction over sub-objects which connect to MySQL or Oracle.
| + | Options noise=>1, etc. |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj_file --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::DataObj::File==== | + | <!-- Pod2Wiki=head_current_repository --> |
− | | + | ===current_repository=== |
− | Represents a single file in a document with some basic metadata such as checksums.
| |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | + | <source lang="perl">$repo = $ep->current_repository(); |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | </source> |
| + | Returns the current [[API:EPrints/Repository|EPrints::Repository]]. The current repository is determined by the apache request. |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj_user --></div>
| + | Returns undef if there is no current repository active. |
− | ====EPrints::DataObj::User====
| |
| | | |
− | Represents a single registered user of the repository. Used for keeping track of preferences, profile information and rights management.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_dataobj_subject --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::DataObj::Subject====
| |
− | | |
− | This dataset is used to store the structure of heierachichal(sp?) sets, used by the "Subject" metafield type.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_email --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Email==== | + | <!-- Pod2Wiki=head_see_also --> |
− | | + | ==SEE ALSO== |
− | Tool for sending email.
| + | [[API:EPrints/Repository|EPrints::Repository]] |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_eprints_paginate --></div> | + | <!-- Pod2Wiki= --> |
− | ====EPrints::Paginate====
| + | <!-- Pod2Wiki=head_copyright --> |
− | | + | ==COPYRIGHT== |
− | Tools for rendering an EPrint::List as paginated HTML.
| + | Copyright 2000-2011 University of Southampton. |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_paginate_columns --></div>
| |
− | ====EPrints::Paginate::Columns====
| |
− | | |
− | An extension to EPrints::Paginate which shows the results in sortable columns, as seen in Items and Review screens.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_storage --></div>
| |
− | ====EPrints::Storage====
| |
− | | |
− | Methods to abstract the process of reading and writing files. EPrints 3.2 introduced the possibility of storing files in the cloud, or in other storage devices, and this module is the interface to that.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_tempdir --></div>
| |
− | ====EPrints::TempDir====
| |
− | | |
− | Tools for creating and destorying temporary directories.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_time --></div>
| |
− | ====EPrints::Time====
| |
− | | |
− | A set of methods for handling time and converting between time formats.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_url --></div>
| |
− | ====EPrints::URL====
| |
− | | |
− | Utility methods for generating and getting URLs, relative paths etc.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_utils --></div>
| |
− | ====EPrints::Utils====
| |
− | | |
− | Misc. utility methods.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_eprints_xml --></div> | |
− | ====EPrints::XML==== | |
− | | |
− | Utility methods for working with XML and DOM. This papers over the cracks between the 3 different XML DOM libraries EPrints supports.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=head_available_symbols --></div>
| |
− | ===Available Symbols===
| |
− | You can pass options to the EPrints package that effect the EPrints initialisation e.g.
| |
− | | |
− | use EPrints qw( no_check_user );
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=item_no_check_user --></div>
| |
− | ====no_check_user====
| |
− | | |
− | Do not check the current user/group is the same as the user/group in Systemsettings.
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− | | |
− | | |
− | <!-- Pod2Wiki=head_debugging_slow_processes --></div>
| |
− | ===Debugging Slow Processes===
| |
− | This module installs a signal handler that will print a stack trace if given a USR2 signal (if your system supports this signal). To print a stack trace to the error log execute:
| |
− | | |
− | $ kill -USR2 PID
| |
− |
| |
− | Where PID is the id number of the stalled process.
| |
− | | |
− | A shell script will print the stack trace to the console.
| |
| | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| + | This file is part of EPrints <http://www.eprints.org/>. |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |
| | | |
− | <!-- Pod2Wiki=head_methods --></div>
| + | EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
− | ==METHODS==
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
| | | |
| + | You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see <http://www.gnu.org/licenses/>. |
| | | |
− | <!-- Pod2Wiki=item_abort --></div>
| |
− | ===EPrints::abort( $msg )===
| |
− |
| |
− | Print an error message and exit. If running under mod_perl then print the error as a webpage and exit.
| |
− |
| |
− | This subroutine is loaded before other modules so that it may be used to report errors when initialising modules.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
| | | |
| | | |
− | <!-- Pod2Wiki=item_get_handle --></div> | + | <!-- Pod2Wiki= --> |
− | ===$handle = EPrints->get_handle( %options )===
| + | <!-- Pod2Wiki=_postamble_ --> |
− | | |
− | Return an EPrints::Handle object joining a web request or script to a database connection, and the configuration and data for a single repository.
| |
− | | |
− | The main options are:
| |
− | | |
− | repository => $repository_id: This is required for command line scripts. CGI scripts will obtain the repository ID from the context of the request.
| |
− | | |
− | noise => [0..4]: The level of debug info. 0 - silent, 1 - quietish (default), 2 - noisy, 3 - debug all SQL statements, 4 - debug database connection.
| |
− | | |
− | The following advanced options are also available but are less likely to be useful:
| |
− | | |
− | consume_post_data => [0,1]: Default 1. Only meaningful when running as a web-request. Setting this to "0" will stop the session parsing the POST data which comes in via STDIN. This may be useful if writing apache handlers which make decisions before the main $handle is created. If you don't set it they consume the POST data, and the main handle doesn't get to see it.
| |
− | | |
− | check_database => [0,1]: Default 1. By default a session checks the database structure is compatible with the EPrints database module version. Setting this to "0" will supress this check. =cut ######################################################################
| |
− | | |
− | sub get_handle {
| |
− | my( $class, %options ) = @_;
| |
− | | |
− | return EPrints::Handle->new( %options ); }
| |
− |
| |
− | ###################################################################### =pod
| |
− | | |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
| <!-- Edit below this comment --> | | <!-- Edit below this comment --> |
− |
| |
− |
| |
− | <!-- Pod2Wiki=item_get_repository --></div>
| |
− | ===$repository = EPrints->get_repository( $repository_id )===
| |
− |
| |
− | Return an EPrints::Repository object representing the configuration of the named repository.
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− |
| |
− |
| |
− | <!-- Pod2Wiki=head_see_also --></div>
| |
− | ==SEE ALSO==
| |
− | [[API:EPrints/Handle|EPrints::Handle]]
| |
− |
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− |
| |
− |
| |
− | <!-- Pod2Wiki=head_copyright --></div>
| |
− | ==COPYRIGHT==
| |
− | __COPYRIGHT__
| |
− |
| |
− | Copyright 2000-2008 University of Southampton. All Rights Reserved.
| |
− |
| |
− | __LICENSE__
| |
− | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
| |
− | <h4><span style='display:none'>User Comments</span></h4>
| |
− | <!-- Edit below this comment -->
| |
− |
| |
− |
| |
− | <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
| |