<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.eprints.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tdb01r</id>
	<title>EPrints Documentation - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eprints.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tdb01r"/>
	<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/Special:Contributions/Tdb01r"/>
	<updated>2026-04-03T20:49:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10833</id>
		<title>API:EPrints/Config</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10833"/>
		<updated>2013-07-30T14:59:48Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Config.pm|package_name=EPrints::Config}}[[Category:API|CONFIG]][[Category:API:EPrints/Config|CONFIG]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Config''' - software configuration handler&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This module handles loading the main configuration for an instance of the eprints software - such as the list of language id's and  the top level configurations for repositories - the XML files in /archives/&lt;br /&gt;
&lt;br /&gt;
You should need to use this module, instead load repositories using [[API:EPrints|EPrints]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_deprecated_methods --&amp;gt;&lt;br /&gt;
===Deprecated Methods===&lt;br /&gt;
* EPrints::Config::abort&lt;br /&gt;
: Deprecated, use [[API:EPrints#abort|EPrints/abort]].&lt;br /&gt;
&lt;br /&gt;
* EPrints::Config::get_archive_config&lt;br /&gt;
* EPrints::Config::get_archive_ids&lt;br /&gt;
* EPrints::Config::load_archive_config_module&lt;br /&gt;
: Deprecated, use *_repository_*.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_init --&amp;gt;&lt;br /&gt;
===init===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::Config::init()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the EPrints configuration.&lt;br /&gt;
&lt;br /&gt;
Do not use this method directly, it will be automatically called when using EPrints.&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  cgi_path /cgi&lt;br /&gt;
  cfg_path /cfg&lt;br /&gt;
  lib_path /lib&lt;br /&gt;
  arc_path /archives&lt;br /&gt;
  bin_path /bin&lt;br /&gt;
  var_path /var&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_load_system_config --&amp;gt;&lt;br /&gt;
===load_system_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::Config::load_system_config()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the system configuration files.&lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  /cfg/cfg.d&lt;br /&gt;
  /lib/syscfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_config --&amp;gt;&lt;br /&gt;
===system_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$conf = EPrints::Config::system_config()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the system configuration variable. To access a specific configuration option use [[API:EPrints/Config#get|get]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_repository_config --&amp;gt;&lt;br /&gt;
===get_repository_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repository = EPrints::Config::get_repository_config( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a hash of the basic configuration for the repository with the given id. This hash will include the properties from SystemSettings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_repository_ids --&amp;gt;&lt;br /&gt;
===get_repository_ids===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@ids = EPrints::Config::get_repository_ids()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a list of ids of all repositories belonging to this instance of the eprints software.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_load_repository_config_module --&amp;gt;&lt;br /&gt;
===load_repository_config_module===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$arc_conf = EPrints::Config::load_repository_config_module( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the full configuration for the specified repository.&lt;br /&gt;
&lt;br /&gt;
Returns a reference to a hash containing the full repository configuration. &lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archives/[archiveid]/cfg/cfg.d&lt;br /&gt;
  site_lib/cfg.d&lt;br /&gt;
  lib/cfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archiveroot    archives/[archiveid]&lt;br /&gt;
  documents_path archives/[archiveid]/documents&lt;br /&gt;
  config_path    archives/[archiveid]/cfg&lt;br /&gt;
  htdocs_path    archives/[archiveid]/html&lt;br /&gt;
  cgi_path       archives/[archiveid]/cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get --&amp;gt;&lt;br /&gt;
===get===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$value = EPrints::Config::get( $confitem )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the value of a given eprints configuration item. These values are obtained from SystemSettings plus a few extras for paths.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write_config --&amp;gt;&lt;br /&gt;
===write_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = EPrints::Config::write_config( $dest, $names, $values )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write name-value pairs to a configuration file $dest (overwriting any existing data). This uses [[API:EPrints/Dumper|EPrints::Dumper]] to serialise the passed Perl structures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10832</id>
		<title>API:EPrints/Config</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10832"/>
		<updated>2013-07-30T14:58:22Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Config.pm|package_name=EPrints::Config}}[[Category:API|CONFIG]][[Category:API:EPrints/Config|CONFIG]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Config''' - software configuration handler&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This module handles loading the main configuration for an instance of the eprints software - such as the list of language id's and  the top level configurations for repositories - the XML files in /archives/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_deprecated_methods --&amp;gt;&lt;br /&gt;
===Deprecated Methods===&lt;br /&gt;
* EPrints::Config::abort&lt;br /&gt;
: Deprecated, use [[API:EPrints|EPrints]]::abort.&lt;br /&gt;
&lt;br /&gt;
* EPrints::Config::get_archive_config&lt;br /&gt;
* EPrints::Config::get_archive_ids&lt;br /&gt;
* EPrints::Config::load_archive_config_module&lt;br /&gt;
: Deprecated, use *_repository_*.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_init --&amp;gt;&lt;br /&gt;
===init===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::Config::init()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the EPrints configuration.&lt;br /&gt;
&lt;br /&gt;
Do not use this method directly, it will be automatically called when using EPrints.&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  cgi_path /cgi&lt;br /&gt;
  cfg_path /cfg&lt;br /&gt;
  lib_path /lib&lt;br /&gt;
  arc_path /archives&lt;br /&gt;
  bin_path /bin&lt;br /&gt;
  var_path /var&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_load_system_config --&amp;gt;&lt;br /&gt;
===load_system_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::Config::load_system_config()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the system configuration files.&lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  /cfg/cfg.d&lt;br /&gt;
  /lib/syscfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_config --&amp;gt;&lt;br /&gt;
===system_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$conf = EPrints::Config::system_config()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the system configuration variable. To access a specific configuration option use [[API:EPrints/Config#get|get]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_repository_config --&amp;gt;&lt;br /&gt;
===get_repository_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repository = EPrints::Config::get_repository_config( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a hash of the basic configuration for the repository with the given id. This hash will include the properties from SystemSettings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_repository_ids --&amp;gt;&lt;br /&gt;
===get_repository_ids===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@ids = EPrints::Config::get_repository_ids()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a list of ids of all repositories belonging to this instance of the eprints software.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_load_repository_config_module --&amp;gt;&lt;br /&gt;
===load_repository_config_module===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$arc_conf = EPrints::Config::load_repository_config_module( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the full configuration for the specified repository.&lt;br /&gt;
&lt;br /&gt;
Returns a reference to a hash containing the full repository configuration. &lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archives/[archiveid]/cfg/cfg.d&lt;br /&gt;
  site_lib/cfg.d&lt;br /&gt;
  lib/cfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archiveroot    archives/[archiveid]&lt;br /&gt;
  documents_path archives/[archiveid]/documents&lt;br /&gt;
  config_path    archives/[archiveid]/cfg&lt;br /&gt;
  htdocs_path    archives/[archiveid]/html&lt;br /&gt;
  cgi_path       archives/[archiveid]/cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get --&amp;gt;&lt;br /&gt;
===get===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$value = EPrints::Config::get( $confitem )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the value of a given eprints configuration item. These values are obtained from SystemSettings plus a few extras for paths.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write_config --&amp;gt;&lt;br /&gt;
===write_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = EPrints::Config::write_config( $dest, $names, $values )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write name-value pairs to a configuration file $dest (overwriting any existing data). This uses [[API:EPrints/Dumper|EPrints::Dumper]] to serialise the passed Perl structures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10831</id>
		<title>API:EPrints/Config</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Config&amp;diff=10831"/>
		<updated>2013-07-30T14:56:43Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Config.pm|package_name=EPrints::Config}}[[Category:API|CONFIG]][[Category:API:EPrints/Config|CONFIG]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Config''' - software configuration handler&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This module handles loading the main configuration for an instance of the eprints software - such as the list of language id's and  the top level configurations for repositories - the XML files in /archives/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_deprecated_methods --&amp;gt;&lt;br /&gt;
===Deprecated Methods===&lt;br /&gt;
 EPrints::Config::abort&lt;br /&gt;
Deprecated, use [[API:EPrints|EPrints]]::abort.&lt;br /&gt;
&lt;br /&gt;
 EPrints::Config::get_archive_config&lt;br /&gt;
 EPrints::Config::get_archive_ids&lt;br /&gt;
 EPrints::Config::load_archive_config_module&lt;br /&gt;
Deprecated, use *_repository_*.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_normal_methods --&amp;gt;&lt;br /&gt;
===Normal Methods===&lt;br /&gt;
 EPrints::Config::init()&lt;br /&gt;
Load the EPrints configuration.&lt;br /&gt;
&lt;br /&gt;
Do not use this method directly, it will be automatically called when using EPrints.&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  cgi_path /cgi&lt;br /&gt;
  cfg_path /cfg&lt;br /&gt;
  lib_path /lib&lt;br /&gt;
  arc_path /archives&lt;br /&gt;
  bin_path /bin&lt;br /&gt;
  var_path /var&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 EPrints::Config::load_system_config()&lt;br /&gt;
Load the system configuration files.&lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  /cfg/cfg.d&lt;br /&gt;
  /lib/syscfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $conf = EPrints::Config::system_config()&lt;br /&gt;
Returns the system configuration variable. To access a specific configuration option use [[API:EPrints/Config#get|get]].&lt;br /&gt;
&lt;br /&gt;
 $repository = EPrints::Config::get_repository_config( $id )&lt;br /&gt;
Returns a hash of the basic configuration for the repository with the given id. This hash will include the properties from SystemSettings.&lt;br /&gt;
&lt;br /&gt;
 @ids = EPrints::Config::get_repository_ids()&lt;br /&gt;
Return a list of ids of all repositories belonging to this instance of the eprints software.&lt;br /&gt;
&lt;br /&gt;
 $arc_conf = EPrints::Config::load_repository_config_module( $id )&lt;br /&gt;
Load the full configuration for the specified repository.&lt;br /&gt;
&lt;br /&gt;
Returns a reference to a hash containing the full repository configuration. &lt;br /&gt;
&lt;br /&gt;
Configuration files are loaded in order from (later files with the same name will be ignored):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archives/[archiveid]/cfg/cfg.d&lt;br /&gt;
  site_lib/cfg.d&lt;br /&gt;
  lib/cfg.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the following configuration properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archiveroot    archives/[archiveid]&lt;br /&gt;
  documents_path archives/[archiveid]/documents&lt;br /&gt;
  config_path    archives/[archiveid]/cfg&lt;br /&gt;
  htdocs_path    archives/[archiveid]/html&lt;br /&gt;
  cgi_path       archives/[archiveid]/cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $value = EPrints::Config::get( $confitem )&lt;br /&gt;
Return the value of a given eprints configuration item. These values are obtained from SystemSettings plus a few extras for paths.&lt;br /&gt;
&lt;br /&gt;
 $ok = EPrints::Config::write_config( $dest, $names, $values )&lt;br /&gt;
Write name-value pairs to a configuration file $dest (overwriting any existing data). This uses [[API:EPrints/Dumper|EPrints::Dumper]] to serialise the passed Perl structures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Repository&amp;diff=10830</id>
		<title>API:EPrints/Repository</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Repository&amp;diff=10830"/>
		<updated>2013-07-30T14:39:33Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Repository.pm|package_name=EPrints::Repository}}[[Category:API|REPOSITORY]][[Category:API:EPrints/Repository|REPOSITORY]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Repository - connection to a single repository instance&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;use EPrints;&lt;br /&gt;
&lt;br /&gt;
$repo = EPrints-&amp;gt;new-&amp;gt;current_repository;&lt;br /&gt;
&lt;br /&gt;
$repo = EPrints-&amp;gt;new-&amp;gt;repository( &amp;quot;myrepo&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
$xml = $repo-&amp;gt;xml;&lt;br /&gt;
$cuser = $repo-&amp;gt;current_user;&lt;br /&gt;
$repo-&amp;gt;log( &amp;quot;Got user &amp;quot; . $cuser-&amp;gt;id );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
EPrints::Repository represents a connection to the EPrints system. It connects to a single EPrints repository, and the database used by that repository.&lt;br /&gt;
&lt;br /&gt;
Each Repository has a &amp;quot;current language&amp;quot;. If you are running in a  multilingual mode, this is used by the HTML rendering functions to choose what language to return text in.&lt;br /&gt;
&lt;br /&gt;
The Repository object also knows about the current apache connection, if there is one, including the CGI parameters. &lt;br /&gt;
&lt;br /&gt;
If the connection requires a username and password then it can also  give access to the [[API:EPrints/DataObj/User|EPrints::DataObj::User]] object representing the user who is causing this request. See [[API:EPrints/Repository#current_user|current_user]].&lt;br /&gt;
&lt;br /&gt;
The Repository object provides access to the [[API:EPrints/XML|EPrints::XML]] and [[API:EPrints/XHTML|EPrints::XHTML]] class which contain methods for creating XHTML results which can be returned via the web interface. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repository = EPrints::Repository-&amp;gt;new( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Creates and returns a new repository object. This is a utility object only and will only have the basic system configuration available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repository = EPrints::Repository-&amp;gt;new( $repository_id, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a connection to an EPrints repository $repository_id which provides access to the database and to the repository configuration.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  db_connect - 1&lt;br /&gt;
  check_db - 1&lt;br /&gt;
  noise - 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_from_data --&amp;gt;&lt;br /&gt;
===create_from_data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repo = EPrints::Repository-&amp;gt;create_from_data( $epdata )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new repository instance using $epdata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repo-&amp;gt;delete()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Destroy the repository and all its contents.&lt;br /&gt;
&lt;br /&gt;
To allow this method you must first set $EPrints::Repository::ALLOW_DELETE to 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_query --&amp;gt;&lt;br /&gt;
===query===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$query = $repository-&amp;gt;query&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the {{API:PodLink|file=CGI|package_name=CGI|section=|text=CGI}} object describing the current HTTP query, or  undefined if this isn't a CGI script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_url_param --&amp;gt;&lt;br /&gt;
===url_param===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$value or @values = $repository-&amp;gt;url_param( $name )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve the UTF-8 value(s) of the query parameter $name for the current request.&lt;br /&gt;
&lt;br /&gt;
This will not cause the POST data to be read. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_param --&amp;gt;&lt;br /&gt;
===param===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$value or @values = $repository-&amp;gt;param( $name )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Passes through to CGI.pm param method.&lt;br /&gt;
&lt;br /&gt;
$value = $repository-&amp;amp;gt;param( $name ): returns the value of CGI parameter $name.&lt;br /&gt;
&lt;br /&gt;
@values = $repository-&amp;amp;gt;param: returns an array of the names of all the CGI parameters in the current request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_xml --&amp;gt;&lt;br /&gt;
===xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xml = $repo-&amp;gt;xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an [[API:EPrints/XML|EPrints::XML]] object for working with XML.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_xhtml --&amp;gt;&lt;br /&gt;
===xhtml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $repo-&amp;gt;xhtml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an [[API:EPrints/XHTML|EPrints::XHTML]] object for working with XHTML.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_eprint --&amp;gt;&lt;br /&gt;
===eprint===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint = $repository-&amp;gt;eprint( $eprint_id );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
A convience method to return the [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]] with  the given ID, or undef.&lt;br /&gt;
&lt;br /&gt;
Equivent to $repository-&amp;amp;gt;dataset(&amp;quot;eprint&amp;quot;)-&amp;amp;gt;dataobj( $eprint_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_current_language --&amp;gt;&lt;br /&gt;
===current_language===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$lang = $repository-&amp;gt;current_language&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the current language.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_current_user --&amp;gt;&lt;br /&gt;
===current_user===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $repository-&amp;gt;current_user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the current logged in [[API:EPrints/DataObj/User|EPrints::DataObj::User]] for this session.&lt;br /&gt;
&lt;br /&gt;
Return undef if there isn't one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user --&amp;gt;&lt;br /&gt;
===user===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $repository-&amp;gt;user( $user_id );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
A convience method to return the [[API:EPrints/DataObj/User|EPrints::DataObj::User]] with  the given ID, or undef.&lt;br /&gt;
&lt;br /&gt;
Equivent to $repository-&amp;amp;gt;dataset(&amp;quot;user&amp;quot;)-&amp;amp;gt;dataobj( $user_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user_by_username --&amp;gt;&lt;br /&gt;
===user_by_username===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $repository-&amp;gt;user_by_username( $username );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the user with the given username, or undef.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user_by_email --&amp;gt;&lt;br /&gt;
===user_by_email===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $repository-&amp;gt;user_by_email( $email );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/DataObj/User|EPrints::DataObj::User]] with the given email, or undef.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_template --&amp;gt;&lt;br /&gt;
===template===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$template = $repository-&amp;gt;template( [ $id ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_dataset --&amp;gt;&lt;br /&gt;
===dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = $repository-&amp;gt;dataset( $setname )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a given [[API:EPrints/DataSet|EPrints::DataSet]] or undef if it doesn't exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_config --&amp;gt;&lt;br /&gt;
===config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$confitem = $repository-&amp;gt;config( $key, [@subkeys] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a named configuration setting including those defined in archvies/&amp;amp;lt;archive_id&amp;amp;gt;/cfg/cfg.d/ &lt;br /&gt;
&lt;br /&gt;
$repository-&amp;amp;gt;config( &amp;quot;stuff&amp;quot;, &amp;quot;en&amp;quot;, &amp;quot;foo&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
is equivalent to &lt;br /&gt;
&lt;br /&gt;
$repository-&amp;amp;gt;config( &amp;quot;stuff&amp;quot; )-&amp;amp;gt;{en}-&amp;amp;gt;{foo} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_log --&amp;gt;&lt;br /&gt;
===log===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repository-&amp;gt;log( $msg [, $level ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Log a plain text message $msg. If $level is given only logs if $level is greater than or equal to [[API:EPrints/Repository#noise|noise]].&lt;br /&gt;
&lt;br /&gt;
To override where log messages are sent define the &amp;lt;code&amp;gt;log&amp;lt;/code&amp;gt; callback:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $c-&amp;amp;gt;{log} = sub {&lt;br /&gt;
    my( $repo, $msg, $level ) = @_;&lt;br /&gt;
  &lt;br /&gt;
    ...&lt;br /&gt;
  };&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_call --&amp;gt;&lt;br /&gt;
===call===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$result = $repository-&amp;gt;call( $cmd, @params )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Calls the subroutine named $cmd from the configuration perl modules for this repository with the given params and returns the result.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_can_call --&amp;gt;&lt;br /&gt;
===can_call===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $repository-&amp;gt;can_call( @cmd_conf_path )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return true if the given subroutine exists in this repository's config package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_try_call --&amp;gt;&lt;br /&gt;
===try_call===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$result = $repository-&amp;gt;try_call( $cmd, @params )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Calls the subroutine named $cmd from the configuration perl modules for this repository with the given params and returns the result.&lt;br /&gt;
&lt;br /&gt;
If the subroutine does not exist then quietly returns undef.&lt;br /&gt;
&lt;br /&gt;
This is used to call deprecated callback subroutines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_template_dirs --&amp;gt;&lt;br /&gt;
===template_dirs===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@dirs = $repository-&amp;gt;template_dirs( $langid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of directories from which template files may be sourced, where the first matching template encountered is used.&lt;br /&gt;
&lt;br /&gt;
The directories searched are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archives/[archiveid]/cfg/lang/[langid]/templates/&lt;br /&gt;
  archives/[archiveid]/cfg/templates/&lt;br /&gt;
  archives/[archiveid]/cfg/themes/[themeid]/lang/[langid]/templates/&lt;br /&gt;
  archives/[archiveid]/cfg/themes/[themeid]/templates/&lt;br /&gt;
  lib/themes/[themeid]/templates/&lt;br /&gt;
  lib/lang/[langid]/templates/&lt;br /&gt;
  lib/templates/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_static_dirs --&amp;gt;&lt;br /&gt;
===get_static_dirs===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@dirs = $repository-&amp;gt;get_static_dirs( $langid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of directories from which static files may be sourced.&lt;br /&gt;
&lt;br /&gt;
Directories are returned in order of importance, most important first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  archives/[archiveid]/cfg/lang/[langid]/static&lt;br /&gt;
  archives/[archiveid]/cfg/static&lt;br /&gt;
  archives/[archiveid]/themes/[themeid]/static&lt;br /&gt;
  lib/themes/[themeid]/static&lt;br /&gt;
  lib/lang/[langid]/static&lt;br /&gt;
  lib/static&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_id --&amp;gt;&lt;br /&gt;
===id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$id = $repository-&amp;gt;id &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id string of this repository.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_exec --&amp;gt;&lt;br /&gt;
===exec===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$returncode = $repository-&amp;gt;exec( $cmd_id, %map )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Executes a system command. $cmd_id is the id of the command as set in SystemSettings and %map contains a list of things to &amp;quot;fill in the blanks&amp;quot; in the invocation line in SystemSettings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_test_config --&amp;gt;&lt;br /&gt;
===test_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;( $returncode, $output) = $repository-&amp;gt;test_config&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This runs &amp;quot;epadmin test&amp;quot; as an external script to test if the current configuraion on disk loads OK. This can be used by the web interface to test if changes to config. files may be saved, or not.&lt;br /&gt;
&lt;br /&gt;
$returncode will be zero if everything seems OK.&lt;br /&gt;
&lt;br /&gt;
If not, then $output will contain the output of epadmin test &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_reload_config --&amp;gt;&lt;br /&gt;
===reload_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $repository-&amp;gt;reload_config&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Trigger a configuration reload on the next request/index.&lt;br /&gt;
&lt;br /&gt;
To reload the configuration right now just call [[API:EPrints/Repository#load_config|load_config]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_html_phrase --&amp;gt;&lt;br /&gt;
===html_phrase===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml_phrase = $repository-&amp;gt;html_phrase( $phraseid, %inserts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM object describing a phrase from the phrase files.&lt;br /&gt;
&lt;br /&gt;
$phraseid is the id of the phrase to return. If the same ID appears in both the repository-specific phrases file and the system phrases file then the repository-specific one is used.&lt;br /&gt;
&lt;br /&gt;
If the phrase contains &amp;amp;lt;ep:pin&amp;amp;gt; elements, then each one should have an entry in %inserts where the key is the &amp;quot;ref&amp;quot; of the pin and the value is an XHTML DOM object describing what the pin should be  replaced with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_phrase --&amp;gt;&lt;br /&gt;
===phrase===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$utf8_text = $repository-&amp;gt;phrase( $phraseid, %inserts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Performs the same function as html_phrase, but returns plain text.&lt;br /&gt;
&lt;br /&gt;
All HTML elements will be removed, &amp;amp;lt;br&amp;amp;gt; and &amp;amp;lt;p&amp;amp;gt; will be converted  into breaks in the text. &amp;amp;lt;img&amp;amp;gt; tags will be replaced with their  &amp;quot;alt&amp;quot; values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_noise --&amp;gt;&lt;br /&gt;
===noise===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$noise_level = $repository-&amp;gt;noise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the noise level for the current session. See the explaination under EPrints::Repository-&amp;amp;gt;new()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_plugins --&amp;gt;&lt;br /&gt;
===plugins===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@plugins = $repository-&amp;gt;plugins( [ $params, ] %restrictions )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of plugin objects that conform to %restrictions (may be empty).&lt;br /&gt;
&lt;br /&gt;
If $params is given uses that hash reference to initialise the plugins. Always passes this session to the plugin constructor method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_init_from_indexer --&amp;gt;&lt;br /&gt;
===init_from_indexer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$repo-&amp;gt;init_from_indexer( $daemon )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
(Re)initialise the repository object for use by the indexer.&lt;br /&gt;
&lt;br /&gt;
Calls [[API:EPrints/Repository#check_last_changed|check_last_changed]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10829</id>
		<title>API:EPrints/Plugin/InputForm/Component</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10829"/>
		<updated>2013-07-29T12:45:23Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/InputForm/Component.pm|package_name=EPrints::Plugin::InputForm::Component}}[[Category:API|COMPONENT]][[Category:API:EPrints/Plugin/InputForm|COMPONENT]][[Category:API:EPrints/Plugin/InputForm/Component|COMPONENT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Plugin::InputForm::Component''' - A single form component &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
A component is an HTML widget for use in a [[API:EPrints/Workflow/Stage|EPrints::Workflow::Stage]]. A [[API:EPrints/Plugin/InputForm/Component/Field|EPrints::Plugin::InputForm::Component::Field]] component renders the form inputs for a [[API:EPrints/MetaField|EPrints::MetaField]] but component subclasses can be used to provide any required behaviour around user input. Components don't even have to be form inputs e.g. just render a fragment of XHTML.&lt;br /&gt;
&lt;br /&gt;
Where components are shown and configuration are controlled through the EPrints XML workflow. The workflow reads the component type, loads the referenced plugin and passes the XML node to [[API:EPrints/Plugin/InputForm/Component#parse_config|parse_config]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;component type=&amp;quot;Upload&amp;quot; show_help=&amp;quot;always&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this instance the [[API:EPrints/Plugin/InputForm/Component/Upload|EPrints::Plugin::InputForm::Component::Upload]] component is being inserted into the workflow and its help is being set to always be shown.&lt;br /&gt;
&lt;br /&gt;
Components share many of the features seen in [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]]s. The [[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]] method is called from the Screen's [[API:EPrints/Plugin/InputForm/Component#from|from]] stage and the component [[API:EPrints/Plugin/InputForm/Component#render|render]]s a fragment of XHTML that is inserted into the resulting page. Components have no equivalent to [[API:EPrints/Plugin/Screen#can_be_viewed|EPrints::Plugin::Screen/can_be_viewed]] - it is assumed that the workflow only exposes inputs to which the user has access.&lt;br /&gt;
&lt;br /&gt;
A component will be created twice during a workflow response: to process the incoming data ([[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]]) and to generate the new page ([[API:EPrints/Plugin/InputForm/Component#render|render]]). Therefore you can not rely on data persisting between the update and rendering stages, unless you store the data in the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]].&lt;br /&gt;
&lt;br /&gt;
Buttons in components are classed as &amp;quot;internal actions&amp;quot;. Internal actions do not normally change the response workflow but only how the component renders. This is used to provide search features, provide more button inputs etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_ajax_support --&amp;gt;&lt;br /&gt;
===AJAX Support===&lt;br /&gt;
Some components support AJAX-like incremental updates. The Javascript Component class can make requests aimed at a Component by specifying the &amp;lt;code&amp;gt;component=cXX&amp;lt;/code&amp;gt; CGI parameter and it is then up to the component what it renders.&lt;br /&gt;
&lt;br /&gt;
The default behaviour is to render the XHTML fragment represented by the component, which is used by Javascript as an in-place replament. Elsewhere a JSON response is used to drive client-side behaviour.&lt;br /&gt;
&lt;br /&gt;
Similarly to [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]], AJAX components have a life-cycle of:&lt;br /&gt;
&lt;br /&gt;
* 1. update_from_form() reads form values and sets them on the object&lt;br /&gt;
* 2. wishes_to_export() determines if this component is exporting&lt;br /&gt;
* 3. export() generates a response&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Component/Documents|EPrints::Plugin::InputForm::Component::Documents]], which uses a JSON response to determine the documents to update.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component = EPrints::Plugin::InputForm::Component-&amp;gt;new( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new component object with following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  session - session object&lt;br /&gt;
  collapse - whether the component starts collapsed&lt;br /&gt;
  no_help - hide field help&lt;br /&gt;
  no_toggle - hide help toggle button&lt;br /&gt;
  surround - surround class, defaults to 'Default'&lt;br /&gt;
  prefix - prefix for the component id&lt;br /&gt;
  dataobj - object the field is being rendered for&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Surround/Default|EPrints::Plugin::InputForm::Surround::Default]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parse_config --&amp;gt;&lt;br /&gt;
===parse_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;parse_config( $config_dom )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Parses the supplied DOM object and populates $component configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_required --&amp;gt;&lt;br /&gt;
===is_required===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_required()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is required to be completed before the workflow may proceed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_surround --&amp;gt;&lt;br /&gt;
===get_surround===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$surround = $component-&amp;gt;get_surround()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns the surround for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_collapsed --&amp;gt;&lt;br /&gt;
===is_collapsed===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_collapsed()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is to be rendered in a compact form (for example, just title / required / help).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_help --&amp;gt;&lt;br /&gt;
===render_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$help = $component-&amp;gt;render_help( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns DOM containing the help text for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_name --&amp;gt;&lt;br /&gt;
===get_name===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$name = $component-&amp;gt;get_name()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the unique name of this field (for prefixes, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_wishes_to_export --&amp;gt;&lt;br /&gt;
===wishes_to_export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;wishes_to_export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#wishes_to_export|EPrints::Plugin::Screen/wishes_to_export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export_mimetype --&amp;gt;&lt;br /&gt;
===export_mimetype===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$mime_type = $component-&amp;gt;export_mimetype&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export_mimetype|EPrints::Plugin::Screen/export_mimetype]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component-&amp;gt;export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export|EPrints::Plugin::Screen/export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $component-&amp;gt;render&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Renders the component in its surround.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_title --&amp;gt;&lt;br /&gt;
===render_title===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$title = $component-&amp;gt;render_title( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the title of this component as a DOM object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_content --&amp;gt;&lt;br /&gt;
===render_content===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$content = $component-&amp;gt;render_content( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the DOM for the content of this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_help --&amp;gt;&lt;br /&gt;
===has_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $component-&amp;gt;has_help()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this component has help available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_fields_handled --&amp;gt;&lt;br /&gt;
===get_fields_handled===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@field_ids = $component-&amp;gt;get_fields_handled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns an array of the names of the metadata fields which this field handles. Used for jumps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10828</id>
		<title>API:EPrints/Plugin/InputForm/Component</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10828"/>
		<updated>2013-07-29T12:45:07Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/InputForm/Component.pm|package_name=EPrints::Plugin::InputForm::Component}}[[Category:API|COMPONENT]][[Category:API:EPrints/Plugin/InputForm|COMPONENT]][[Category:API:EPrints/Plugin/InputForm/Component|COMPONENT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Plugin::InputForm::Component''' - A single form component &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
A component is an HTML widget for use in a [[API:EPrints/Workflow/Stage|EPrints::Workflow::Stage]]. A [[API:EPrints/Plugin/InputForm/Component/Field|EPrints::Plugin::InputForm::Component::Field]] component renders the form inputs for a [[API:EPrints/MetaField|EPrints::MetaField]] but component subclasses can be used to provide any required behaviour around user input. Components don't even have to be form inputs e.g. just render a fragment of XHTML.&lt;br /&gt;
&lt;br /&gt;
Where components are shown and configuration are controlled through the EPrints XML workflow. The workflow reads the component type, loads the referenced plugin and passes the XML node to [[API:EPrints/Plugin/InputForm/Component#parse_config|parse_config]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;component type=&amp;quot;Upload&amp;quot; show_help=&amp;quot;always&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this instance the [[API:EPrints/Plugin/InputForm/Component/Upload|EPrints::Plugin::InputForm::Component::Upload]] component is being inserted into the workflow and its help is being set to always be shown.&lt;br /&gt;
&lt;br /&gt;
Components share many of the features seen in [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]]s. The [[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]] method is called from the Screen's [[API:EPrints/Plugin/InputForm/Component#from|from]] stage and the component [[API:EPrints/Plugin/InputForm/Component#render|render]]s a fragment of XHTML that is inserted into the resulting page. Components have no equivalent to &amp;lt;code&amp;gt;EPrints::Plugin::Screen/can_be_viewed&amp;lt;/code&amp;gt; - it is assumed that the workflow only exposes inputs to which the user has access.&lt;br /&gt;
&lt;br /&gt;
A component will be created twice during a workflow response: to process the incoming data ([[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]]) and to generate the new page ([[API:EPrints/Plugin/InputForm/Component#render|render]]). Therefore you can not rely on data persisting between the update and rendering stages, unless you store the data in the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]].&lt;br /&gt;
&lt;br /&gt;
Buttons in components are classed as &amp;quot;internal actions&amp;quot;. Internal actions do not normally change the response workflow but only how the component renders. This is used to provide search features, provide more button inputs etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_ajax_support --&amp;gt;&lt;br /&gt;
===AJAX Support===&lt;br /&gt;
Some components support AJAX-like incremental updates. The Javascript Component class can make requests aimed at a Component by specifying the &amp;lt;code&amp;gt;component=cXX&amp;lt;/code&amp;gt; CGI parameter and it is then up to the component what it renders.&lt;br /&gt;
&lt;br /&gt;
The default behaviour is to render the XHTML fragment represented by the component, which is used by Javascript as an in-place replament. Elsewhere a JSON response is used to drive client-side behaviour.&lt;br /&gt;
&lt;br /&gt;
Similarly to [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]], AJAX components have a life-cycle of:&lt;br /&gt;
&lt;br /&gt;
* 1. update_from_form() reads form values and sets them on the object&lt;br /&gt;
* 2. wishes_to_export() determines if this component is exporting&lt;br /&gt;
* 3. export() generates a response&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Component/Documents|EPrints::Plugin::InputForm::Component::Documents]], which uses a JSON response to determine the documents to update.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component = EPrints::Plugin::InputForm::Component-&amp;gt;new( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new component object with following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  session - session object&lt;br /&gt;
  collapse - whether the component starts collapsed&lt;br /&gt;
  no_help - hide field help&lt;br /&gt;
  no_toggle - hide help toggle button&lt;br /&gt;
  surround - surround class, defaults to 'Default'&lt;br /&gt;
  prefix - prefix for the component id&lt;br /&gt;
  dataobj - object the field is being rendered for&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Surround/Default|EPrints::Plugin::InputForm::Surround::Default]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parse_config --&amp;gt;&lt;br /&gt;
===parse_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;parse_config( $config_dom )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Parses the supplied DOM object and populates $component configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_required --&amp;gt;&lt;br /&gt;
===is_required===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_required()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is required to be completed before the workflow may proceed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_surround --&amp;gt;&lt;br /&gt;
===get_surround===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$surround = $component-&amp;gt;get_surround()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns the surround for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_collapsed --&amp;gt;&lt;br /&gt;
===is_collapsed===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_collapsed()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is to be rendered in a compact form (for example, just title / required / help).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_help --&amp;gt;&lt;br /&gt;
===render_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$help = $component-&amp;gt;render_help( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns DOM containing the help text for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_name --&amp;gt;&lt;br /&gt;
===get_name===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$name = $component-&amp;gt;get_name()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the unique name of this field (for prefixes, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_wishes_to_export --&amp;gt;&lt;br /&gt;
===wishes_to_export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;wishes_to_export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#wishes_to_export|EPrints::Plugin::Screen/wishes_to_export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export_mimetype --&amp;gt;&lt;br /&gt;
===export_mimetype===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$mime_type = $component-&amp;gt;export_mimetype&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export_mimetype|EPrints::Plugin::Screen/export_mimetype]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component-&amp;gt;export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export|EPrints::Plugin::Screen/export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $component-&amp;gt;render&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Renders the component in its surround.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_title --&amp;gt;&lt;br /&gt;
===render_title===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$title = $component-&amp;gt;render_title( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the title of this component as a DOM object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_content --&amp;gt;&lt;br /&gt;
===render_content===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$content = $component-&amp;gt;render_content( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the DOM for the content of this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_help --&amp;gt;&lt;br /&gt;
===has_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $component-&amp;gt;has_help()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this component has help available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_fields_handled --&amp;gt;&lt;br /&gt;
===get_fields_handled===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@field_ids = $component-&amp;gt;get_fields_handled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns an array of the names of the metadata fields which this field handles. Used for jumps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10827</id>
		<title>API:EPrints/Plugin/InputForm/Component</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/InputForm/Component&amp;diff=10827"/>
		<updated>2013-07-29T12:42:54Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/InputForm/Component.pm|package_name=EPrints::Plugin::InputForm::Component}}[[Category:API|COMPONENT]][[Category:API:EPrints/Plugin/InputForm|COMPONENT]][[Category:API:EPrints/Plugin/InputForm/Component|COMPONENT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Plugin::InputForm::Component''' - A single form component &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
A component is an HTML widget for use in a [[API:EPrints/Workflow/Stage|EPrints::Workflow::Stage]]. A [[API:EPrints/Plugin/InputForm/Component/Field|EPrints::Plugin::InputForm::Component::Field]] component renders the form inputs for a [[API:EPrints/MetaField|EPrints::MetaField]] but component subclasses can be used to provide any required behaviour around user input. Components don't even have to be form inputs e.g. just render a fragment of XHTML.&lt;br /&gt;
&lt;br /&gt;
Where components are shown and configuration are controlled through the EPrints XML workflow. The workflow reads the component type, loads the referenced plugin and passes the XML node to [[API:EPrints/Plugin/InputForm/Component#parse_config|parse_config]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;component type=&amp;quot;Upload&amp;quot; show_help=&amp;quot;always&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this instance the [[API:EPrints/Plugin/InputForm/Component/Upload|EPrints::Plugin::InputForm::Component::Upload]] component is being inserted into the workflow and its help is being set to always be shown.&lt;br /&gt;
&lt;br /&gt;
Components share many of the features seen in [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]]s. The [[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]] method is called from the Screen's [[API:EPrints/Plugin/InputForm/Component#from|from]] stage and the component renders a fragment of XHTML that is inserted into the resulting page. Components have no equivalent to &amp;lt;code&amp;gt;can_be_viewed()&amp;lt;/code&amp;gt; - it is assumed that the workflow only exposes inputs to which the user has access.&lt;br /&gt;
&lt;br /&gt;
A component will be created twice during a workflow response: to process the incoming data ([[API:EPrints/Plugin/InputForm/Component#update_from_form|update_from_form]]) and to generate the new page ([[API:EPrints/Plugin/InputForm/Component#render|render]]). Therefore you can not rely on data persisting between the update and rendering stages, unless you store the data in the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]].&lt;br /&gt;
&lt;br /&gt;
Buttons in components are classed as &amp;quot;internal actions&amp;quot;. Internal actions do not normally change the response workflow but only how the component renders. This is used to provide search features, provide more button inputs etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_ajax_support --&amp;gt;&lt;br /&gt;
===AJAX Support===&lt;br /&gt;
Some components support AJAX-like incremental updates. The Javascript Component class can make requests aimed at a Component by specifying the &amp;lt;code&amp;gt;component=cXX&amp;lt;/code&amp;gt; CGI parameter and it is then up to the component what it renders.&lt;br /&gt;
&lt;br /&gt;
The default behaviour is to render the XHTML fragment represented by the component, which is used by Javascript as an in-place replament. Elsewhere a JSON response is used to drive client-side behaviour.&lt;br /&gt;
&lt;br /&gt;
Similarly to [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]], AJAX components have a life-cycle of:&lt;br /&gt;
&lt;br /&gt;
* 1. update_from_form() reads form values and sets them on the object&lt;br /&gt;
* 2. wishes_to_export() determines if this component is exporting&lt;br /&gt;
* 3. export() generates a response&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Component/Documents|EPrints::Plugin::InputForm::Component::Documents]], which uses a JSON response to determine the documents to update.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component = EPrints::Plugin::InputForm::Component-&amp;gt;new( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new component object with following parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  session - session object&lt;br /&gt;
  collapse - whether the component starts collapsed&lt;br /&gt;
  no_help - hide field help&lt;br /&gt;
  no_toggle - hide help toggle button&lt;br /&gt;
  surround - surround class, defaults to 'Default'&lt;br /&gt;
  prefix - prefix for the component id&lt;br /&gt;
  dataobj - object the field is being rendered for&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[API:EPrints/Plugin/InputForm/Surround/Default|EPrints::Plugin::InputForm::Surround::Default]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parse_config --&amp;gt;&lt;br /&gt;
===parse_config===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;parse_config( $config_dom )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Parses the supplied DOM object and populates $component configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_required --&amp;gt;&lt;br /&gt;
===is_required===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_required()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is required to be completed before the workflow may proceed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_surround --&amp;gt;&lt;br /&gt;
===get_surround===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$surround = $component-&amp;gt;get_surround()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns the surround for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_collapsed --&amp;gt;&lt;br /&gt;
===is_collapsed===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;is_collapsed()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
returns true if this component is to be rendered in a compact form (for example, just title / required / help).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_help --&amp;gt;&lt;br /&gt;
===render_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$help = $component-&amp;gt;render_help( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns DOM containing the help text for this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_name --&amp;gt;&lt;br /&gt;
===get_name===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$name = $component-&amp;gt;get_name()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the unique name of this field (for prefixes, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_wishes_to_export --&amp;gt;&lt;br /&gt;
===wishes_to_export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $component-&amp;gt;wishes_to_export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#wishes_to_export|EPrints::Plugin::Screen/wishes_to_export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export_mimetype --&amp;gt;&lt;br /&gt;
===export_mimetype===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$mime_type = $component-&amp;gt;export_mimetype&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export_mimetype|EPrints::Plugin::Screen/export_mimetype]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$component-&amp;gt;export&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See [[API:EPrints/Plugin/Screen#export|EPrints::Plugin::Screen/export]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $component-&amp;gt;render&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Renders the component in its surround.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_title --&amp;gt;&lt;br /&gt;
===render_title===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$title = $component-&amp;gt;render_title( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the title of this component as a DOM object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_content --&amp;gt;&lt;br /&gt;
===render_content===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$content = $component-&amp;gt;render_content( $surround )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the DOM for the content of this component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_help --&amp;gt;&lt;br /&gt;
===has_help===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $component-&amp;gt;has_help()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this component has help available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_fields_handled --&amp;gt;&lt;br /&gt;
===get_fields_handled===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@field_ids = $component-&amp;gt;get_fields_handled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns an array of the names of the metadata fields which this field handles. Used for jumps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10826</id>
		<title>API:EPrints/Plugin/Screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10826"/>
		<updated>2013-07-29T09:47:22Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Screen.pm|package_name=EPrints::Plugin::Screen}}[[Category:API|SCREEN]][[Category:API:EPrints/Plugin|SCREEN]][[Category:API:EPrints/Plugin/Screen|SCREEN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Screen - dynamic user interface web pages&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Screen plugins provide the CGI user interface to EPrints. Only &amp;quot;static&amp;quot; pages (summary pages, browse views) are not rendered via screens.&lt;br /&gt;
&lt;br /&gt;
Screens generate elements of the page that are then rendered using the [[API:EPrints/Apache/Template|EPrints::Apache::Template]]. These elements include the page title, header elements and page body. Screens can also '''export''' (depending on [[API:EPrints/Plugin/Screen#wishes_to_export|wishes_to_export]]) which allows complete control over the HTTP response.&lt;br /&gt;
&lt;br /&gt;
Most screens have an interactive element that follow this pattern:&lt;br /&gt;
&lt;br /&gt;
first request ...&lt;br /&gt;
&lt;br /&gt;
* 1. can_be_viewed() grants access&lt;br /&gt;
* 2. properties_from() sets up the response&lt;br /&gt;
* 3. render() includes a form with an action&lt;br /&gt;
second request ...&lt;br /&gt;
&lt;br /&gt;
* 4. properties_from() sets up the response&lt;br /&gt;
* 5. from() identifies the action&lt;br /&gt;
* 6. allow_*() checks access to the specific action&lt;br /&gt;
* 7. action_*() method performs the (probably) side-effecting action&lt;br /&gt;
* 8. redirect_to_me_url() redirects the user back to ...&lt;br /&gt;
third request ... back to step 1.&lt;br /&gt;
&lt;br /&gt;
The exception to this is where [[API:EPrints/Plugin/Screen#redirect_to_me_url|redirect_to_me_url]] is sub-classed to return undef, in which case the screen is expected to render in addition to processing the form request.&lt;br /&gt;
&lt;br /&gt;
The reason for using a redirect is that the user will end up on a page that can be reloaded without re-submitting the form. This is particularly important where submitting the action twice may result in an error, for example when deleting an object (can't delete twice!). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parameters --&amp;gt;&lt;br /&gt;
==PARAMETERS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_action_icon --&amp;gt;&lt;br /&gt;
===action_icon===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $self-&amp;amp;gt;{action_icon} = {&lt;br /&gt;
    move_archive =&amp;amp;gt; &amp;quot;action_approve.png&amp;quot;,&lt;br /&gt;
    review_move_archive =&amp;amp;gt; &amp;quot;action_approve.png&amp;quot;,&lt;br /&gt;
  };&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use an icon instead of a button for the given actions. The image name is relative to ''style/images/''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_actions --&amp;gt;&lt;br /&gt;
===actions===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $self-&amp;amp;gt;{actions} = [qw( clear update cancel )];&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A list of actions that are supported by this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_appears --&amp;gt;&lt;br /&gt;
===appears===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $self-&amp;amp;gt;{appears} = [&lt;br /&gt;
    place =&amp;amp;gt; &amp;quot;eprint_summary_page_actions&amp;quot;,&lt;br /&gt;
    position =&amp;amp;gt; 100,&lt;br /&gt;
  ];&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Controls where links/buttons to this plugin will appear.&lt;br /&gt;
&lt;br /&gt;
* place&lt;br /&gt;
: The string-constant name of the list to appear in. Other plugins will refer to this via the [[API:EPrints/Plugin/Screen#list_items|list_items]] and related methods.&lt;br /&gt;
&lt;br /&gt;
* position&lt;br /&gt;
: The relative position in the list to appear at. Higher means later in the list.&lt;br /&gt;
&lt;br /&gt;
* action&lt;br /&gt;
: The optional action that this button will trigger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_icon --&amp;gt;&lt;br /&gt;
===icon===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $self-&amp;amp;gt;{icon} = &amp;quot;action_view.png&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use an icon instead of a button for links to this screen. The image name is relative to ''style/images/''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_properties_from --&amp;gt;&lt;br /&gt;
===properties_from===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$screen-&amp;gt;properties_from()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Called by the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]] very early in the response process.&lt;br /&gt;
&lt;br /&gt;
This method should be used to set up the response by, for example getting CGI query parameters and storing them in the processor object.&lt;br /&gt;
&lt;br /&gt;
Because this method is called '''before''' [[API:EPrints/Plugin/Screen#can_be_viewed|can_be_viewed]] no changes to the system should be made here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_redirect_to_me_url --&amp;gt;&lt;br /&gt;
===redirect_to_me_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $screen-&amp;gt;redirect_to_me_url()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the request is a POST the screen is given an opportunity to redirect the user, avoiding double-POSTs if the user reloads the resulting page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render the page body.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_links --&amp;gt;&lt;br /&gt;
===render_links===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_links()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render any elements for the page &amp;amp;lt;head&amp;amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_hidden_bits --&amp;gt;&lt;br /&gt;
===hidden_bits===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@params = $screen-&amp;gt;hidden_bits()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a key-value list of values that must be set when referring to this screen.&lt;br /&gt;
&lt;br /&gt;
At the top-level this is just the 'screen' id.&lt;br /&gt;
&lt;br /&gt;
Historically render_hidden_bits() - which built up a set of hidden inputs in XHTML - was used but this had the downside of not being usable with GET requests. Screen plugins now have a mix of approaches, so care is needed when sub-classing &amp;lt;code&amp;gt;hidden_bits&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_wishes_to_export --&amp;gt;&lt;br /&gt;
===wishes_to_export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $screen-&amp;gt;wishes_to_export()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If true, instead of calling the render* methods the export* methods will be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$screen-&amp;gt;export()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Called when [[API:EPrints/Plugin/Screen#wishes_to_export|wishes_to_export]] is true.&lt;br /&gt;
&lt;br /&gt;
This method should generate an HTTP response directly (e.g. by printing to STDOUT).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export_mimetype --&amp;gt;&lt;br /&gt;
===export_mimetype===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$mime_type = $screen-&amp;gt;export_mimetype()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the MIME type of the HTTP response (as will be generated by [[API:EPrints/Plugin/Screen#export|export]]).&lt;br /&gt;
&lt;br /&gt;
Default is to use &amp;quot;text/plain&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_form --&amp;gt;&lt;br /&gt;
===render_form===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_form( [ METHOD [, ACTION ] ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render an XHTML form that will call this screen. If the METHOD is POST will apply cross-site request forgery protection.&lt;br /&gt;
&lt;br /&gt;
Unless you have a good reason not to you should always use render_form() to add forms to your HTTP response, which ensures the correct context and request protections are in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_verify_csrf --&amp;gt;&lt;br /&gt;
===verify_csrf===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;verify_csrf()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Verify that the CSRF token in the user agent's cookie matches the token passed in the form value.&lt;br /&gt;
&lt;br /&gt;
If the CSRF check fails no action should be taken as this may be an attempt to forge a request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_title --&amp;gt;&lt;br /&gt;
===render_title===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_title&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render the page title.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_list_items --&amp;gt;&lt;br /&gt;
===list_items===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@screen_opts = $screen-&amp;gt;list_items( $list_id, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of screens that appear in list $list_id ordered by their position.&lt;br /&gt;
&lt;br /&gt;
Each screen opt is a hash ref of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  screen - screen plugin&lt;br /&gt;
  screen_id - screen id&lt;br /&gt;
  position - position (positive integer)&lt;br /&gt;
  action - the action, if this plugin is for an action list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Incoming opts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  filter =&amp;amp;gt; 1 or 0 (default 1)&lt;br /&gt;
  params =&amp;amp;gt; {}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_action --&amp;gt;&lt;br /&gt;
===has_action===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;has_action( $action_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this screen has an action $action_id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_action_icon_url --&amp;gt;&lt;br /&gt;
===action_icon_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $screen-&amp;gt;action_icon_url( $action )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the relative URL to the $action icon for this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_action_link --&amp;gt;&lt;br /&gt;
===render_action_link===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$frag = $screen-&amp;gt;render_action_link()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a link to this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10825</id>
		<title>API:EPrints/Plugin/Screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10825"/>
		<updated>2013-07-25T16:17:58Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Screen.pm|package_name=EPrints::Plugin::Screen}}[[Category:API|SCREEN]][[Category:API:EPrints/Plugin|SCREEN]][[Category:API:EPrints/Plugin/Screen|SCREEN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Screen - dynamic user interface web pages&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Screen plugins provide the CGI user interface to EPrints. Only &amp;quot;static&amp;quot; pages (summary pages, browse views) are not rendered via screens.&lt;br /&gt;
&lt;br /&gt;
Screens generate elements of the page that are then rendered using the [[API:EPrints/Apache/Template|EPrints::Apache::Template]]. These elements include the page title, header elements and page body. Screens can also '''export''' (depending on [[API:EPrints/Plugin/Screen#wishes_to_export|wishes_to_export]]) which allows complete control over the HTTP response.&lt;br /&gt;
&lt;br /&gt;
Most screens have an interactive element that follow this pattern:&lt;br /&gt;
&lt;br /&gt;
first request ...&lt;br /&gt;
&lt;br /&gt;
* 1. can_be_viewed() grants access&lt;br /&gt;
* 2. properties_from() sets up the response&lt;br /&gt;
* 3. render() includes a form with an action&lt;br /&gt;
second request ...&lt;br /&gt;
&lt;br /&gt;
* 4. properties_from() sets up the response&lt;br /&gt;
* 5. from() identifies the action&lt;br /&gt;
* 6. allow_*() checks access to the specific action&lt;br /&gt;
* 7. action_*() method performs the (probably) side-effecting action&lt;br /&gt;
* 8. redirect_to_me_url() redirects the user back to ...&lt;br /&gt;
third request ... back to step 1.&lt;br /&gt;
&lt;br /&gt;
The exception to this is where [[API:EPrints/Plugin/Screen#redirect_to_me_url|redirect_to_me_url]] is sub-classed to return undef, in which case the screen is expected to render in addition to processing the form request.&lt;br /&gt;
&lt;br /&gt;
The reason for using a redirect is that the user will end up on a page that can be reloaded without re-submitting the form. This is particularly important where submitting the action twice may result in an error, for example when deleting an object (can't delete twice!). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_properties_from --&amp;gt;&lt;br /&gt;
===properties_from===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$screen-&amp;gt;properties_from()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Called by the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]] very early in the response process.&lt;br /&gt;
&lt;br /&gt;
This method should be used to set up the response by, for example getting CGI query parameters and storing them in the processor object.&lt;br /&gt;
&lt;br /&gt;
Because this method is called '''before''' [[API:EPrints/Plugin/Screen#can_be_viewed|can_be_viewed]] no changes to the system should be made here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_redirect_to_me_url --&amp;gt;&lt;br /&gt;
===redirect_to_me_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $screen-&amp;gt;redirect_to_me_url()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the request is a POST the screen is given an opportunity to redirect the user, avoiding double-POSTs if the user reloads the resulting page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render the page body.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_links --&amp;gt;&lt;br /&gt;
===render_links===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_links()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render any elements for the page &amp;amp;lt;head&amp;amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_hidden_bits --&amp;gt;&lt;br /&gt;
===hidden_bits===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@params = $screen-&amp;gt;hidden_bits()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a key-value list of values that must be set when referring to this screen.&lt;br /&gt;
&lt;br /&gt;
At the top-level this is just the 'screen' id.&lt;br /&gt;
&lt;br /&gt;
Historically render_hidden_bits() - which built up a set of hidden inputs in XHTML - was used but this had the downside of not being usable with GET requests. Screen plugins now have a mix of approaches, so care is needed when sub-classing &amp;lt;code&amp;gt;hidden_bits&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_wishes_to_export --&amp;gt;&lt;br /&gt;
===wishes_to_export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $screen-&amp;gt;wishes_to_export()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If true, instead of calling the render* methods the export* methods will be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$screen-&amp;gt;export()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Called when [[API:EPrints/Plugin/Screen#wishes_to_export|wishes_to_export]] is true.&lt;br /&gt;
&lt;br /&gt;
This method should generate an HTTP response directly (e.g. by printing to STDOUT).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export_mimetype --&amp;gt;&lt;br /&gt;
===export_mimetype===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$mime_type = $screen-&amp;gt;export_mimetype()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the MIME type of the HTTP response (as will be generated by [[API:EPrints/Plugin/Screen#export|export]]).&lt;br /&gt;
&lt;br /&gt;
Default is to use &amp;quot;text/plain&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_form --&amp;gt;&lt;br /&gt;
===render_form===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_form( [ METHOD [, ACTION ] ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render an XHTML form that will call this screen. If the METHOD is POST will apply cross-site request forgery protection.&lt;br /&gt;
&lt;br /&gt;
Unless you have a good reason not to you should always use render_form() to add forms to your HTTP response, which ensures the correct context and request protections are in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_verify_csrf --&amp;gt;&lt;br /&gt;
===verify_csrf===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;verify_csrf()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Verify that the CSRF token in the user agent's cookie matches the token passed in the form value.&lt;br /&gt;
&lt;br /&gt;
If the CSRF check fails no action should be taken as this may be an attempt to forge a request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_title --&amp;gt;&lt;br /&gt;
===render_title===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $screen-&amp;gt;render_title&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render the page title.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_list_items --&amp;gt;&lt;br /&gt;
===list_items===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@screen_opts = $screen-&amp;gt;list_items( $list_id, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of screens that appear in list $list_id ordered by their position.&lt;br /&gt;
&lt;br /&gt;
Each screen opt is a hash ref of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  screen - screen plugin&lt;br /&gt;
  screen_id - screen id&lt;br /&gt;
  position - position (positive integer)&lt;br /&gt;
  action - the action, if this plugin is for an action list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Incoming opts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  filter =&amp;amp;gt; 1 or 0 (default 1)&lt;br /&gt;
  params =&amp;amp;gt; {}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_action --&amp;gt;&lt;br /&gt;
===has_action===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;has_action( $action_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this screen has an action $action_id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_action_icon_url --&amp;gt;&lt;br /&gt;
===action_icon_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $screen-&amp;gt;action_icon_url( $action )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the relative URL to the $action icon for this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_action_link --&amp;gt;&lt;br /&gt;
===render_action_link===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$frag = $screen-&amp;gt;render_action_link()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a link to this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10824</id>
		<title>API:EPrints/Plugin/Screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10824"/>
		<updated>2013-07-25T15:57:59Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Screen.pm|package_name=EPrints::Plugin::Screen}}[[Category:API|SCREEN]][[Category:API:EPrints/Plugin|SCREEN]][[Category:API:EPrints/Plugin/Screen|SCREEN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Screen - dynamic user interface web pages&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Screen plugins provide the CGI user interface to EPrints. Only &amp;quot;static&amp;quot; pages (summary pages, browse views) are not rendered via screens.&lt;br /&gt;
&lt;br /&gt;
Screens generate elements of the page that are then rendered using the [[API:EPrints/Apache/Template|EPrints::Apache::Template]]. This includes the page title, header elements and page body.&lt;br /&gt;
&lt;br /&gt;
Most screens have an interactive element that follow this pattern:&lt;br /&gt;
&lt;br /&gt;
first request ...&lt;br /&gt;
&lt;br /&gt;
* 1. can_be_viewed() grants access&lt;br /&gt;
* 2. properties_from() sets up the response&lt;br /&gt;
* 3. render() includes a form with an action&lt;br /&gt;
second request ...&lt;br /&gt;
&lt;br /&gt;
* 4. properties_from() sets up the response&lt;br /&gt;
* 5. from() identifies the action&lt;br /&gt;
* 6. allow_*() checks access to the specific action&lt;br /&gt;
* 7. action_*() method performs the (probably) side-effecting action&lt;br /&gt;
* 8. redirect_to_me_url() redirects the user back to ...&lt;br /&gt;
third request ... back to step 1.&lt;br /&gt;
&lt;br /&gt;
Given the server-client nature of Web pages a user interaction will occur over several requests. This can either be in two or three steps in a Screen, depending on whether server-side state is changed. Its important to note, especially for three-step, that any state information needed for the screen to render needs to be persisted in the form submission and the resulting redirect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_two_requests --&amp;gt;&lt;br /&gt;
===Two Requests===&lt;br /&gt;
The screen renders a link or GET-method form. When the user follows the link or submits the form the screen renders something different but does not change the state of an object on the server. i.e. if the user were to reload the page they would receive the same response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_three_requests --&amp;gt;&lt;br /&gt;
===Three Requests===&lt;br /&gt;
The screen renders a POST-method form. When the user submits the form the screen makes a change to an object on the server and then returns a '''redirect''' back to the user. The browser requests the new location and the screen renders the new state.&lt;br /&gt;
&lt;br /&gt;
The redirect turns the request from a POST into a GET, which implicitly allows the user to reload the page without causing the change to happen again. This is important where, for example a user might be deleting an object. Attempting to re-submit the form would result in an error.&lt;br /&gt;
&lt;br /&gt;
Some screens override this behaviour and instead will render in response to a POST request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_hidden_bits --&amp;gt;&lt;br /&gt;
===hidden_bits===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@params = $screen-&amp;gt;hidden_bits()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a key-value list of values that must be set when referring to this screen.&lt;br /&gt;
&lt;br /&gt;
At the top-level this is just the 'screen' id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_verify_csrf --&amp;gt;&lt;br /&gt;
===verify_csrf===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;verify_csrf()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Verify that the CSRF token in the user agent's cookie matches the token passed in the form value.&lt;br /&gt;
&lt;br /&gt;
If the CSRF check fails no action should be taken as this may be an attempt to forge a request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_list_items --&amp;gt;&lt;br /&gt;
===list_items===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@screen_opts = $screen-&amp;gt;list_items( $list_id, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of screens that appear in list $list_id ordered by their position.&lt;br /&gt;
&lt;br /&gt;
Each screen opt is a hash ref of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  screen - screen plugin&lt;br /&gt;
  screen_id - screen id&lt;br /&gt;
  position - position (positive integer)&lt;br /&gt;
  action - the action, if this plugin is for an action list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Incoming opts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  filter =&amp;amp;gt; 1 or 0 (default 1)&lt;br /&gt;
  params =&amp;amp;gt; {}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_action --&amp;gt;&lt;br /&gt;
===has_action===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $screen-&amp;gt;has_action( $action_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this screen has an action $action_id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_action_icon_url --&amp;gt;&lt;br /&gt;
===action_icon_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $screen-&amp;gt;action_icon_url( $action )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the relative URL to the $action icon for this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_action_link --&amp;gt;&lt;br /&gt;
===render_action_link===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$frag = $screen-&amp;gt;render_action_link()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a link to this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10823</id>
		<title>API:EPrints/Plugin/Screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Screen&amp;diff=10823"/>
		<updated>2013-07-25T15:26:56Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Screen.pm|package_name=EPrints::Plugin::Screen}}[[Category:API|SCREEN]][[Category:API:EPrints/Plugin|SCREEN]][[Category:API:EPrints/Plugin/Screen|SCREEN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Screen&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
 @params = $screen-&amp;amp;gt;hidden_bits()&lt;br /&gt;
Returns a key-value list of values that must be set when referring to this screen.&lt;br /&gt;
&lt;br /&gt;
At the top-level this is just the 'screen' id.&lt;br /&gt;
&lt;br /&gt;
 $ok = $screen-&amp;amp;gt;verify_csrf()&lt;br /&gt;
Verify that the CSRF token in the user agent's cookie matches the token passed in the form value.&lt;br /&gt;
&lt;br /&gt;
If the CSRF check fails no action should be taken as this may be an attempt to forge a request.&lt;br /&gt;
&lt;br /&gt;
 @screen_opts = $screen-&amp;amp;gt;list_items( $list_id, %opts )&lt;br /&gt;
Returns a list of screens that appear in list $list_id ordered by their position.&lt;br /&gt;
&lt;br /&gt;
Each screen opt is a hash ref of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  screen - screen plugin&lt;br /&gt;
  screen_id - screen id&lt;br /&gt;
  position - position (positive integer)&lt;br /&gt;
  action - the action, if this plugin is for an action list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Incoming opts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  filter =&amp;amp;gt; 1 or 0 (default 1)&lt;br /&gt;
  params =&amp;amp;gt; {}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $ok = $screen-&amp;amp;gt;has_action( $action_id )&lt;br /&gt;
Returns true if this screen has an action $action_id.&lt;br /&gt;
&lt;br /&gt;
 $url = $screen-&amp;amp;gt;action_icon_url( $action )&lt;br /&gt;
Returns the relative URL to the $action icon for this screen.&lt;br /&gt;
&lt;br /&gt;
 $frag = $screen-&amp;amp;gt;render_action_link()&lt;br /&gt;
Returns a link to this screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Storage&amp;diff=10822</id>
		<title>API:EPrints/Plugin/Storage</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Storage&amp;diff=10822"/>
		<updated>2013-07-25T13:47:03Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Storage.pm|package_name=EPrints::Plugin::Storage}}[[Category:API|STORAGE]][[Category:API:EPrints/Plugin|STORAGE]][[Category:API:EPrints/Plugin/Storage|STORAGE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Storage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$plugin = $repo-&amp;gt;plugin('Storage::Local');&lt;br /&gt;
$plugin-&amp;gt;open_write($fileobj) or die;&lt;br /&gt;
$plugin-&amp;gt;write('Hello, World!');&lt;br /&gt;
$plugin-&amp;gt;close_write() or die;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
See [[API:EPrints/Storage|EPrints::Storage]] for information on using the storage layer.&lt;br /&gt;
&lt;br /&gt;
You shouldn't need to use a storage plugin directly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_store --&amp;gt;&lt;br /&gt;
===store===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$sourceid = $store-&amp;gt;store( $fileobj, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Store an object using data from CALLBACK.&lt;br /&gt;
&lt;br /&gt;
If successful returns the source id used to retrieve this object.&lt;br /&gt;
&lt;br /&gt;
Returns undef on error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_retrieve --&amp;gt;&lt;br /&gt;
===retrieve===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;retrieve( $fileobj, $sourceid, $offset, $len, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve $n bytes of data starting at $offset from the data stored for $fileobj identified by $sourceid.&lt;br /&gt;
&lt;br /&gt;
CALLBACK = $rc = &amp;amp;amp;f( BYTES )&lt;br /&gt;
&lt;br /&gt;
Note: this API may change in future to reflect the open_write/write/close_write mechanism.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;delete( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete the object stored for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_local_copy --&amp;gt;&lt;br /&gt;
===get_local_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = $store-&amp;gt;get_local_copy( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object).&lt;br /&gt;
&lt;br /&gt;
Returns undef if no local copy is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_remote_copy --&amp;gt;&lt;br /&gt;
===get_remote_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $store-&amp;gt;get_remote_copy( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns an alternative URL for this file (must be publicly accessible).&lt;br /&gt;
&lt;br /&gt;
Returns undef if no such copy is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_open_write --&amp;gt;&lt;br /&gt;
===open_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;open_write( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Initialise a new write based on $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write --&amp;gt;&lt;br /&gt;
===write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;write( $fileobj, $buffer )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write $buffer. Will croak if $fileobj was not previously opened for writing with open_write().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_close_write --&amp;gt;&lt;br /&gt;
===close_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$sourceid = $store-&amp;gt;close_write( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Finish writing to $fileobj. Returns the sourceid or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Storage&amp;diff=10821</id>
		<title>API:EPrints/Plugin/Storage</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Storage&amp;diff=10821"/>
		<updated>2013-07-25T13:42:41Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Storage.pm|package_name=EPrints::Plugin::Storage}}[[Category:API|STORAGE]][[Category:API:EPrints/Plugin|STORAGE]][[Category:API:EPrints/Plugin/Storage|STORAGE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Storage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$plugin = $repo-&amp;gt;plugin('Storage::Local');&lt;br /&gt;
$plugin-&amp;gt;open_write($fileobj) or die;&lt;br /&gt;
$plugin-&amp;gt;write('Hello, World!');&lt;br /&gt;
$plugin-&amp;gt;close_write() or die;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
See [[API:EPrints/Storage|EPrints::Storage]] for information on using the storage layer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_store --&amp;gt;&lt;br /&gt;
===store===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$sourceid = $store-&amp;gt;store( $fileobj, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Store an object using data from CALLBACK.&lt;br /&gt;
&lt;br /&gt;
If successful returns the source id used to retrieve this object.&lt;br /&gt;
&lt;br /&gt;
Returns undef on error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_retrieve --&amp;gt;&lt;br /&gt;
===retrieve===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;retrieve( $fileobj, $sourceid, $offset, $len, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve $n bytes of data starting at $offset from the data stored for $fileobj identified by $sourceid.&lt;br /&gt;
&lt;br /&gt;
CALLBACK = $rc = &amp;amp;amp;f( BYTES )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;delete( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete the object stored for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_local_copy --&amp;gt;&lt;br /&gt;
===get_local_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = $store-&amp;gt;get_local_copy( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object).&lt;br /&gt;
&lt;br /&gt;
Returns undef if no local copy is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_remote_copy --&amp;gt;&lt;br /&gt;
===get_remote_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $store-&amp;gt;get_remote_copy( $fileobj, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns an alternative URL for this file (must be publicly accessible).&lt;br /&gt;
&lt;br /&gt;
Returns undef if no such copy is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_open_write --&amp;gt;&lt;br /&gt;
===open_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;open_write( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Initialise a new write based on $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write --&amp;gt;&lt;br /&gt;
===write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;write( $fileobj, $buffer )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write $buffer. Will croak if $fileobj was not previously opened for writing with open_write().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_close_write --&amp;gt;&lt;br /&gt;
===close_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$sourceid = $store-&amp;gt;close_write( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Finish writing to $fileobj. Returns the sourceid or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10820</id>
		<title>API:EPrints/DataObj/File</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10820"/>
		<updated>2013-07-25T13:36:02Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/File.pm|package_name=EPrints::DataObj::File}}[[Category:API|FILE]][[Category:API:EPrints/DataObj|FILE]][[Category:API:EPrints/DataObj/File|FILE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::DataObj::File - a stored file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class contains the technical metadata associated with a file. A file is a sequence of bytes stored in the storage layer (a &amp;quot;stored object&amp;quot;). Utility methods for storing and retrieving the stored object from the storage layer are made available.&lt;br /&gt;
&lt;br /&gt;
Revision numbers on File work slightly differently to other objects. A File is only revised when it's stored object is changed and not when changes to it's metadata are made.&lt;br /&gt;
&lt;br /&gt;
This class is a subclass of [[API:EPrints/DataObj/SubObject|EPrints::DataObj::SubObject]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_core_fields --&amp;gt;&lt;br /&gt;
==CORE FIELDS==&lt;br /&gt;
* fileid&lt;br /&gt;
: Unique identifier for this file.&lt;br /&gt;
&lt;br /&gt;
* rev_number (int)&lt;br /&gt;
: The number of the current revision of this file.&lt;br /&gt;
&lt;br /&gt;
* datasetid&lt;br /&gt;
: Id of the dataset of the parent object.&lt;br /&gt;
&lt;br /&gt;
* objectid&lt;br /&gt;
: Id of the parent object.&lt;br /&gt;
&lt;br /&gt;
* filename&lt;br /&gt;
: Name of the file (may contain directory separators).&lt;br /&gt;
&lt;br /&gt;
* mime_type&lt;br /&gt;
: MIME type of the file (e.g. &amp;quot;image/png&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* hash&lt;br /&gt;
: Check sum of the file.&lt;br /&gt;
&lt;br /&gt;
* hash_type&lt;br /&gt;
: Name of check sum algorithm used (e.g. &amp;quot;MD5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* filesize&lt;br /&gt;
: Size of the file in bytes.&lt;br /&gt;
&lt;br /&gt;
* mtime&lt;br /&gt;
: Last modification time of the file.&lt;br /&gt;
&lt;br /&gt;
* url&lt;br /&gt;
: Virtual field for storing the file's URL.&lt;br /&gt;
&lt;br /&gt;
* data&lt;br /&gt;
: Virtual field for storing the file's content.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_constructor_methods --&amp;gt;&lt;br /&gt;
===Constructor Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new_from_filename --&amp;gt;&lt;br /&gt;
===new_from_filename===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;new_from_filename( $session, $dataobj, $filename )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Convenience method to get an existing File object for $filename stored in $dataobj.&lt;br /&gt;
&lt;br /&gt;
Returns undef if no such record exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_from_data --&amp;gt;&lt;br /&gt;
===create_from_data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;create_from_data( $session, $data [, $dataset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new File record using $data.&lt;br /&gt;
&lt;br /&gt;
Private data elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  _content - content to pass to [[API:EPrints/DataObj/File#set_file|set_file]].&lt;br /&gt;
  _filepath - path to source file used for improved mime-type detection&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_class_methods --&amp;gt;&lt;br /&gt;
===Class Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$thing = EPrints::DataObj::File-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Core fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::File-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_object_methods --&amp;gt;&lt;br /&gt;
===Object Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clone --&amp;gt;&lt;br /&gt;
===clone===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$new_file = $file-&amp;gt;clone( $parent )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Clone the $file object (including contained files) and return the new object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove --&amp;gt;&lt;br /&gt;
===remove===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $file-&amp;gt;remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete the stored file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_update --&amp;gt;&lt;br /&gt;
===update===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$file-&amp;gt;update( $epdata )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_local_copy --&amp;gt;&lt;br /&gt;
===get_local_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = $file-&amp;gt;get_local_copy()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object).&lt;br /&gt;
&lt;br /&gt;
Will retrieve and cache the remote object if necessary.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_file --&amp;gt;&lt;br /&gt;
===add_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $file-&amp;gt;add_file( $filepath, $filename [, $preserve_path ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read and store the contents of $filepath at $filename.&lt;br /&gt;
&lt;br /&gt;
If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_upload --&amp;gt;&lt;br /&gt;
===upload===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bytes = $file-&amp;gt;upload( $filehandle, $filename, $filesize [, $preserve_path ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read and store the data from $filehandle at $filename at the next revision number.&lt;br /&gt;
&lt;br /&gt;
If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
Returns the number of bytes read from $filehandle or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write_copy --&amp;gt;&lt;br /&gt;
===write_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $stored-&amp;gt;write_copy( $filename )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write a copy of this file to $filename.&lt;br /&gt;
&lt;br /&gt;
Returns true if the written file contains the same number of bytes as the stored file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write_copy_fh --&amp;gt;&lt;br /&gt;
===write_copy_fh===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $stored-&amp;gt;write_copy_fh( $filehandle )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write a copy of this file to $filehandle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_generate_md5 --&amp;gt;&lt;br /&gt;
===generate_md5===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$md5 = $stored-&amp;gt;generate_md5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Calculates and returns the MD5 for this file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_generate_sha --&amp;gt;&lt;br /&gt;
===generate_sha===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$digest = $file-&amp;gt;generate_sha( [ ALGORITHM ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Generate a SHA for this file, see {{API:PodLink|file=Digest/SHA|package_name=Digest::SHA|section=|text=Digest::SHA}} for a list of supported algorithms. Defaults to &amp;quot;256&amp;quot; (SHA-256).&lt;br /&gt;
&lt;br /&gt;
Returns the hex-encoded digest.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_plugin_copy --&amp;gt;&lt;br /&gt;
===add_plugin_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$stored-&amp;gt;add_plugin_copy( $plugin, $sourceid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add a copy of this file stored using $plugin identified by $sourceid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_plugin_copy --&amp;gt;&lt;br /&gt;
===remove_plugin_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$stored-&amp;gt;remove_plugin_copy( $plugin )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove the copy of this file stored using $plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_file --&amp;gt;&lt;br /&gt;
===get_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $stored-&amp;gt;get_file( CALLBACK [, $offset, $n ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Get the contents of the stored file.&lt;br /&gt;
&lt;br /&gt;
$offset is the position in bytes to start reading from, defaults to 0.&lt;br /&gt;
&lt;br /&gt;
$n is the number of bytes to read, defaults to &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
CALLBACK is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;sub {&lt;br /&gt;
	my( $buffer ) = @_;&lt;br /&gt;
&lt;br /&gt;
	print $buffer;&lt;br /&gt;
&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returning 0 from the callback will cause the read to abort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_file --&amp;gt;&lt;br /&gt;
===set_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$content_length = $stored-&amp;gt;set_file( CONTENT, $content_length )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write $content_length bytes from CONTENT to the file object. Updates &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hash&amp;lt;/code&amp;gt; (you must call [[API:EPrints/DataObj/File#commit|commit]]).&lt;br /&gt;
&lt;br /&gt;
Returns $content_length or undef on failure.&lt;br /&gt;
&lt;br /&gt;
If CONTENT has fewer bytes than $content_length the result is undetermined and a warning will be printed.&lt;br /&gt;
&lt;br /&gt;
CONTENT may be any one of:&lt;br /&gt;
&lt;br /&gt;
* CODEREF&lt;br /&gt;
: Will be called until it returns empty string (&amp;quot;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;sub {&lt;br /&gt;
	sysread($fh, my $buffer, 1024);&lt;br /&gt;
	return $buffer;&lt;br /&gt;
};&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SCALARREF&lt;br /&gt;
: A scalar reference to a string of octets that will be written as-is.&lt;br /&gt;
&lt;br /&gt;
* GLOB&lt;br /&gt;
: Will be treated as a file handle and read with sysread() until the eof.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_file_chunk --&amp;gt;&lt;br /&gt;
===set_file_chunk===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$content_length = $file-&amp;gt;set_file_chunk( CONTENT, $content_length, $offset, $total )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write a chunk of data to the content, overwriting or appending to the existing content. See [[API:EPrints/DataObj/File#set_file|set_file]] for CONTENT and $content_length. &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; is updated if $offset + $content_length is greater than the current &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
$offset is the starting point (in bytes) to write. $total is the total file size, used to determine where to store the content.&lt;br /&gt;
&lt;br /&gt;
Returns the number of bytes written or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[API:EPrints/Storage|EPrints::Storage]]&lt;br /&gt;
&lt;br /&gt;
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10819</id>
		<title>API:EPrints/DataObj/File</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10819"/>
		<updated>2013-07-25T13:34:28Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/File.pm|package_name=EPrints::DataObj::File}}[[Category:API|FILE]][[Category:API:EPrints/DataObj|FILE]][[Category:API:EPrints/DataObj/File|FILE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::DataObj::File - a stored file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class contains the technical metadata associated with a file. A file is a sequence of bytes stored in the storage layer (a &amp;quot;stored object&amp;quot;). Utility methods for storing and retrieving the stored object from the storage layer are made available.&lt;br /&gt;
&lt;br /&gt;
Revision numbers on File work slightly differently to other objects. A File is only revised when it's stored object is changed and not when changes to it's metadata are made.&lt;br /&gt;
&lt;br /&gt;
This class is a subclass of [[API:EPrints/DataObj/SubObject|EPrints::DataObj::SubObject]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_core_fields --&amp;gt;&lt;br /&gt;
==CORE FIELDS==&lt;br /&gt;
* fileid&lt;br /&gt;
: Unique identifier for this file.&lt;br /&gt;
&lt;br /&gt;
* rev_number (int)&lt;br /&gt;
: The number of the current revision of this file.&lt;br /&gt;
&lt;br /&gt;
* datasetid&lt;br /&gt;
: Id of the dataset of the parent object.&lt;br /&gt;
&lt;br /&gt;
* objectid&lt;br /&gt;
: Id of the parent object.&lt;br /&gt;
&lt;br /&gt;
* filename&lt;br /&gt;
: Name of the file (may contain directory separators).&lt;br /&gt;
&lt;br /&gt;
* mime_type&lt;br /&gt;
: MIME type of the file (e.g. &amp;quot;image/png&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* hash&lt;br /&gt;
: Check sum of the file.&lt;br /&gt;
&lt;br /&gt;
* hash_type&lt;br /&gt;
: Name of check sum algorithm used (e.g. &amp;quot;MD5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* filesize&lt;br /&gt;
: Size of the file in bytes.&lt;br /&gt;
&lt;br /&gt;
* mtime&lt;br /&gt;
: Last modification time of the file.&lt;br /&gt;
&lt;br /&gt;
* url&lt;br /&gt;
: Virtual field for storing the file's URL.&lt;br /&gt;
&lt;br /&gt;
* data&lt;br /&gt;
: Virtual field for storing the file's content.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_constructor_methods --&amp;gt;&lt;br /&gt;
===Constructor Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new_from_filename --&amp;gt;&lt;br /&gt;
===new_from_filename===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;new_from_filename( $session, $dataobj, $filename )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Convenience method to get an existing File object for $filename stored in $dataobj.&lt;br /&gt;
&lt;br /&gt;
Returns undef if no such record exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_from_data --&amp;gt;&lt;br /&gt;
===create_from_data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;create_from_data( $session, $data [, $dataset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new File record using $data.&lt;br /&gt;
&lt;br /&gt;
Private data elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  _content - content to pass to [[API:EPrints/DataObj/File#set_file|set_file]].&lt;br /&gt;
  _filepath - path to source file used for improved mime-type detection&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_class_methods --&amp;gt;&lt;br /&gt;
===Class Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$thing = EPrints::DataObj::File-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Core fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::File-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_object_methods --&amp;gt;&lt;br /&gt;
===Object Methods===&lt;br /&gt;
* $new_file = $file-&amp;amp;gt;clone( $parent )&lt;br /&gt;
: Clone the $file object (including contained files) and return the new object.&lt;br /&gt;
&lt;br /&gt;
* $success = $file-&amp;amp;gt;remove&lt;br /&gt;
: Delete the stored file.&lt;br /&gt;
&lt;br /&gt;
* $file-&amp;amp;gt;update( $epdata )&lt;br /&gt;
* $filename = $file-&amp;amp;gt;get_local_copy()&lt;br /&gt;
: Return the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object).&lt;br /&gt;
&lt;br /&gt;
: Will retrieve and cache the remote object if necessary.&lt;br /&gt;
&lt;br /&gt;
* $success = $file-&amp;amp;gt;add_file( $filepath, $filename [, $preserve_path ] )&lt;br /&gt;
: Read and store the contents of $filepath at $filename.&lt;br /&gt;
&lt;br /&gt;
: If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
* $bytes = $file-&amp;amp;gt;upload( $filehandle, $filename, $filesize [, $preserve_path ] )&lt;br /&gt;
: Read and store the data from $filehandle at $filename at the next revision number.&lt;br /&gt;
&lt;br /&gt;
: If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
: Returns the number of bytes read from $filehandle or undef on failure.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;write_copy( $filename )&lt;br /&gt;
: Write a copy of this file to $filename.&lt;br /&gt;
&lt;br /&gt;
: Returns true if the written file contains the same number of bytes as the stored file.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;write_copy_fh( $filehandle )&lt;br /&gt;
: Write a copy of this file to $filehandle.&lt;br /&gt;
&lt;br /&gt;
* $md5 = $stored-&amp;amp;gt;generate_md5&lt;br /&gt;
: Calculates and returns the MD5 for this file.&lt;br /&gt;
&lt;br /&gt;
* $digest = $file-&amp;amp;gt;generate_sha( [ ALGORITHM ] )&lt;br /&gt;
: Generate a SHA for this file, see {{API:PodLink|file=Digest/SHA|package_name=Digest::SHA|section=|text=Digest::SHA}} for a list of supported algorithms. Defaults to &amp;quot;256&amp;quot; (SHA-256).&lt;br /&gt;
&lt;br /&gt;
: Returns the hex-encoded digest.&lt;br /&gt;
&lt;br /&gt;
* $stored-&amp;amp;gt;add_plugin_copy( $plugin, $sourceid )&lt;br /&gt;
: Add a copy of this file stored using $plugin identified by $sourceid.&lt;br /&gt;
&lt;br /&gt;
* $stored-&amp;amp;gt;remove_plugin_copy( $plugin )&lt;br /&gt;
: Remove the copy of this file stored using $plugin.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;get_file( CALLBACK [, $offset, $n ] )&lt;br /&gt;
: Get the contents of the stored file.&lt;br /&gt;
&lt;br /&gt;
: $offset is the position in bytes to start reading from, defaults to 0.&lt;br /&gt;
&lt;br /&gt;
: $n is the number of bytes to read, defaults to &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: CALLBACK is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;sub {&lt;br /&gt;
	my( $buffer ) = @_;&lt;br /&gt;
&lt;br /&gt;
	print $buffer;&lt;br /&gt;
&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Returning 0 from the callback will cause the read to abort.&lt;br /&gt;
&lt;br /&gt;
* $content_length = $stored-&amp;amp;gt;set_file( CONTENT, $content_length )&lt;br /&gt;
: Write $content_length bytes from CONTENT to the file object. Updates &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hash&amp;lt;/code&amp;gt; (you must call [[API:EPrints/DataObj/File#commit|commit]]).&lt;br /&gt;
&lt;br /&gt;
: Returns $content_length or undef on failure.&lt;br /&gt;
&lt;br /&gt;
: If CONTENT has fewer bytes than $content_length the result is undetermined and a warning will be printed.&lt;br /&gt;
&lt;br /&gt;
: CONTENT may be any one of:&lt;br /&gt;
&lt;br /&gt;
** CODEREF&lt;br /&gt;
:: Will be called until it returns empty string (&amp;quot;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;sub {&lt;br /&gt;
	sysread($fh, my $buffer, 1024);&lt;br /&gt;
	return $buffer;&lt;br /&gt;
};&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** SCALARREF&lt;br /&gt;
:: A scalar reference to a string of octets that will be written as-is.&lt;br /&gt;
&lt;br /&gt;
** GLOB&lt;br /&gt;
:: Will be treated as a file handle and read with sysread() until the eof.&lt;br /&gt;
&lt;br /&gt;
* $content_length = $file-&amp;amp;gt;set_file_chunk( CONTENT, $content_length, $offset, $total )&lt;br /&gt;
: Write a chunk of data to the content, overwriting or appending to the existing content. See [[API:EPrints/DataObj/File#set_file|set_file]] for CONTENT and $content_length. &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; is updated if $offset + $content_length is greater than the current &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: $offset is the starting point (in bytes) to write. $total is the total file size, used to determine where to store the content.&lt;br /&gt;
&lt;br /&gt;
: Returns the number of bytes written or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
: [[API:EPrints/Storage|EPrints::Storage]]&lt;br /&gt;
&lt;br /&gt;
: [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
: Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Storage&amp;diff=10818</id>
		<title>API:EPrints/Storage</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Storage&amp;diff=10818"/>
		<updated>2013-07-25T13:34:21Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Storage.pm|package_name=EPrints::Storage}}[[Category:API|STORAGE]][[Category:API:EPrints/Storage|STORAGE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;{{API:Unstable}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Storage - manage data streams in storage devices (storage layer)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;my $store = $repository-&amp;gt;storage();&lt;br /&gt;
&lt;br /&gt;
$str = &amp;quot;Hello, World!&amp;quot;;&lt;br /&gt;
open(my $fh, &amp;quot;&amp;lt;&amp;quot;, \$str);&lt;br /&gt;
$f = sub {&lt;br /&gt;
	read($fh, my $buffer, 6); # just to demonstrate!&lt;br /&gt;
	return $buffer;&lt;br /&gt;
};&lt;br /&gt;
$store-&amp;gt;store(&lt;br /&gt;
	$fileobj,		# file object&lt;br /&gt;
	$f,				# callback&lt;br /&gt;
	1024,			# offset&lt;br /&gt;
);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Unless you are directly manipulating how data streams are stored you should use the methods for retrieving and writing data available from [[API:EPrints/DataObj/File|EPrints::DataObj::File]].&lt;br /&gt;
&lt;br /&gt;
This module is the storage control layer which uses [[API:EPrints/Plugin/Storage|EPrints::Plugin::Storage]] plugins to support various storage back-ends. It enables the storage, retrieval and deletion of data streams. The maximum size of a stream is dependent on the back-end storage mechanism.&lt;br /&gt;
&lt;br /&gt;
Storage works on [[API:EPrints/DataObj/File|EPrints::DataObj::File]] objects, which record the size of the data stream and where it has been stored. Unless a specific storage back-end is used, where a file is stored depends on the storage policy which is located in ''lib/storage/default.xml'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;store xmlns=&amp;quot;http://eprints.org/ep3/storage&amp;quot; xmlns:epc=&amp;quot;http://eprints.org/ep3/control&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;epc:choose&amp;gt;&lt;br /&gt;
	&amp;lt;epc:when test=&amp;quot;datasetid = 'document'&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;plugin name=&amp;quot;Local&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/epc:when&amp;gt;&lt;br /&gt;
	&amp;lt;epc:otherwise&amp;gt;&lt;br /&gt;
		&amp;lt;plugin name=&amp;quot;Local&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/epc:otherwise&amp;gt;&lt;br /&gt;
&amp;lt;/epc:choose&amp;gt;&lt;br /&gt;
&amp;lt;/store&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The storage policy is a EP-script file that resolves to a list of one or more &amp;quot;plugin&amp;quot; elements. When storing, all matching plugins will be given the data stream to store (i.e. multiple copies). When retrieving, the first plugin to be successfully opened for reading will be used. The item context used when the storage policy is evaluated is the [[API:EPrints/DataObj/File|EPrints::DataObj::File]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_callbacks --&amp;gt;&lt;br /&gt;
===Callbacks===&lt;br /&gt;
Writing to and retrieving from data streams makes use of callback functions. This allows data to be streamed (to avoid memory overheads) and for flexibility in where data is going.&lt;br /&gt;
&lt;br /&gt;
For details on the callback API see [[API:EPrints/DataObj/File#get_file|EPrints::DataObj::File/get_file]] and [[API:EPrints/DataObj/File#set_file|EPrints::DataObj::File/set_file]] for retrieving and writing respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$store = EPrints::Storage-&amp;gt;new( $repository )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new storage object for $repository. Should not be used directly, see [[API:EPrints/Session|EPrints::Session]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_store --&amp;gt;&lt;br /&gt;
===store===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$len = $store-&amp;gt;store( $fileobj, CODEREF [, $offset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read from and store all data from CODEREF for $fileobj. If $offset is given starts writing from that point onwards.&lt;br /&gt;
&lt;br /&gt;
Behaviour is undefined if an attempt is made to write beyond $fileobj's '''filesize'''.&lt;br /&gt;
&lt;br /&gt;
Returns the number of bytes written or undef if an error occurred.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The combination of methods open_write, write, and close_write can be used as an alternative to this method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_retrieve --&amp;gt;&lt;br /&gt;
===retrieve===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;retrieve( $fileobj, $offset, $n, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve the contents of the $fileobj starting at $offset for $n bytes.&lt;br /&gt;
&lt;br /&gt;
CALLBACK = $rc = &amp;amp;amp;f( BUFFER )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;delete( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete all object copies stored for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete_copy --&amp;gt;&lt;br /&gt;
===delete_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;delete_copy( $plugin, $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete the copy of this file stored in the storage layer [[API:EPrints/Plugin/Storage|$plugin]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_local_copy --&amp;gt;&lt;br /&gt;
===get_local_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$fh = $store-&amp;gt;get_local_copy( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a local copy of the file. Potentially expensive if the file has to be retrieved.&lt;br /&gt;
&lt;br /&gt;
Stringifying $fh will give the full path to the local file, which may be useful for calling external tools (see {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}}).&lt;br /&gt;
&lt;br /&gt;
Returns undef if retrieval failed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_remote_copy --&amp;gt;&lt;br /&gt;
===get_remote_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $store-&amp;gt;get_remote_copy( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Some storage back-ends may provide direct Web access to the data stream (e.g. Amazon S3). If the back-end supports this, a user can be redirected to the storage back-end rather than downloading the file from EPrints. Internally, EPrints will always use the [[API:EPrints/Storage#retrieve|retrieve]] method.&lt;br /&gt;
&lt;br /&gt;
Returns a URL from which this file can be accessed.&lt;br /&gt;
&lt;br /&gt;
Returns undef if this file is not available via another service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_plugins --&amp;gt;&lt;br /&gt;
===get_plugins===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@plugins = $store-&amp;gt;get_plugins( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the [[API:EPrints/Plugin/Storage|EPrints::Plugin::Storage]] plugin(s) available to use for $fileobj, based on the storage policy. If more than one plugin is returned they should be used in turn until one succeeds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copy --&amp;gt;&lt;br /&gt;
===copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;copy( $plugin, $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the contents of $fileobj into another storage $plugin. This uses [[API:EPrints/Storage#retrieve|retrieve]] and [[API:EPrints/Storage#store|store]].&lt;br /&gt;
&lt;br /&gt;
Returns 1 on success, 0 on failure and -1 if a copy already exists in $plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_open_write --&amp;gt;&lt;br /&gt;
===open_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;open_write( $fileobj [, $offset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Start a write session for $fileobj. $fileobj must have at least the &amp;quot;filesize&amp;quot; property set (which is the total number of bytes that will be written).&lt;br /&gt;
&lt;br /&gt;
Don't forget to [[API:EPrints/Storage#close_write|close_write]] otherwise the handle to the write will be left open.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This, along with write and close_write, is an alternative to the store method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write --&amp;gt;&lt;br /&gt;
===write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;write( $fileobj, $buffer )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write $buffer to the storage plugin(s), starting from the previously written data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This, along with open_write and close_write, is an alternative to the store method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_close_write --&amp;gt;&lt;br /&gt;
===close_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;close_write( $fileobj );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Finish writing to the storage plugin(s) for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Storage&amp;diff=10817</id>
		<title>API:EPrints/Storage</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Storage&amp;diff=10817"/>
		<updated>2013-07-25T09:51:00Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Storage.pm|package_name=EPrints::Storage}}[[Category:API|STORAGE]][[Category:API:EPrints/Storage|STORAGE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;{{API:Unstable}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Storage - manage data streams in the storage devices&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;my $store = $repository-&amp;gt;storage();&lt;br /&gt;
&lt;br /&gt;
$store-&amp;gt;store(&lt;br /&gt;
	$fileobj,		# file object&lt;br /&gt;
	&amp;quot;diddle.pdf&amp;quot;,	# filename&lt;br /&gt;
	$fh				# file handle&lt;br /&gt;
);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Unless you are directly manipulating how data streams are stored you should use the methods for retrieving and writing data available from [[API:EPrints/DataObj/File|EPrints::DataObj::File]].&lt;br /&gt;
&lt;br /&gt;
This module is the storage control layer which uses [[API:EPrints/Plugin/Storage|EPrints::Plugin::Storage]] plugins to support various storage back-ends. It enables the storage, retrieval and deletion of data streams. The maximum size of a stream is dependent on the back-end storage mechanism.&lt;br /&gt;
&lt;br /&gt;
Storage works on [[API:EPrints/DataObj/File|EPrints::DataObj::File]] objects, which record the size of the data stream and where it has been stored. Unless a specific storage back-end is used where a file is stored depends on the storage policy, by default located in ''lib/storage/default.xml'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;store xmlns=&amp;quot;http://eprints.org/ep3/storage&amp;quot; xmlns:epc=&amp;quot;http://eprints.org/ep3/control&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;epc:choose&amp;gt;&lt;br /&gt;
	&amp;lt;epc:when test=&amp;quot;datasetid = 'document'&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;plugin name=&amp;quot;Local&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/epc:when&amp;gt;&lt;br /&gt;
	&amp;lt;epc:otherwise&amp;gt;&lt;br /&gt;
		&amp;lt;plugin name=&amp;quot;Local&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/epc:otherwise&amp;gt;&lt;br /&gt;
&amp;lt;/epc:choose&amp;gt;&lt;br /&gt;
&amp;lt;/store&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The storage policy is a EP-script file that resolves to a list of one or more &amp;quot;plugin&amp;quot; elements. When storing, all matching plugins will be given the data stream to store (i.e. multiple copies). When retrieving, the first plugin to be successfully opened for reading will be used. The item context used within the storage policy is the [[API:EPrints/DataObj/File|EPrints::DataObj::File]], which may only contain partial information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$store = EPrints::Storage-&amp;gt;new( $repository )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new storage object for $repository. Should not be used directly, see [[API:EPrints/Session|EPrints::Session]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_store --&amp;gt;&lt;br /&gt;
===store===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$len = $store-&amp;gt;store( $fileobj, CODEREF [, $offset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read from and store all data from CODEREF for $fileobj. If $offset is given starts writing from that point onwards.&lt;br /&gt;
&lt;br /&gt;
Behaviour is undefined if an attempt is made to write beyond $fileobj's '''filesize'''.&lt;br /&gt;
&lt;br /&gt;
Returns the number of bytes written or undef if an error occurred.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The combination of methods open_write, write, and close_write can be used as an alternative to this method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_retrieve --&amp;gt;&lt;br /&gt;
===retrieve===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;retrieve( $fileobj, $offset, $n, CALLBACK )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve the contents of the $fileobj starting at $offset for $n bytes.&lt;br /&gt;
&lt;br /&gt;
CALLBACK = $rc = &amp;amp;amp;f( BUFFER )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $store-&amp;gt;delete( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete all object copies stored for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete_copy --&amp;gt;&lt;br /&gt;
===delete_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;delete_copy( $plugin, $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Delete the copy of this file stored in the storage layer [[API:EPrints/Plugin/Storage|$plugin]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_local_copy --&amp;gt;&lt;br /&gt;
===get_local_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$fh = $store-&amp;gt;get_local_copy( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a local copy of the file. Potentially expensive if the file has to be retrieved.&lt;br /&gt;
&lt;br /&gt;
Stringifying $fh will give the full path to the local file, which may be useful for calling external tools (see {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}}).&lt;br /&gt;
&lt;br /&gt;
Returns undef if retrieval failed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_remote_copy --&amp;gt;&lt;br /&gt;
===get_remote_copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $store-&amp;gt;get_remote_copy( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Some storage back-ends may provide direct Web access to the data stream (e.g. Amazon S3). If the back-end supports this, a user can be redirected to the storage back-end rather than downloading the file from EPrints. Internally, EPrints will always use the [[API:EPrints/Storage#retrieve|retrieve]] method.&lt;br /&gt;
&lt;br /&gt;
Returns a URL from which this file can be accessed.&lt;br /&gt;
&lt;br /&gt;
Returns undef if this file is not available via another service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_plugins --&amp;gt;&lt;br /&gt;
===get_plugins===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@plugins = $store-&amp;gt;get_plugins( $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the [[API:EPrints/Plugin/Storage|EPrints::Plugin::Storage]] plugin(s) available to use for $fileobj, based on the storage policy. If more than one plugin is returned they should be used in turn until one succeeds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copy --&amp;gt;&lt;br /&gt;
===copy===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $store-&amp;gt;copy( $plugin, $fileobj )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the contents of $fileobj into another storage $plugin. This uses [[API:EPrints/Storage#retrieve|retrieve]] and [[API:EPrints/Storage#store|store]].&lt;br /&gt;
&lt;br /&gt;
Returns 1 on success, 0 on failure and -1 if a copy already exists in $plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_open_write --&amp;gt;&lt;br /&gt;
===open_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;open_write( $fileobj [, $offset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Start a write session for $fileobj. $fileobj must have at least the &amp;quot;filesize&amp;quot; property set (which is the total number of bytes that will be written).&lt;br /&gt;
&lt;br /&gt;
Don't forget to [[API:EPrints/Storage#close_write|close_write]] otherwise the handle to the write will be left open.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This, along with write and close_write, is an alternative to the store method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_write --&amp;gt;&lt;br /&gt;
===write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;write( $fileobj, $buffer )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write $buffer to the storage plugin(s), starting from the previously written data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This, along with open_write and close_write, is an alternative to the store method.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_close_write --&amp;gt;&lt;br /&gt;
===close_write===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $storage-&amp;gt;close_write( $fileobj );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Finish writing to the storage plugin(s) for $fileobj.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search/Xapian&amp;diff=10816</id>
		<title>API:EPrints/Plugin/Search/Xapian</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search/Xapian&amp;diff=10816"/>
		<updated>2013-07-24T11:02:08Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Search/Xapian.pm|package_name=EPrints::Plugin::Search::Xapian}}[[Category:API|XAPIAN]][[Category:API:EPrints/Plugin/Search|XAPIAN]][[Category:API:EPrints/Plugin/Search/Xapian|XAPIAN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Search::Xapian&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
&amp;lt;pre&amp;gt;  Xapian is a highly adaptable toolkit which allows developers to easily add&lt;br /&gt;
  advanced indexing and search facilities to their own applications. It supports&lt;br /&gt;
  the Probabilistic Information Retrieval model and also supports a rich set of&lt;br /&gt;
  boolean query operators.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Xapian currently only supports simple searches.&lt;br /&gt;
&lt;br /&gt;
Xapian simple searches are parsed by the Xapian query parser which supports prefixes for search terms:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  title:(eagle buzzard) abstract:&amp;quot;london wetlands&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The field prefixes are taken from the search configuration and constrain the following term (or bracketed terms) to that field only. If no prefix is given the entire Xapian index will be used i.e. it will search any indexed term, not just those from the search configuration fields. For example, the following simple search configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  search_fields =&amp;amp;gt; [&lt;br /&gt;
    {&lt;br /&gt;
      id =&amp;amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
         meta_fields =&amp;amp;gt; [&lt;br /&gt;
           &amp;quot;documents&amp;quot;,&lt;br /&gt;
           &amp;quot;title&amp;quot;,&lt;br /&gt;
           &amp;quot;abstract&amp;quot;,&lt;br /&gt;
           &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
           &amp;quot;date&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
    },&lt;br /&gt;
  ],&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the user to specify &amp;quot;documents&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;abstract&amp;quot;, &amp;quot;creators_name&amp;quot; or &amp;quot;date&amp;quot; as a prefix to a search term. Omitting a prefix will match any field e.g. &amp;quot;publisher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Terms can be negated by prefixing the term with '-':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  eagle -buzzard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Phrases can be specified by using quotes, for example  &amp;quot;Southampton University&amp;quot; won't match &amp;lt;em&amp;gt;University of Southampton&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Terms are stemmed by default ('bubbles' becomes 'bubble') except if you use the term in a phrase.&lt;br /&gt;
&lt;br /&gt;
Partial matches are supported by using '*':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  ameri* - americans, americas, amerillo etc.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Xapian search results are returned in a sub-class of [[API:EPrints/List|EPrints::List]] (a wrapper around a Xapian enquire object). Calling [[API:EPrints/List#count|EPrints::List/count]] will return an '''estimate''' of the total matches.&lt;br /&gt;
&lt;br /&gt;
As Xapian has a higher 'qs' score than Internal it will (once enabled) override the default EPrints simple search. You can override this behaviour in '''cfg.d/plugins.pl''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $c-&amp;amp;gt;{plugins}{'Search::Xapian'}{params}{qs} = .1;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or disable completely (including disabling indexing):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $c-&amp;amp;gt;{plugins}{'Search::Xapian'}{params}{disable} = 1;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_usage --&amp;gt;&lt;br /&gt;
==USAGE==&lt;br /&gt;
Install the {{API:PodLink|file=Search/Xapian|package_name=Search::Xapian|section=|text=Search::Xapian}} extension. Note: there are two Perl bindings available for Xapian. The CPAN version is older and based on Perl-XS. xapian-bindings-perl available from xapian.org is based on SWIG and has better coverage of the API. Regardless, for the best feature support/performance it is highly recommended to have the latest stable version of the Xapian library.&lt;br /&gt;
&lt;br /&gt;
Xapian uses a separate (from MySQL) index that is stored in ''archives/[archiveid]/var/xapian''. To build the Xapian index you will need to reindex:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  ./bin/epadmin reindex [archiveid] eprint&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Repeat for any other datasets you expect to use Xapian with.)&lt;br /&gt;
&lt;br /&gt;
The ''/var/xapian/'' directory should contain something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  flintlock  position.baseA  position.DB     postlist.baseB  record.baseA  record.DB       termlist.baseB&lt;br /&gt;
  iamchert   position.baseB  postlist.baseA  postlist.DB     record.baseB  termlist.baseA  termlist.DB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The indexing process for Xapian is in ''lib/cfg.d/search_xapian.pl''. This can be overridden by dropping the same-named file into your repository ''cfg.d/''. If the Xapian search is not matching what you might expect it to, you probably need to fix the indexing process (and re-index!). Terms indexed by Xapian can also be weighted to e.g. give names a higher weighting than abstract text.&lt;br /&gt;
&lt;br /&gt;
You will need to restart your Apache server to enable the Xapian search plugin and dependencies.&lt;br /&gt;
&lt;br /&gt;
If the Xapian search is working correctly you will have a &amp;quot;by relevance&amp;quot; option available in the ordering of simple search results.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_lock_files --&amp;gt;&lt;br /&gt;
===Lock Files===&lt;br /&gt;
Xapian maintains a lock file in ''var/xapian''. If you see indexing errors about not being able to lock the database ensure you aren't running multiple copies of the EPrints {{API:PodLink|file=bin|package_name=bin|section=indexer|text=indexer}}. If no other processes are running you may need to manually remove the lock file from the ''var/xapian'' directory. While only one process may modify the Xapian index at a time, any number of processes may concurrently read.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parameters --&amp;gt;&lt;br /&gt;
==PARAMETERS==&lt;br /&gt;
* lang&lt;br /&gt;
: Override the default language used for stemming.&lt;br /&gt;
&lt;br /&gt;
* stopwords&lt;br /&gt;
: An array reference of stop words to use (defaults to English).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_stemmer --&amp;gt;&lt;br /&gt;
===stemmer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$stemmer = $plugin-&amp;gt;stemmer()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a {{API:PodLink|file=Search/Xapian/Stem|package_name=Search::Xapian::Stem|section=|text=Search::Xapian::Stem}} for the default language.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_stopper --&amp;gt;&lt;br /&gt;
===stopper===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$stopper = $plugin-&amp;gt;stopper()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a {{API:PodLink|file=Search/Xapian/SimpleStopper|package_name=Search::Xapian::SimpleStopper|section=|text=Search::Xapian::SimpleStopper}} for &amp;lt;code&amp;gt;stopwords&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search&amp;diff=10815</id>
		<title>API:EPrints/Plugin/Search</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search&amp;diff=10815"/>
		<updated>2013-07-24T11:01:03Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Search.pm|package_name=EPrints::Plugin::Search}}[[Category:API|SEARCH]][[Category:API:EPrints/Plugin|SEARCH]][[Category:API:EPrints/Plugin/Search|SEARCH]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Search - pluggable search engines&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;# use a specific engine&lt;br /&gt;
$searchexp = $repo-&amp;gt;plugin( &amp;quot;Search::XXX&amp;quot;,&lt;br /&gt;
	dataset =&amp;gt; $repo-&amp;gt;dataset( &amp;quot;archive&amp;quot; ),&lt;br /&gt;
	filters =&amp;gt; [{&lt;br /&gt;
		meta_fields =&amp;gt; [qw( meta_visibility )], value =&amp;gt; 'show',&lt;br /&gt;
	}],&lt;br /&gt;
	...&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# find the best engine for a given search configuration&lt;br /&gt;
@engines = $repo-&amp;gt;get_plugins({&lt;br /&gt;
		dataset =&amp;gt; $repo-&amp;gt;dataset( &amp;quot;archive&amp;quot; )&lt;br /&gt;
	},&lt;br /&gt;
	type =&amp;gt; &amp;quot;Search&amp;quot;,&lt;br /&gt;
	can_search =&amp;gt; &amp;quot;simple/eprint&amp;quot;,&lt;br /&gt;
);&lt;br /&gt;
@engines = sort {&lt;br /&gt;
		$b-&amp;gt;param('qs') &amp;lt;=&amp;gt; $a-&amp;gt;param('qs')&lt;br /&gt;
	} @engines;&lt;br /&gt;
&lt;br /&gt;
# render a search input form&lt;br /&gt;
$form-&amp;gt;appendChild(&lt;br /&gt;
	$searchexp-&amp;gt;render_simple_fields&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# read the user input terms&lt;br /&gt;
$searchexp-&amp;gt;from_form();&lt;br /&gt;
&lt;br /&gt;
# and execute to get some results&lt;br /&gt;
$results = $searchexp-&amp;gt;execute();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Search plugins implement the features required to render search query form inputs, perform queries and return matching objects.&lt;br /&gt;
&lt;br /&gt;
The main function of a search plugin is to retrieve objects from a [[API:EPrints/DataSet|dataset]] based on a set of search criteria. The criteria are search fields and search filters. The terms used in search fields are usually provided by the user (e.g. from a Web form) while filters are defined by the search configuration. Search fields also define the &amp;quot;setness&amp;quot; of a search - if the user hasn't supplied any search terms the search is deemed to be empty. Filters tend to provide more options than those currently available from the Web UI, for instance testing whether a value is or is not set.&lt;br /&gt;
&lt;br /&gt;
In the default EPrints configuration there are &amp;lt;code&amp;gt;simple&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;advanced&amp;lt;/code&amp;gt; searches for objects of class [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]. These (at least) define the form input boxes provided to the user and the fields that those user-supplied values are matched against. The search configuration can also define the choice of ordering of results, additional filters etc. Not all options will be supported by every engine - see the engine-specific plugins for details.&lt;br /&gt;
&lt;br /&gt;
There are currently two engines provided as part of the EPrints core:&lt;br /&gt;
&lt;br /&gt;
* Internal&lt;br /&gt;
: [[API:EPrints/Plugin/Search/Internal|EPrints::Plugin::Search::Internal]] is a wrapper around [[API:EPrints/Search|EPrints::Search]].&lt;br /&gt;
&lt;br /&gt;
: This supports querying any object type and in any search configuration (matches &amp;lt;code&amp;gt;*/*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* Xapian&lt;br /&gt;
: [[API:EPrints/Plugin/Search/Xapian|EPrints::Plugin::Search::Xapian]] is a wrapper around the {{API:PodLink|file=Search/Xapian|package_name=Search::Xapian|section=|text=Search::Xapian}} module (must be installed separately). Xapian supports relevance matches, phrase searching, stemming and other advanced text index approaches.&lt;br /&gt;
&lt;br /&gt;
: Currently only &amp;lt;code&amp;gt;simple&amp;lt;/code&amp;gt; searches are supported.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp = EPrints::Plugin::Search-&amp;gt;new( session =&amp;gt; $session, dataset =&amp;gt; $dataset, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Create a new Search plugin object. Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  custom_order - stringified order specification&lt;br /&gt;
  qs - quality score&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_form --&amp;gt;&lt;br /&gt;
===from_form===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@probs = $searchexp-&amp;gt;from_form()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Populate the query from an input form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_cache --&amp;gt;&lt;br /&gt;
===from_cache===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $searchexp-&amp;gt;from_cache( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Retrieve an existing query from a cache identified by $id.&lt;br /&gt;
&lt;br /&gt;
: The cache id is set via the [[API:EPrints/List|EPrints::List]] object returned by [[API:EPrints/Plugin/Search#execute|execute]] (cache_id option).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string --&amp;gt;&lt;br /&gt;
===from_string===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $searchexp-&amp;gt;from_string( $exp )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Populate the search values from a previously [[API:EPrints/Plugin/Search#serialise|serialise]]d query $exp.&lt;br /&gt;
&lt;br /&gt;
: Will only set search values for those fields that have already been defined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string_raw --&amp;gt;&lt;br /&gt;
===from_string_raw===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;from_string_raw( $exp )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Populate the search values from a previously [[API:EPrints/Plugin/Search#serialise|serialise]]d query $exp.&lt;br /&gt;
&lt;br /&gt;
: This will add any [[API:EPrints/Search/Field|EPrints::Search::Field]]s that are in $exp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string_fields --&amp;gt;&lt;br /&gt;
===from_string_fields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;from_string_fields( $fields, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Populate the field values from serialised $fields (array ref).&lt;br /&gt;
&lt;br /&gt;
: Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  init - initialise the fields&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string_filters --&amp;gt;&lt;br /&gt;
===from_string_filters===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;from_string_filters( $fields, %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Populate the filter field values from serialised $fields (array ref).&lt;br /&gt;
&lt;br /&gt;
: Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  init - initialise the fields&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise --&amp;gt;&lt;br /&gt;
===serialise===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$exp = $searchexp-&amp;gt;serialise( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Serialise the query and return it as a plain-string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise_fields --&amp;gt;&lt;br /&gt;
===serialise_fields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@fields = $searchexp-&amp;gt;serialise_fields()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Returns a list of serialised field-values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise_filters --&amp;gt;&lt;br /&gt;
===serialise_filters===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@fields = $searchexp-&amp;gt;serialise_filters()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Returns a list of serialised filter field-values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_freeze --&amp;gt;&lt;br /&gt;
===freeze===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$spec = $searchexp-&amp;gt;freeze()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Freeze this search spec.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_thaw --&amp;gt;&lt;br /&gt;
===thaw===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp = $searchexp-&amp;gt;thaw( $spec )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Unthaw a search spec into a new [[API:EPrints/Plugin/Search|EPrints/Plugin/Search]] object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $searchexp = $repo-&amp;amp;gt;plugin( &amp;quot;Search&amp;quot; )-&amp;amp;gt;thaw( ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Returns undef if $spec is invalid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_blank --&amp;gt;&lt;br /&gt;
===is_blank===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;is_blank()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Returns true if no query has been specified (ignoring any dataset-specific filters).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clear --&amp;gt;&lt;br /&gt;
===clear===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;clear()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Clears values from the query from e.g. [[API:EPrints/Plugin/Search#from_form|from_form]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_execute --&amp;gt;&lt;br /&gt;
===execute===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$results = $searchexp-&amp;gt;execute()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Execute the query and return a [[API:EPrints/List|EPrints::List]] object (or subclass).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_description --&amp;gt;&lt;br /&gt;
===render_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_description()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Return an XHTML DOM description of this search expression. This is the combination of the condition and sort options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_conditions_description --&amp;gt;&lt;br /&gt;
===render_conditions_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_conditions_description()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Return an XHTML DOM description of this search expression's conditions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_order_description --&amp;gt;&lt;br /&gt;
===render_order_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_order_description()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Return an XHTML DOM description of how this search is ordered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_simple_fields --&amp;gt;&lt;br /&gt;
===render_simple_fields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_simple_fields( [ %opts ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Renders the form input field(s) required for a simple search (typically just a single text input box).&lt;br /&gt;
&lt;br /&gt;
: Options are as passed to [[API:EPrints/XHTML#input_field|EPrints::XHTML/input_field]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_advanced_fields --&amp;gt;&lt;br /&gt;
===render_advanced_fields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_advanced_fields()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Renders a list of input fields for advanced input as table rows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_join_exp --&amp;gt;&lt;br /&gt;
===join_exp===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$exp = $searchexp-&amp;gt;join_exp( @sections )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_split_exp --&amp;gt;&lt;br /&gt;
===split_exp===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@sections = $searchexp-&amp;gt;split_exp( $exp )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_describe --&amp;gt;&lt;br /&gt;
===describe===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$text = $searchexp-&amp;gt;describe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
: Returns a text string describing this search query that will be executed (for debugging).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
:: [[API:EPrints/Const#EP_TRIGGER_INDEX_FIELDS|EPrints::Const/EP_TRIGGER_INDEX_FIELDS]], [[API:EPrints/Search|EPrints::Search]], [[API:EPrints/List|EPrints::List]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
:: Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
:: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
:: 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.&lt;br /&gt;
&lt;br /&gt;
:: 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.&lt;br /&gt;
&lt;br /&gt;
:: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Search&amp;diff=10814</id>
		<title>API:EPrints/Search</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Search&amp;diff=10814"/>
		<updated>2013-07-24T11:00:21Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Search.pm|package_name=EPrints::Search}}[[Category:API|SEARCH]][[Category:API:EPrints/Search|SEARCH]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Search - retrieve objects based on search criteria&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
The Search object represents the conditions of a single search.&lt;br /&gt;
&lt;br /&gt;
Executing a search returns an [[API:EPrints/List|EPrints::List]] object.&lt;br /&gt;
&lt;br /&gt;
A search expression can also render itself as a web-form, populate itself with values from that web-form and render the results as a web page.&lt;br /&gt;
&lt;br /&gt;
[[API:EPrints/Plugin/Search|EPrints::Plugin::Search]] provides a pluggable architecture for searching EPrints.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_searching_for_eprints --&amp;gt;&lt;br /&gt;
===Searching for Eprints===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $ds = $repo-&amp;amp;gt;dataset( &amp;quot;archive&amp;quot; );&lt;br /&gt;
  &lt;br /&gt;
  # NB 'archive' is an implicit filter on eprint.status&lt;br /&gt;
  $list = $ds-&amp;gt;search(filters =&amp;gt; [{&lt;br /&gt;
    meta_fields =&amp;gt; [qw( eprintid )], value =&amp;gt; 23,&lt;br /&gt;
  }]);&lt;br /&gt;
  &lt;br /&gt;
  $list = $ds-&amp;gt;search(search_fields =&amp;gt; [{&lt;br /&gt;
    meta_fields =&amp;gt; [qw( creators_name )], value =&amp;gt; &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
  }]);&lt;br /&gt;
  &lt;br /&gt;
  $searchexp = $ds-&amp;gt;prepare_search();&lt;br /&gt;
  $searchexp-&amp;gt;add_field(&lt;br /&gt;
    fields =&amp;gt; [&lt;br /&gt;
      $ds-&amp;gt;field('creators_name')&lt;br /&gt;
    ],&lt;br /&gt;
    value =&amp;gt; &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
    match =&amp;gt; &amp;quot;EQ&amp;quot;, # EQuals&lt;br /&gt;
  );&lt;br /&gt;
  $searchexp-&amp;gt;add_field(&lt;br /&gt;
    fields =&amp;gt; [&lt;br /&gt;
      $ds-&amp;gt;field('title')&lt;br /&gt;
    ],&lt;br /&gt;
    value =&amp;gt; &amp;quot;eagle buzzard&amp;quot;,&lt;br /&gt;
    match =&amp;gt; &amp;quot;IN&amp;quot;, # INdex&lt;br /&gt;
  );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/DataSet|EPrints::DataSet]] for more API methods for constructing search objects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_getting_results --&amp;gt;&lt;br /&gt;
===Getting Results===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $list = $searchexp-&amp;amp;gt;perform_search;&lt;br /&gt;
  &lt;br /&gt;
  my $count = $list-&amp;gt;count;&lt;br /&gt;
  &lt;br /&gt;
  my $ids = $results-&amp;gt;ids( 0, 10 );&lt;br /&gt;
  my $ids = $results-&amp;gt;ids; # Get all matching ids&lt;br /&gt;
  &lt;br /&gt;
  my $info = { matches =&amp;gt; 0 };&lt;br /&gt;
  sub fn {&lt;br /&gt;
    my( $session, $dataset, $eprint, $info ) = @_;&lt;br /&gt;
    $info-&amp;gt;{matches}++;&lt;br /&gt;
  };&lt;br /&gt;
  $list-&amp;gt;map( \&amp;amp;fn, $info );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/List|EPrints::List]] for more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp = EPrints::Search-&amp;gt;new( %params )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new search expression.&lt;br /&gt;
&lt;br /&gt;
The parameters are split into two parts. The general parameters and those which influence how the HTML form is rendered, and the results displayed.&lt;br /&gt;
&lt;br /&gt;
GENERAL PARAMETERS&lt;br /&gt;
&lt;br /&gt;
* session (required)&lt;br /&gt;
: The current [[API:EPrints/Session|EPrints::Session]]&lt;br /&gt;
&lt;br /&gt;
* dataset OR dataset_id (required)&lt;br /&gt;
: Either the [[API:EPrints/DataSet|EPrints::DataSet]] to search, or the ID of it.&lt;br /&gt;
&lt;br /&gt;
* allow_blank (default 0)&lt;br /&gt;
: Unless this is set, a search with no conditions will return zero records  rather than all records.&lt;br /&gt;
&lt;br /&gt;
* satisfy_all (default 1)&lt;br /&gt;
: If this is true than all search-fields much be satisfied, if false then  results matching any search-field will be returned.&lt;br /&gt;
&lt;br /&gt;
* search_fields&lt;br /&gt;
: A reference to an array of search field configuration structures. Each  takes the form { id=&amp;amp;gt;&amp;quot;...&amp;quot;, default=&amp;amp;gt;&amp;quot;..&amp;quot;, meta_fields=&amp;amp;gt;&amp;quot;...&amp;quot; } where the meaning is the same as for search configuration in ArchiveConfig.&lt;br /&gt;
&lt;br /&gt;
: Search fields can also be added to the search expression after it has been constructed.&lt;br /&gt;
&lt;br /&gt;
* order&lt;br /&gt;
: The order the results should be returned. This is a key to the list of orders available to this dataset, defined in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
* custom_order&lt;br /&gt;
: &amp;quot;order&amp;quot; limits you to the orders specified in ArchiveConfig, and is usually used by the web page based searching. custom_order allows you to specify any order you like. The format is  foo/-bar. This means that the results will be sorted by foo and then any with equal foo values will be reverse sorted by bar. More than 2 fields can be specified.&lt;br /&gt;
&lt;br /&gt;
* keep_cache&lt;br /&gt;
: If true then the search results produced will be stored in the database even after the current script ends. This is useful for speeding up  page 2 onwards of a search.&lt;br /&gt;
&lt;br /&gt;
: keep_cache may get set to true anyway for various reasons, but setting the parameter makes certain of it.&lt;br /&gt;
&lt;br /&gt;
* cache_id&lt;br /&gt;
: The ID of a cached search. The cache contains both the results of the search, and the parameters used for the search.&lt;br /&gt;
&lt;br /&gt;
: If the cache still exists, it will set the default values of the  search fields, and when the search is performed it will skip the  search and build a search results object directly from the cache.&lt;br /&gt;
&lt;br /&gt;
* limit&lt;br /&gt;
: Limit the number of matching records to limit.&lt;br /&gt;
&lt;br /&gt;
WEB PAGE RELATED PARAMETERS&lt;br /&gt;
&lt;br /&gt;
* prefix (default &amp;quot;&amp;quot;)&lt;br /&gt;
: When generating the web form and reading back from the web form, the prefix is inserted before the form names of all fields. This is useful if you need to put two search expressions in a single form for some reason.&lt;br /&gt;
&lt;br /&gt;
* staff (default 0)&lt;br /&gt;
: If true then this is a &amp;quot;staff&amp;quot; search, which prevents searching unless the user is staff, and the results link to the staff URL of an item rather than the public URL.&lt;br /&gt;
&lt;br /&gt;
* filters&lt;br /&gt;
: A reference to an array of filter definitions.&lt;br /&gt;
&lt;br /&gt;
: Filter definitions take the form of: { value=&amp;amp;gt;&amp;quot;..&amp;quot;, match=&amp;amp;gt;&amp;quot;..&amp;quot;, merge=&amp;amp;gt;&amp;quot;..&amp;quot;, id=&amp;amp;gt;&amp;quot;..&amp;quot; } and work much like normal search fields except that they do not appear in the web form so force certain search parameters on the user.&lt;br /&gt;
&lt;br /&gt;
: An optional parameter of describe=&amp;amp;gt;0 can be set to supress the filter being mentioned in the description of the search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_cache --&amp;gt;&lt;br /&gt;
===from_cache===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $thing-&amp;gt;from_cache( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Populate this search expression with values from the given cache.&lt;br /&gt;
&lt;br /&gt;
Return false if the cache does not exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_field --&amp;gt;&lt;br /&gt;
===add_field===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchfield = $searchexp-&amp;gt;add_field( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;  fields - one or more fields to search over&lt;br /&gt;
  match - match type&lt;br /&gt;
  merge - merge type&lt;br /&gt;
  value - value to match against (for EX matches, NULL = is_null!)&lt;br /&gt;
  id - search field id, if not the name of the first field&lt;br /&gt;
  filter - is filter-type&lt;br /&gt;
  show_help - show help in search input&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a new search in $fields which is either a single [[API:EPrints/MetaField|EPrints::MetaField]] or a list of fields in an array ref with default $value. If a search field already exists, the value of that field is replaced with $value.&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/Search/Field|EPrints::Search::Field]] for details on match/merge etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clear --&amp;gt;&lt;br /&gt;
===clear===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;clear&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Clear the search values of all search fields in the expression.&lt;br /&gt;
&lt;br /&gt;
Resets satisfy_all to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_satisfy_all --&amp;gt;&lt;br /&gt;
===get_satisfy_all===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $searchexp-&amp;gt;get_satisfy_all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return true if this search requires that all the search fields with values are satisfied. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_blank --&amp;gt;&lt;br /&gt;
===is_blank===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $searchexp-&amp;gt;is_blank&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return true is this searchexpression has no conditions set, otherwise true.&lt;br /&gt;
&lt;br /&gt;
If any field is set to &amp;quot;exact&amp;quot; then it can never count as unset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise --&amp;gt;&lt;br /&gt;
===serialise===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$string = $searchexp-&amp;gt;serialise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a text representation of the search expression, for persistent storage. Doesn't store table or the order by fields, just the field names, values, default order and satisfy_all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string --&amp;gt;&lt;br /&gt;
===from_string===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;from_string( $string )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Unserialises the contents of $string but only into the fields alrdeady existing in $searchexp. Set the order and satisfy_all mode but do not  affect the dataset or allow blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clone --&amp;gt;&lt;br /&gt;
===clone===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$newsearchexp = $searchexp-&amp;gt;clone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a new search expression which is a duplicate of this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_conditons --&amp;gt;&lt;br /&gt;
===get_conditons===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$conditions = $searchexp-&amp;gt;get_conditons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a tree of [[API:EPrints/Search/Condition|EPrints::Search::Condition]] objects describing the simple steps required to perform this search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset --&amp;gt;&lt;br /&gt;
===get_dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = $searchexp-&amp;gt;get_dataset&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/DataSet|EPrints::DataSet]] which this search relates to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_dataset --&amp;gt;&lt;br /&gt;
===set_dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;set_dataset( $dataset )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the [[API:EPrints/DataSet|EPrints::DataSet]] which this search relates to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_description --&amp;gt;&lt;br /&gt;
===render_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of this search expressions current parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_conditions_description --&amp;gt;&lt;br /&gt;
===render_conditions_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_conditions_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of this search expressions conditions. ie title is &amp;quot;foo&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_order_description --&amp;gt;&lt;br /&gt;
===render_order_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_order_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of how this search is ordered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_property --&amp;gt;&lt;br /&gt;
===set_property===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;set_property( $property, $value );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set any single property of this search, such as the order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_searchfields --&amp;gt;&lt;br /&gt;
===get_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_searchfields()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/Search/Field|EPrints::Search::Field]] objects relating to this search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_non_filter_searchfields --&amp;gt;&lt;br /&gt;
===get_non_filter_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_non_filter_searchfields();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/Search/Field|EPrints::Search::Field]] objects relating to this search, which are normal search fields, and not &amp;quot;filters&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_set_searchfields --&amp;gt;&lt;br /&gt;
===get_set_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_set_searchfields&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the searchfields belonging to this search expression which have a value set. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_cache_id --&amp;gt;&lt;br /&gt;
===get_cache_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$cache_id = $searchexp-&amp;gt;get_cache_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the ID of the cache containing the results of this search, if known.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_search --&amp;gt;&lt;br /&gt;
===perform_search===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$results = $searchexp-&amp;gt;perform_search&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute this search and return a [[API:EPrints/List|EPrints::List]] object representing the results.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_distinctby --&amp;gt;&lt;br /&gt;
===perform_distinctby===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ids_map = $searchexp-&amp;gt;perform_distinctby( $fields )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Perform a DISTINCT on $fields to find all unique ids by value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_groupby --&amp;gt;&lt;br /&gt;
===perform_groupby===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;($values, $counts) = $searchexp-&amp;gt;perform_groupby( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Perform a SQL GROUP BY on $field based on the current search parameters.&lt;br /&gt;
&lt;br /&gt;
Returns two array references, one containing a list of unique values and one a list of counts for each value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_ids_by_field_values --&amp;gt;&lt;br /&gt;
===get_ids_by_field_values===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$hash = $searchexp-&amp;gt;get_ids_by_field_values( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find the ids for each unique value in $field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Search/Field&amp;diff=10813</id>
		<title>API:EPrints/Search/Field</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Search/Field&amp;diff=10813"/>
		<updated>2013-07-24T10:59:30Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Search/Field.pm|package_name=EPrints::Search::Field}}[[Category:API|FIELD]][[Category:API:EPrints/Search|FIELD]][[Category:API:EPrints/Search/Field|FIELD]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Search::Field - one criteria in a search expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class represents a single criteria in a [[API:EPrints/Search|EPrints::Search]] and by extension a search form.&lt;br /&gt;
&lt;br /&gt;
It can search over several [[API:EPrints/MetaField|EPrints::MetaField]]s, and the value of the search field is usually a string containing a list of whitespace separated words.&lt;br /&gt;
&lt;br /&gt;
A search field has four key parameters:&lt;br /&gt;
&lt;br /&gt;
1. The list of the metadata fields it searches.&lt;br /&gt;
&lt;br /&gt;
2. The value to search for.&lt;br /&gt;
&lt;br /&gt;
3. The &amp;quot;match&amp;quot; parameter which can be one of:&lt;br /&gt;
&lt;br /&gt;
* match=IN (index)&lt;br /&gt;
: Treat the value as a list of whitespace-seperated words. Search for each one in the full-text index.&lt;br /&gt;
&lt;br /&gt;
: In the case of subjects, match these subject ids or the those of any of their decendants in the subject tree.&lt;br /&gt;
&lt;br /&gt;
* match=EQ (equal)&lt;br /&gt;
: Treat the value as a single string. Match only fields which have this value.&lt;br /&gt;
&lt;br /&gt;
* match=EX (exact)&lt;br /&gt;
: If the value is an empty string then search for fields which are empty, as oppose to skipping this search field.&lt;br /&gt;
&lt;br /&gt;
: In the case of subjects, match the specified subjects, but not their decendants.&lt;br /&gt;
&lt;br /&gt;
* match=SET&lt;br /&gt;
: If the value is non-empty.&lt;br /&gt;
&lt;br /&gt;
* match=NO&lt;br /&gt;
: This is only really used internally, it means the search field will just fail to match anything without doing any actual searching.&lt;br /&gt;
&lt;br /&gt;
4. the &amp;quot;merge&amp;quot; parameter which can be one of:&lt;br /&gt;
&lt;br /&gt;
* merge=ANY &lt;br /&gt;
: Match an item if any of the space-separated words in the value match.&lt;br /&gt;
&lt;br /&gt;
* merge=ALL &lt;br /&gt;
: Match an item only if all of the space-separated words in the value match.&lt;br /&gt;
&lt;br /&gt;
Merge has no affect on &amp;lt;code&amp;gt;EX&amp;lt;/code&amp;gt; matches, which always match the entire value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
===METHODS===&lt;br /&gt;
 $sf = EPrints::Search::Field-&amp;amp;gt;new( %opts )&lt;br /&gt;
&amp;lt;pre&amp;gt;  repository&lt;br /&gt;
  dataset&lt;br /&gt;
  fields - field or fields to search&lt;br /&gt;
  value - value to search for&lt;br /&gt;
  match&lt;br /&gt;
  merge&lt;br /&gt;
  prefix&lt;br /&gt;
  show_help&lt;br /&gt;
  id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $thing = EPrints::Search::Field-&amp;amp;gt;new( $session, $dataset, $fields, $value, [$match], [$merge], [$prefix], [$show_help] )&lt;br /&gt;
Create a new search field object (%opts form is preferred).&lt;br /&gt;
&lt;br /&gt;
$prefix is used when generating HTML forms and reading values from forms. &lt;br /&gt;
&lt;br /&gt;
$fields is a reference to an array of [[API:EPrints/MetaField|EPrints::MetaField]] objects.&lt;br /&gt;
&lt;br /&gt;
$match is one of EQ, IN, EX. default is EQ.&lt;br /&gt;
&lt;br /&gt;
$merge is ANY or ALL. default is ALL&lt;br /&gt;
&lt;br /&gt;
Special case - if match is &amp;quot;EX&amp;quot; and field type is name then value must be a name hash.&lt;br /&gt;
&lt;br /&gt;
$show_help is used to control if the help shows up on the search form. A value of &amp;quot;always&amp;quot; shows the help without the show/hide toggle. &amp;quot;never&amp;quot; shows no help and no toggle. &amp;quot;toggle&amp;quot; shows no help, but shows the [?] icon which will reveal the help. The default is &amp;quot;toggle&amp;quot;. If javascript is off, toggle will show the help and show no toggle.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;match&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; are not explicitly provided the properties of the '''first''' field in the fields will be used. If you are performing a multi-field search you probably want to explicitly set the search type to &amp;quot;IN&amp;quot; (index).&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;clear&lt;br /&gt;
Set this searchfield's &amp;quot;match&amp;quot; to &amp;quot;NO&amp;quot; so that it always returns nothing when searched.&lt;br /&gt;
&lt;br /&gt;
 $problem = $sf-&amp;amp;gt;from_form&lt;br /&gt;
Modify the value, merge and match parameters of this field based on results from an HTML form.&lt;br /&gt;
&lt;br /&gt;
Return undef if everything is OK, otherwise return a ref to an array containing the problems as XHTML DOM objects.&lt;br /&gt;
&lt;br /&gt;
 $search_condition = $sf-&amp;amp;gt;get_conditions &lt;br /&gt;
Convert this Search::Field into an EPrints::Search::Condition object which can actually perform the search.&lt;br /&gt;
&lt;br /&gt;
 $value = $sf-&amp;amp;gt;get_value&lt;br /&gt;
Return the current value parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
Do not do &amp;lt;code&amp;gt;EPrints::Utils::is_set($sf-&amp;lt;/code&amp;gt;get_value)&amp;amp;gt; to test whether the search field is set, see [[API:EPrints/Search/Field#is_set|is_set]] for details.&lt;br /&gt;
&lt;br /&gt;
 $match = $sf-&amp;amp;gt;get_match&lt;br /&gt;
Return the current match parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
 $merge = $sf-&amp;amp;gt;get_merge&lt;br /&gt;
Return the current merge parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
 $field = $sf-&amp;amp;gt;get_field&lt;br /&gt;
Return the first of the metafields which we are searching. This is used for establishing the type of the search field. If this metafield has special input rendering methods then they will be used for this search field.&lt;br /&gt;
&lt;br /&gt;
 $fields = $sf-&amp;amp;gt;get_fields&lt;br /&gt;
Return a reference to an array of EPrints::MetaField objects which  this search field is going to search.&lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;render&lt;br /&gt;
Returns an XHTML tree of this search field which contains all the  input boxes required to search this field. &lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;get_form_prefix&lt;br /&gt;
Return the string use to prefix form field names so values don't get mixed with other search fields.&lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;render_description&lt;br /&gt;
Returns an XHTML DOM object describing this field and its current settings. Used at the top of the search results page to describe the search.&lt;br /&gt;
&lt;br /&gt;
 $xhtml_name = $sf-&amp;amp;gt;render_name&lt;br /&gt;
Return XHTML object of this searchfields name.&lt;br /&gt;
&lt;br /&gt;
 $xhtml_help = $sf-&amp;amp;gt;render_help&lt;br /&gt;
Return an XHTML DOM object containing the &amp;quot;help&amp;quot; for this search field.&lt;br /&gt;
&lt;br /&gt;
 $boolean = $sf-&amp;amp;gt;is_type( @types )&lt;br /&gt;
Return true if the first metafield in the fieldlist is of any of the types in @types.&lt;br /&gt;
&lt;br /&gt;
 $id = $sf-&amp;amp;gt;get_id&lt;br /&gt;
Return the string ID of this searchfield. It is the &amp;quot;id&amp;quot; specified when the string was configured, or failing that the names of all the metafields it searches, joined with a slash &amp;quot;/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 $boolean = $sf-&amp;amp;gt;is_set&lt;br /&gt;
Returns true if this search field has a value to search.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;EX&amp;quot; matches this will always return true unless the %opts form of the constructor was used '''without a value option'''. This is because &amp;quot;&amp;quot; is a valid search value in &amp;quot;EX&amp;quot; searches (but by EPrints definitions is &amp;quot;not set&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 $string = $sf-&amp;amp;gt;serialise&lt;br /&gt;
Serialise the parameters of this search field into a string.&lt;br /&gt;
&lt;br /&gt;
 $sf = EPrints::Search::Field-&amp;amp;gt;unserialise( %opts )&lt;br /&gt;
&amp;lt;pre&amp;gt;  repository&lt;br /&gt;
  dataset&lt;br /&gt;
  string&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Convert a serialised searchfield back into a search field.&lt;br /&gt;
&lt;br /&gt;
 $boolean  = $sf-&amp;amp;gt;get_include_in_description&lt;br /&gt;
Change the dataset of this searchfield. This is probably a bad idea, except moving between two datasets with the same confid. eg. buffer and inbox.&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;set_include_in_description( $boolean )&lt;br /&gt;
If set to zero then this search field will not be included in  descriptions of the search.&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;set_dataset( $datasetid )&lt;br /&gt;
Change the dataset of this searchfield. This is probably a bad idea, except moving between two datasets with the same confid. eg. buffer and inbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Search&amp;diff=10812</id>
		<title>API:EPrints/Search</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Search&amp;diff=10812"/>
		<updated>2013-07-24T10:58:44Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Search.pm|package_name=EPrints::Search}}[[Category:API|SEARCH]][[Category:API:EPrints/Search|SEARCH]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Search - retrieve objects based on search criteria&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
The Search object represents the conditions of a single  search.&lt;br /&gt;
&lt;br /&gt;
Executing a search returns an [[API:EPrints/List|EPrints::List]] object.&lt;br /&gt;
&lt;br /&gt;
A search expression can also render itself as a web-form, populate itself with values from that web-form and render the results as a web page.&lt;br /&gt;
&lt;br /&gt;
[[API:EPrints/Search/Plugin|EPrints::Search::Plugin]] provides a pluggable architecture for searching EPrints.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_searching_for_eprints --&amp;gt;&lt;br /&gt;
===Searching for Eprints===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $ds = $repo-&amp;amp;gt;dataset( &amp;quot;archive&amp;quot; );&lt;br /&gt;
  &lt;br /&gt;
  # NB 'archive' is an implicit filter on eprint.status&lt;br /&gt;
  $list = $ds-&amp;gt;search(filters =&amp;gt; [{&lt;br /&gt;
    meta_fields =&amp;gt; [qw( eprintid )], value =&amp;gt; 23,&lt;br /&gt;
  }]);&lt;br /&gt;
  &lt;br /&gt;
  $list = $ds-&amp;gt;search(search_fields =&amp;gt; [{&lt;br /&gt;
    meta_fields =&amp;gt; [qw( creators_name )], value =&amp;gt; &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
  }]);&lt;br /&gt;
  &lt;br /&gt;
  $searchexp = $ds-&amp;gt;prepare_search();&lt;br /&gt;
  $searchexp-&amp;gt;add_field(&lt;br /&gt;
    fields =&amp;gt; [&lt;br /&gt;
      $ds-&amp;gt;field('creators_name')&lt;br /&gt;
    ],&lt;br /&gt;
    value =&amp;gt; &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
    match =&amp;gt; &amp;quot;EQ&amp;quot;, # EQuals&lt;br /&gt;
  );&lt;br /&gt;
  $searchexp-&amp;gt;add_field(&lt;br /&gt;
    fields =&amp;gt; [&lt;br /&gt;
      $ds-&amp;gt;field('title')&lt;br /&gt;
    ],&lt;br /&gt;
    value =&amp;gt; &amp;quot;eagle buzzard&amp;quot;,&lt;br /&gt;
    match =&amp;gt; &amp;quot;IN&amp;quot;, # INdex&lt;br /&gt;
  );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/DataSet|EPrints::DataSet]] for more API methods for constructing search objects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_getting_results --&amp;gt;&lt;br /&gt;
===Getting Results===&lt;br /&gt;
&amp;lt;pre&amp;gt;  $list = $searchexp-&amp;amp;gt;perform_search;&lt;br /&gt;
  &lt;br /&gt;
  my $count = $list-&amp;gt;count;&lt;br /&gt;
  &lt;br /&gt;
  my $ids = $results-&amp;gt;ids( 0, 10 );&lt;br /&gt;
  my $ids = $results-&amp;gt;ids; # Get all matching ids&lt;br /&gt;
  &lt;br /&gt;
  my $info = { matches =&amp;gt; 0 };&lt;br /&gt;
  sub fn {&lt;br /&gt;
    my( $session, $dataset, $eprint, $info ) = @_;&lt;br /&gt;
    $info-&amp;gt;{matches}++;&lt;br /&gt;
  };&lt;br /&gt;
  $list-&amp;gt;map( \&amp;amp;fn, $info );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/List|EPrints::List]] for more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp = EPrints::Search-&amp;gt;new( %params )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new search expression.&lt;br /&gt;
&lt;br /&gt;
The parameters are split into two parts. The general parameters and those which influence how the HTML form is rendered, and the results displayed.&lt;br /&gt;
&lt;br /&gt;
GENERAL PARAMETERS&lt;br /&gt;
&lt;br /&gt;
* session (required)&lt;br /&gt;
: The current [[API:EPrints/Session|EPrints::Session]]&lt;br /&gt;
&lt;br /&gt;
* dataset OR dataset_id (required)&lt;br /&gt;
: Either the [[API:EPrints/DataSet|EPrints::DataSet]] to search, or the ID of it.&lt;br /&gt;
&lt;br /&gt;
* allow_blank (default 0)&lt;br /&gt;
: Unless this is set, a search with no conditions will return zero records  rather than all records.&lt;br /&gt;
&lt;br /&gt;
* satisfy_all (default 1)&lt;br /&gt;
: If this is true than all search-fields much be satisfied, if false then  results matching any search-field will be returned.&lt;br /&gt;
&lt;br /&gt;
* search_fields&lt;br /&gt;
: A reference to an array of search field configuration structures. Each  takes the form { id=&amp;amp;gt;&amp;quot;...&amp;quot;, default=&amp;amp;gt;&amp;quot;..&amp;quot;, meta_fields=&amp;amp;gt;&amp;quot;...&amp;quot; } where the meaning is the same as for search configuration in ArchiveConfig.&lt;br /&gt;
&lt;br /&gt;
: Search fields can also be added to the search expression after it has been constructed.&lt;br /&gt;
&lt;br /&gt;
* order&lt;br /&gt;
: The order the results should be returned. This is a key to the list of orders available to this dataset, defined in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
* custom_order&lt;br /&gt;
: &amp;quot;order&amp;quot; limits you to the orders specified in ArchiveConfig, and is usually used by the web page based searching. custom_order allows you to specify any order you like. The format is  foo/-bar. This means that the results will be sorted by foo and then any with equal foo values will be reverse sorted by bar. More than 2 fields can be specified.&lt;br /&gt;
&lt;br /&gt;
* keep_cache&lt;br /&gt;
: If true then the search results produced will be stored in the database even after the current script ends. This is useful for speeding up  page 2 onwards of a search.&lt;br /&gt;
&lt;br /&gt;
: keep_cache may get set to true anyway for various reasons, but setting the parameter makes certain of it.&lt;br /&gt;
&lt;br /&gt;
* cache_id&lt;br /&gt;
: The ID of a cached search. The cache contains both the results of the search, and the parameters used for the search.&lt;br /&gt;
&lt;br /&gt;
: If the cache still exists, it will set the default values of the  search fields, and when the search is performed it will skip the  search and build a search results object directly from the cache.&lt;br /&gt;
&lt;br /&gt;
* limit&lt;br /&gt;
: Limit the number of matching records to limit.&lt;br /&gt;
&lt;br /&gt;
WEB PAGE RELATED PARAMETERS&lt;br /&gt;
&lt;br /&gt;
* prefix (default &amp;quot;&amp;quot;)&lt;br /&gt;
: When generating the web form and reading back from the web form, the prefix is inserted before the form names of all fields. This is useful if you need to put two search expressions in a single form for some reason.&lt;br /&gt;
&lt;br /&gt;
* staff (default 0)&lt;br /&gt;
: If true then this is a &amp;quot;staff&amp;quot; search, which prevents searching unless the user is staff, and the results link to the staff URL of an item rather than the public URL.&lt;br /&gt;
&lt;br /&gt;
* filters&lt;br /&gt;
: A reference to an array of filter definitions.&lt;br /&gt;
&lt;br /&gt;
: Filter definitions take the form of: { value=&amp;amp;gt;&amp;quot;..&amp;quot;, match=&amp;amp;gt;&amp;quot;..&amp;quot;, merge=&amp;amp;gt;&amp;quot;..&amp;quot;, id=&amp;amp;gt;&amp;quot;..&amp;quot; } and work much like normal search fields except that they do not appear in the web form so force certain search parameters on the user.&lt;br /&gt;
&lt;br /&gt;
: An optional parameter of describe=&amp;amp;gt;0 can be set to supress the filter being mentioned in the description of the search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_cache --&amp;gt;&lt;br /&gt;
===from_cache===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $thing-&amp;gt;from_cache( $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Populate this search expression with values from the given cache.&lt;br /&gt;
&lt;br /&gt;
Return false if the cache does not exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_field --&amp;gt;&lt;br /&gt;
===add_field===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchfield = $searchexp-&amp;gt;add_field( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;  fields - one or more fields to search over&lt;br /&gt;
  match - match type&lt;br /&gt;
  merge - merge type&lt;br /&gt;
  value - value to match against (for EX matches, NULL = is_null!)&lt;br /&gt;
  id - search field id, if not the name of the first field&lt;br /&gt;
  filter - is filter-type&lt;br /&gt;
  show_help - show help in search input&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a new search in $fields which is either a single [[API:EPrints/MetaField|EPrints::MetaField]] or a list of fields in an array ref with default $value. If a search field already exists, the value of that field is replaced with $value.&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/Search/Field|EPrints::Search::Field]] for details on match/merge etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clear --&amp;gt;&lt;br /&gt;
===clear===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;clear&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Clear the search values of all search fields in the expression.&lt;br /&gt;
&lt;br /&gt;
Resets satisfy_all to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_satisfy_all --&amp;gt;&lt;br /&gt;
===get_satisfy_all===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $searchexp-&amp;gt;get_satisfy_all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return true if this search requires that all the search fields with values are satisfied. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_blank --&amp;gt;&lt;br /&gt;
===is_blank===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $searchexp-&amp;gt;is_blank&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return true is this searchexpression has no conditions set, otherwise true.&lt;br /&gt;
&lt;br /&gt;
If any field is set to &amp;quot;exact&amp;quot; then it can never count as unset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise --&amp;gt;&lt;br /&gt;
===serialise===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$string = $searchexp-&amp;gt;serialise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a text representation of the search expression, for persistent storage. Doesn't store table or the order by fields, just the field names, values, default order and satisfy_all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_from_string --&amp;gt;&lt;br /&gt;
===from_string===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;from_string( $string )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Unserialises the contents of $string but only into the fields alrdeady existing in $searchexp. Set the order and satisfy_all mode but do not  affect the dataset or allow blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clone --&amp;gt;&lt;br /&gt;
===clone===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$newsearchexp = $searchexp-&amp;gt;clone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a new search expression which is a duplicate of this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_conditons --&amp;gt;&lt;br /&gt;
===get_conditons===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$conditions = $searchexp-&amp;gt;get_conditons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a tree of [[API:EPrints/Search/Condition|EPrints::Search::Condition]] objects describing the simple steps required to perform this search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset --&amp;gt;&lt;br /&gt;
===get_dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = $searchexp-&amp;gt;get_dataset&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/DataSet|EPrints::DataSet]] which this search relates to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_dataset --&amp;gt;&lt;br /&gt;
===set_dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;set_dataset( $dataset )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the [[API:EPrints/DataSet|EPrints::DataSet]] which this search relates to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_description --&amp;gt;&lt;br /&gt;
===render_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of this search expressions current parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_conditions_description --&amp;gt;&lt;br /&gt;
===render_conditions_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_conditions_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of this search expressions conditions. ie title is &amp;quot;foo&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_order_description --&amp;gt;&lt;br /&gt;
===render_order_description===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $searchexp-&amp;gt;render_order_description&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an XHTML DOM description of how this search is ordered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_property --&amp;gt;&lt;br /&gt;
===set_property===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$searchexp-&amp;gt;set_property( $property, $value );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set any single property of this search, such as the order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_searchfields --&amp;gt;&lt;br /&gt;
===get_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_searchfields()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/Search/Field|EPrints::Search::Field]] objects relating to this search.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_non_filter_searchfields --&amp;gt;&lt;br /&gt;
===get_non_filter_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_non_filter_searchfields();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the [[API:EPrints/Search/Field|EPrints::Search::Field]] objects relating to this search, which are normal search fields, and not &amp;quot;filters&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_set_searchfields --&amp;gt;&lt;br /&gt;
===get_set_searchfields===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@search_fields = $searchexp-&amp;gt;get_set_searchfields&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the searchfields belonging to this search expression which have a value set. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_cache_id --&amp;gt;&lt;br /&gt;
===get_cache_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$cache_id = $searchexp-&amp;gt;get_cache_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the ID of the cache containing the results of this search, if known.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_search --&amp;gt;&lt;br /&gt;
===perform_search===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$results = $searchexp-&amp;gt;perform_search&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute this search and return a [[API:EPrints/List|EPrints::List]] object representing the results.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_distinctby --&amp;gt;&lt;br /&gt;
===perform_distinctby===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ids_map = $searchexp-&amp;gt;perform_distinctby( $fields )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Perform a DISTINCT on $fields to find all unique ids by value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_perform_groupby --&amp;gt;&lt;br /&gt;
===perform_groupby===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;($values, $counts) = $searchexp-&amp;gt;perform_groupby( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Perform a SQL GROUP BY on $field based on the current search parameters.&lt;br /&gt;
&lt;br /&gt;
Returns two array references, one containing a list of unique values and one a list of counts for each value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_ids_by_field_values --&amp;gt;&lt;br /&gt;
===get_ids_by_field_values===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$hash = $searchexp-&amp;gt;get_ids_by_field_values( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find the ids for each unique value in $field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Search/Field&amp;diff=10811</id>
		<title>API:EPrints/Search/Field</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Search/Field&amp;diff=10811"/>
		<updated>2013-07-24T10:57:51Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Search/Field.pm|package_name=EPrints::Search::Field}}[[Category:API|FIELD]][[Category:API:EPrints/Search|FIELD]][[Category:API:EPrints/Search/Field|FIELD]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Search::Field - one criteria in a search expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class represents a single criteria in a search expression and by extension a search form.&lt;br /&gt;
&lt;br /&gt;
It can search over several [[API:EPrints/MetaField|EPrints::MetaField]]s, and the value of the search field is usually a string containing a list of whitespace separated words.&lt;br /&gt;
&lt;br /&gt;
A search field has four key parameters:&lt;br /&gt;
&lt;br /&gt;
1. The list of the metadata fields it searches.&lt;br /&gt;
&lt;br /&gt;
2. The value to search for.&lt;br /&gt;
&lt;br /&gt;
3. The &amp;quot;match&amp;quot; parameter which can be one of:&lt;br /&gt;
&lt;br /&gt;
* match=IN (index)&lt;br /&gt;
: Treat the value as a list of whitespace-seperated words. Search for each one in the full-text index.&lt;br /&gt;
&lt;br /&gt;
: In the case of subjects, match these subject ids or the those of any of their decendants in the subject tree.&lt;br /&gt;
&lt;br /&gt;
* match=EQ (equal)&lt;br /&gt;
: Treat the value as a single string. Match only fields which have this value.&lt;br /&gt;
&lt;br /&gt;
* match=EX (exact)&lt;br /&gt;
: If the value is an empty string then search for fields which are empty, as oppose to skipping this search field.&lt;br /&gt;
&lt;br /&gt;
: In the case of subjects, match the specified subjects, but not their decendants.&lt;br /&gt;
&lt;br /&gt;
* match=SET&lt;br /&gt;
: If the value is non-empty.&lt;br /&gt;
&lt;br /&gt;
* match=NO&lt;br /&gt;
: This is only really used internally, it means the search field will just fail to match anything without doing any actual searching.&lt;br /&gt;
&lt;br /&gt;
4. the &amp;quot;merge&amp;quot; parameter which can be one of:&lt;br /&gt;
&lt;br /&gt;
* merge=ANY &lt;br /&gt;
: Match an item if any of the space-separated words in the value match.&lt;br /&gt;
&lt;br /&gt;
* merge=ALL &lt;br /&gt;
: Match an item only if all of the space-separated words in the value match.&lt;br /&gt;
&lt;br /&gt;
Merge has no affect on &amp;lt;code&amp;gt;EX&amp;lt;/code&amp;gt; matches, which always match the entire value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
===METHODS===&lt;br /&gt;
 $sf = EPrints::Search::Field-&amp;amp;gt;new( %opts )&lt;br /&gt;
&amp;lt;pre&amp;gt;  repository&lt;br /&gt;
  dataset&lt;br /&gt;
  fields - field or fields to search&lt;br /&gt;
  value - value to search for&lt;br /&gt;
  match&lt;br /&gt;
  merge&lt;br /&gt;
  prefix&lt;br /&gt;
  show_help&lt;br /&gt;
  id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $thing = EPrints::Search::Field-&amp;amp;gt;new( $session, $dataset, $fields, $value, [$match], [$merge], [$prefix], [$show_help] )&lt;br /&gt;
Create a new search field object (%opts form is preferred).&lt;br /&gt;
&lt;br /&gt;
$prefix is used when generating HTML forms and reading values from forms. &lt;br /&gt;
&lt;br /&gt;
$fields is a reference to an array of [[API:EPrints/MetaField|EPrints::MetaField]] objects.&lt;br /&gt;
&lt;br /&gt;
$match is one of EQ, IN, EX. default is EQ.&lt;br /&gt;
&lt;br /&gt;
$merge is ANY or ALL. default is ALL&lt;br /&gt;
&lt;br /&gt;
Special case - if match is &amp;quot;EX&amp;quot; and field type is name then value must be a name hash.&lt;br /&gt;
&lt;br /&gt;
$show_help is used to control if the help shows up on the search form. A value of &amp;quot;always&amp;quot; shows the help without the show/hide toggle. &amp;quot;never&amp;quot; shows no help and no toggle. &amp;quot;toggle&amp;quot; shows no help, but shows the [?] icon which will reveal the help. The default is &amp;quot;toggle&amp;quot;. If javascript is off, toggle will show the help and show no toggle.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;match&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; are not explicitly provided the properties of the '''first''' field in the fields will be used. If you are performing a multi-field search you probably want to explicitly set the search type to &amp;quot;IN&amp;quot; (index).&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;clear&lt;br /&gt;
Set this searchfield's &amp;quot;match&amp;quot; to &amp;quot;NO&amp;quot; so that it always returns nothing when searched.&lt;br /&gt;
&lt;br /&gt;
 $problem = $sf-&amp;amp;gt;from_form&lt;br /&gt;
Modify the value, merge and match parameters of this field based on results from an HTML form.&lt;br /&gt;
&lt;br /&gt;
Return undef if everything is OK, otherwise return a ref to an array containing the problems as XHTML DOM objects.&lt;br /&gt;
&lt;br /&gt;
 $search_condition = $sf-&amp;amp;gt;get_conditions &lt;br /&gt;
Convert this Search::Field into an EPrints::Search::Condition object which can actually perform the search.&lt;br /&gt;
&lt;br /&gt;
 $value = $sf-&amp;amp;gt;get_value&lt;br /&gt;
Return the current value parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
Do not do &amp;lt;code&amp;gt;EPrints::Utils::is_set($sf-&amp;lt;/code&amp;gt;get_value)&amp;amp;gt; to test whether the search field is set, see [[API:EPrints/Search/Field#is_set|is_set]] for details.&lt;br /&gt;
&lt;br /&gt;
 $match = $sf-&amp;amp;gt;get_match&lt;br /&gt;
Return the current match parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
 $merge = $sf-&amp;amp;gt;get_merge&lt;br /&gt;
Return the current merge parameter of this search field.&lt;br /&gt;
&lt;br /&gt;
 $field = $sf-&amp;amp;gt;get_field&lt;br /&gt;
Return the first of the metafields which we are searching. This is used for establishing the type of the search field. If this metafield has special input rendering methods then they will be used for this search field.&lt;br /&gt;
&lt;br /&gt;
 $fields = $sf-&amp;amp;gt;get_fields&lt;br /&gt;
Return a reference to an array of EPrints::MetaField objects which  this search field is going to search.&lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;render&lt;br /&gt;
Returns an XHTML tree of this search field which contains all the  input boxes required to search this field. &lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;get_form_prefix&lt;br /&gt;
Return the string use to prefix form field names so values don't get mixed with other search fields.&lt;br /&gt;
&lt;br /&gt;
 $xhtml = $sf-&amp;amp;gt;render_description&lt;br /&gt;
Returns an XHTML DOM object describing this field and its current settings. Used at the top of the search results page to describe the search.&lt;br /&gt;
&lt;br /&gt;
 $xhtml_name = $sf-&amp;amp;gt;render_name&lt;br /&gt;
Return XHTML object of this searchfields name.&lt;br /&gt;
&lt;br /&gt;
 $xhtml_help = $sf-&amp;amp;gt;render_help&lt;br /&gt;
Return an XHTML DOM object containing the &amp;quot;help&amp;quot; for this search field.&lt;br /&gt;
&lt;br /&gt;
 $boolean = $sf-&amp;amp;gt;is_type( @types )&lt;br /&gt;
Return true if the first metafield in the fieldlist is of any of the types in @types.&lt;br /&gt;
&lt;br /&gt;
 $id = $sf-&amp;amp;gt;get_id&lt;br /&gt;
Return the string ID of this searchfield. It is the &amp;quot;id&amp;quot; specified when the string was configured, or failing that the names of all the metafields it searches, joined with a slash &amp;quot;/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 $boolean = $sf-&amp;amp;gt;is_set&lt;br /&gt;
Returns true if this search field has a value to search.&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;EX&amp;quot; matches this will always return true unless the %opts form of the constructor was used '''without a value option'''. This is because &amp;quot;&amp;quot; is a valid search value in &amp;quot;EX&amp;quot; searches (but by EPrints definitions is &amp;quot;not set&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 $string = $sf-&amp;amp;gt;serialise&lt;br /&gt;
Serialise the parameters of this search field into a string.&lt;br /&gt;
&lt;br /&gt;
 $sf = EPrints::Search::Field-&amp;amp;gt;unserialise( %opts )&lt;br /&gt;
&amp;lt;pre&amp;gt;  repository&lt;br /&gt;
  dataset&lt;br /&gt;
  string&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Convert a serialised searchfield back into a search field.&lt;br /&gt;
&lt;br /&gt;
 $boolean  = $sf-&amp;amp;gt;get_include_in_description&lt;br /&gt;
Change the dataset of this searchfield. This is probably a bad idea, except moving between two datasets with the same confid. eg. buffer and inbox.&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;set_include_in_description( $boolean )&lt;br /&gt;
If set to zero then this search field will not be included in  descriptions of the search.&lt;br /&gt;
&lt;br /&gt;
 $sf-&amp;amp;gt;set_dataset( $datasetid )&lt;br /&gt;
Change the dataset of this searchfield. This is probably a bad idea, except moving between two datasets with the same confid. eg. buffer and inbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2013 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=Installing_EPrints_3_on_Win32&amp;diff=10784</id>
		<title>Installing EPrints 3 on Win32</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=Installing_EPrints_3_on_Win32&amp;diff=10784"/>
		<updated>2013-05-31T15:56:43Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Installation}}&lt;br /&gt;
{{Version|since=3.2.1}}&lt;br /&gt;
&lt;br /&gt;
This page contains notes concerning installing version EPrints 3.3 on Win32-based platforms. Windows is not a well-supported platform and these instructions are likely to go out of date, due to the complexity of getting a working Apache-Perl environment working.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
* Microsoft Windows XP or later&lt;br /&gt;
* Apache 2.0 or later&lt;br /&gt;
* MySQL 5 or later&lt;br /&gt;
* ModPerl 2.0 or later&lt;br /&gt;
&lt;br /&gt;
For indexing and thumbnailing you will also need:&lt;br /&gt;
&lt;br /&gt;
* [http://www.imagemagick.org/ ImageMagick]&lt;br /&gt;
* [http://www.foolabs.com/xpdf/ xpdf] (for the pdftotext utility)&lt;br /&gt;
* [http://gnuwin32.sourceforge.net/ GNU Win32 tools]&lt;br /&gt;
&lt;br /&gt;
==Download EPrints Windows Installation Package (MSI)==&lt;br /&gt;
&lt;br /&gt;
Download the latest Win32 build from the link at the top of this page - do not install this until ALL supporting software is in place and in the places outlined!&lt;br /&gt;
&lt;br /&gt;
==Supporting Software==&lt;br /&gt;
&lt;br /&gt;
===MySQL===&lt;br /&gt;
&lt;br /&gt;
Download and install 64bit MySQL from http://dev.mysql.com/downloads/mysql/&lt;br /&gt;
&lt;br /&gt;
During the MySQL configuration Wizard:&lt;br /&gt;
&lt;br /&gt;
* Change default character set to '''Best support For Multilingualism'''&lt;br /&gt;
&lt;br /&gt;
===Apache===&lt;br /&gt;
&lt;br /&gt;
Download and install the 64bit Apache '''2.2''' from http://www.apachelounge.com/download/ to C:\Apache2.&lt;br /&gt;
&lt;br /&gt;
* Add '''C:\Apache2\bin''' to the windows path environment variable. Failure to add this path will result with a missing libaprutil-1.dll error when you attempt to run EPrints.&lt;br /&gt;
&lt;br /&gt;
===Perl===&lt;br /&gt;
&lt;br /&gt;
Download and install the 64bit Strawberry Perl 5.16 from http://strawberryperl.com/ to C:\Strawberry&lt;br /&gt;
&lt;br /&gt;
==Nod_Perl==&lt;br /&gt;
&lt;br /&gt;
Download and install the 64bit mod_perl for Strawberry Perl 5.16 from http://people.apache.org/~stevehay/.&lt;br /&gt;
&lt;br /&gt;
===Perl Modules===&lt;br /&gt;
&lt;br /&gt;
At a command-prompt run:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cpan install Win32-Daemon&lt;br /&gt;
 &amp;gt; cpan install Win32-DriveInfo&lt;br /&gt;
&lt;br /&gt;
===Indexing and Thumbnailing Tools===&lt;br /&gt;
&lt;br /&gt;
To get indexing and thumbnailing working will require some configuration file changes.&lt;br /&gt;
&lt;br /&gt;
When you have installed a tool you need to tell EPrints where to find it. Edit perl_lib\EPrints\SystemSettings.pm:&lt;br /&gt;
&lt;br /&gt;
 $EPrints::SystemSettings::conf = {&lt;br /&gt;
  ...,&lt;br /&gt;
  executables =&amp;gt; {&lt;br /&gt;
   convert =&amp;gt; '/ImageMagick/convert.exe',&lt;br /&gt;
   pdftotext =&amp;gt; '/xpdf/pdftotext.exe',&lt;br /&gt;
  },&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
For a full list of tools look in lib\syscfg.d\executables.pl.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
Edit the Apache configuration file '''C:\Apache2\conf\httpd.conf''' and add below the last LoadModule line:&lt;br /&gt;
&lt;br /&gt;
 # LoadFile C:/perl/bin/perl510.dll # Not necessary?&lt;br /&gt;
 LoadModule perl_module modules/mod_perl.so&lt;br /&gt;
&lt;br /&gt;
And at the end of the file:&lt;br /&gt;
&lt;br /&gt;
 Include C:/eprints/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
To create the indexer service entries (EPrints 3.3+), as administrator run:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; perl C:\eprints\bin\indexer install&lt;br /&gt;
&lt;br /&gt;
Before starting Apache configure a new repository, see [[Getting Started with EPrints 3]].&lt;br /&gt;
&lt;br /&gt;
You will need to manually restart the indexer if you change the repository configuration.&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/RepositoryConfig&amp;diff=10731</id>
		<title>API:EPrints/RepositoryConfig</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/RepositoryConfig&amp;diff=10731"/>
		<updated>2013-01-30T16:24:43Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/RepositoryConfig.pm|package_name=EPrints::RepositoryConfig}}[[Category:API|REPOSITORYCONFIG]][[Category:API:EPrints/RepositoryConfig|REPOSITORYCONFIG]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::RepositoryConfig''' - Repository Configuration&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE (2013-01-30)''': The example below uses '${$params{rc}}'. It should be ${$params{return_code}}.&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$c-&amp;gt;add_dataset_field( &amp;quot;eprint&amp;quot;, {&lt;br /&gt;
	name =&amp;gt; &amp;quot;title&amp;quot;,&lt;br /&gt;
	type =&amp;gt; &amp;quot;longtext&amp;quot;,&lt;br /&gt;
}, reuse =&amp;gt; 1 );&lt;br /&gt;
&lt;br /&gt;
$c-&amp;gt;add_trigger( EP_TRIGGER_URL_REWRITE, sub {&lt;br /&gt;
	my( %params ) = @_;&lt;br /&gt;
&lt;br /&gt;
	my $r = $params{request};&lt;br /&gt;
&lt;br /&gt;
	my $uri = $params{uri};&lt;br /&gt;
	if( $uri =~ m{^/blog/} )&lt;br /&gt;
	{&lt;br /&gt;
		$r-&amp;gt;err_headers_out-&amp;gt;{Location} = &amp;quot;http://...&amp;quot;;&lt;br /&gt;
		${$params{return_code}} = EPrints::Const::HTTP_SEE_OTHER;&lt;br /&gt;
		return EP_TRIGGER_DONE;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return EP_TRIGGER_OK;&lt;br /&gt;
});&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This provides methods for reading and setting a repository configuration. Setter methods may only be used in the configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_setter_methods --&amp;gt;&lt;br /&gt;
===Setter Methods===&lt;br /&gt;
 $c-&amp;amp;gt;add_dataset_trigger( $datasetid, TRIGGER_ID, $f, %opts )&lt;br /&gt;
Register a function reference $f to be called when the TRIGGER_ID event happens on $datasetid.&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/Const|EPrints::Const]] for available triggers.&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/RepositoryConfig#add_trigger|add_trigger]] for %opts.&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;amp;gt;add_trigger( TRIGGER_ID, $f, %opts )&lt;br /&gt;
Register a function reference $f to be called when the TRIGGER_ID event happens.&lt;br /&gt;
&lt;br /&gt;
See [[API:EPrints/Const|EPrints::Const]] for available triggers.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  priority - used to determine the order triggers are executed in (defaults to 0).&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;amp;gt;add_dataset_field( $datasetid, $fielddata, %opts )&lt;br /&gt;
Add a field spec $fielddata to dataset $datasetid.&lt;br /&gt;
&lt;br /&gt;
This method will abort if the field already exists and 'reuse' is unspecified.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
	reuse - re-use an existing field if it exists (must be same type)&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;amp;gt;push( KEY1 [, KEY2 ], VALUE )&lt;br /&gt;
Push a value onto a configuration slot that is an array ref. VALUE may be an array ref in which case each value is pushed onto the existing list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/indexer&amp;diff=10727</id>
		<title>API:bin/indexer</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/indexer&amp;diff=10727"/>
		<updated>2013-01-22T09:57:24Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/indexer|package_name=bin/indexer}}[[Category:API|BIN/INDEXER]][[Category:API:bin/indexer|BIN/INDEXER]][[Category:API:bin/indexer|BIN/INDEXER]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''indexer''' - Indexing daemon for EPrints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''indexer''' start ['''options''']&lt;br /&gt;
&lt;br /&gt;
'''indexer''' stop &lt;br /&gt;
&lt;br /&gt;
'''indexer''' status&lt;br /&gt;
&lt;br /&gt;
'''indexer''' install&lt;br /&gt;
&lt;br /&gt;
'''indexer''' uninstall&lt;br /&gt;
&lt;br /&gt;
'''indexer''' debug&lt;br /&gt;
&lt;br /&gt;
'''indexer''' --help&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This daemon runs in the background and creates index files for all eprints repositories.&lt;br /&gt;
&lt;br /&gt;
Messages and errors are logged to /opt/eprints3/var/indexer.log unless you change the log options. If it appears to be having problems try raising the log level and examining the log.&lt;br /&gt;
&lt;br /&gt;
Once every 24 hours, the indexer rolls the logs (up to logfile.5) and then starts again. See --rollcount for ways to customise this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--force'''&lt;br /&gt;
: Start up, even if the PID file exists (implying another copy is running). This is useful for starting after a crash, but be carefully not to run to copies at once as BAD THINGS will happen.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--clear'''&lt;br /&gt;
: Clear broken event queue items (items that are &amp;quot;inprogress&amp;quot; or &amp;quot;failed&amp;quot;) before commencing.&lt;br /&gt;
&lt;br /&gt;
* '''--retry'''&lt;br /&gt;
: Retry broken event queue items (items that are &amp;quot;inprogress&amp;quot; or &amp;quot;failed&amp;quot;) before commencing.&lt;br /&gt;
&lt;br /&gt;
* '''--logfile''' &amp;lt;em&amp;gt;filename&amp;lt;/em&amp;gt;&lt;br /&gt;
: Log to &amp;lt;em&amp;gt;filename&amp;lt;/em&amp;gt; rather than default indexer log.&lt;br /&gt;
&lt;br /&gt;
* '''--loglevel''' &amp;lt;em&amp;gt;level&amp;lt;/em&amp;gt;&lt;br /&gt;
: Set the level of detail to log. Level may be 0-6.&lt;br /&gt;
&lt;br /&gt;
* '''--rollcount''' &amp;lt;em&amp;gt;number&amp;lt;/em&amp;gt;&lt;br /&gt;
: Set the number of once-through logs that should be kept. If set to zero then indexer will never roll the logs but rather just keep writing to the main log.&lt;br /&gt;
&lt;br /&gt;
* '''--respawn''' &amp;lt;em&amp;gt;seconds&amp;lt;/em&amp;gt;&lt;br /&gt;
: Respawn the indexer every &amp;lt;em&amp;gt;seconds&amp;lt;/em&amp;gt; (rolls the log files).&lt;br /&gt;
&lt;br /&gt;
* '''--notdaemon'''&lt;br /&gt;
: Do not become a daemon, remain attached to the current terminal.&lt;br /&gt;
&lt;br /&gt;
: Log goes to STDERR instead of the log file.&lt;br /&gt;
&lt;br /&gt;
: Does not create a .pid file.&lt;br /&gt;
&lt;br /&gt;
* '''--once'''&lt;br /&gt;
: Only clear the current queue of things needing indexing then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_making_into_a_service --&amp;gt;&lt;br /&gt;
==Making into a service ==&lt;br /&gt;
This has only been tested under redhat linux. It make work on other OS's, but not promise.&lt;br /&gt;
&lt;br /&gt;
To make the indexer into a service which starts and stops on reboots etc. like httpd and mysqld do the following (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ln -s /opt/eprints3/bin/epindexer /etc/init.d/epindexer &lt;br /&gt;
 chkconfig --add epindexer&lt;br /&gt;
 chkconfig epindexer on&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The epindexer script runs as root, changes user to &amp;quot;eprints&amp;quot; (or whatever uid your eprints install runs as) and then calls indexer. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/import&amp;diff=10728</id>
		<title>API:bin/import</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/import&amp;diff=10728"/>
		<updated>2013-01-22T09:57:24Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/import|package_name=bin/import}}[[Category:API|BIN/IMPORT]][[Category:API:bin/import|BIN/IMPORT]][[Category:API:bin/import|BIN/IMPORT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''import''' - Import a file using an import plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''import''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''import''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt; &amp;lt;em&amp;gt;plugin&amp;lt;/em&amp;gt; &amp;lt;em&amp;gt;filename&amp;lt;/em&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This command imports a set of EPrints from a file into the given dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; &lt;br /&gt;
: The ID of the EPrint repository to import to.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt;&lt;br /&gt;
: The name of the dataset to import into, such as &amp;quot;eprint&amp;quot;,&amp;quot;archive&amp;quot;, &amp;quot;subject&amp;quot; or &amp;quot;user&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Please note that for the &amp;quot;subject&amp;quot; dataset, you are probably better off using the import_subjects tool which will empty the dataset before importing.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;plugin&amp;lt;/em&amp;gt;&lt;br /&gt;
: The id of the input plugin to use. This should not include the leading &amp;quot;Import::&amp;quot;. Examples: BibTeX, XML.&lt;br /&gt;
&lt;br /&gt;
: If this is ommited or an invalid plugin is requested, then 'import' will list all plugins compatible with the dataset and exit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;filename&amp;lt;/em&amp;gt;&lt;br /&gt;
: Filename to read from. To read from STDIN specify '-'.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--user USERID/USERNAME''' &lt;br /&gt;
: For eprint datasets only. (not user or subject). &lt;br /&gt;
&lt;br /&gt;
: Sets the userid/username of the user in the system who will own the imported records.&lt;br /&gt;
&lt;br /&gt;
: Usually required for importing EPrint records. This may not be required if the import format contains the userid value, eg. an import in the EPrints 3 XML format.&lt;br /&gt;
&lt;br /&gt;
: If this is an integer then it is assumed to be the userid of the user, otherwise it is assumed to be the username.&lt;br /&gt;
&lt;br /&gt;
: You may wish to create one or more &amp;quot;bulk import&amp;quot; users and make imported eprint records belong to them.&lt;br /&gt;
&lt;br /&gt;
* '''--argument key=value'''&lt;br /&gt;
: Add an argument to the import plugin. May be repeated. Effects depend on the import plugin.&lt;br /&gt;
&lt;br /&gt;
* '''--parse-only'''&lt;br /&gt;
: Don't import, just check the file.&lt;br /&gt;
&lt;br /&gt;
* '''--migration'''&lt;br /&gt;
: Turn on all the options needed to correctly import an XML data file exported from version 2, using the migration toolkit. Implies --enable-web-imports --enable-file-imports --force&lt;br /&gt;
&lt;br /&gt;
* '''--enable-import-fields'''&lt;br /&gt;
: Allow the import to set fields that are set as not to be imported. This is typically used to specify the imported object id.&lt;br /&gt;
&lt;br /&gt;
* '''--enable-file-imports'''&lt;br /&gt;
: Allow the imported data to import files from the local filesystem. This can obviously be seen as a security hole if you don't trust the data you are importing. This sets the &amp;quot;enable_file_imports&amp;quot; configuration option for this session only.&lt;br /&gt;
&lt;br /&gt;
* '''--enable-web-imports'''&lt;br /&gt;
: Allow the imported data to import files from the Web. This can obviously be seen as a security hole if you don't trust the data you are importing. This sets the &amp;quot;enable_web_imports&amp;quot; configuration option for this session only.&lt;br /&gt;
&lt;br /&gt;
* '''--xml'''&lt;br /&gt;
: Output to STDOUT the parsed objects in EPrints XML (does not import anything).&lt;br /&gt;
&lt;br /&gt;
* '''--update'''&lt;br /&gt;
: Normally you can not import a new item with the same id as an existing item. With this option enabled existing items will be updated with the new item. Combine with --enable-import-fields to update all field values.&lt;br /&gt;
&lt;br /&gt;
* '''--force'''&lt;br /&gt;
: Don't ask any questions, just do it!&lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
: Shows why a plugin is disabled.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/export&amp;diff=10725</id>
		<title>API:bin/export</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/export&amp;diff=10725"/>
		<updated>2013-01-22T09:57:23Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/export|package_name=bin/export}}[[Category:API|BIN/EXPORT]][[Category:API:bin/export|BIN/EXPORT]][[Category:API:bin/export|BIN/EXPORT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''export''' - export some or all items in a dataset using an output plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''export''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''export''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt; &amp;lt;em&amp;gt;plugin&amp;lt;/em&amp;gt; [&amp;lt;em&amp;gt;objectid&amp;lt;/em&amp;gt;] [&amp;lt;em&amp;gt;objectid...&amp;lt;/em&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This command outputs a dataset in the selected format. The formats available depend on what Export plugins have been installed.&lt;br /&gt;
&lt;br /&gt;
Some plugins only operate on lists (e.g. RSS), others only operate on single objects only. Some plugins act slightly differently in single-item only mode. For example, outputing a list of eprints as XML gives a number of &amp;amp;lt;eprint&amp;amp;gt; elements in an outer &amp;amp;lt;eprints&amp;amp;gt; element. &lt;br /&gt;
&lt;br /&gt;
To get the plugin to export a single item use --single. This may not always return a complete file. For example it may be missing the &amp;amp;lt;?xml header, depending on the plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; &lt;br /&gt;
: The ID of the EPrint repository to use.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;dataset&amp;lt;/em&amp;gt;&lt;br /&gt;
: The name of the dataset to export, such as &amp;quot;archive&amp;quot;, &amp;quot;subject&amp;quot; or &amp;quot;user&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;plugin&amp;lt;/em&amp;gt;&lt;br /&gt;
: The id of the output plugin to use. This should not include the leading &amp;quot;Export::&amp;quot;. Examples: BibTeX, XML.&lt;br /&gt;
&lt;br /&gt;
: If this is ommited or an invalid plugin is requested, then 'export' will list all plugins compatible with the dataset and exit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;objectid&amp;lt;/em&amp;gt;&lt;br /&gt;
: If this is set then just output the single, specified item or items.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--argument key=value'''&lt;br /&gt;
: Add an argument to the export plugin. May be repeated. Effects depend on te export plugin.&lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
: Shows why a plugin is disabled.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/epadmin&amp;diff=10726</id>
		<title>API:bin/epadmin</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/epadmin&amp;diff=10726"/>
		<updated>2013-01-22T09:57:23Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/epadmin|package_name=bin/epadmin}}[[Category:API|BIN/EPADMIN]][[Category:API:bin/epadmin|BIN/EPADMIN]][[Category:API:bin/epadmin|BIN/EPADMIN]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
epadmin - EPrints repository admin tool&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
epadmin '''options''' &amp;lt;em&amp;gt;command&amp;lt;/em&amp;gt; [repository_id]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;em&amp;gt;command&amp;lt;/em&amp;gt; is one of:&lt;br /&gt;
&lt;br /&gt;
* cleanup_cachemaps&lt;br /&gt;
* config_core&lt;br /&gt;
* config_db&lt;br /&gt;
* create&lt;br /&gt;
* create_db&lt;br /&gt;
* create_tables&lt;br /&gt;
* create_user&lt;br /&gt;
* erase_data&lt;br /&gt;
* erase_eprints&lt;br /&gt;
* erase_fulltext_index&lt;br /&gt;
* help&lt;br /&gt;
* profile&lt;br /&gt;
* rebuild_triples&lt;br /&gt;
* recommit&lt;br /&gt;
* reorder&lt;br /&gt;
* redo_files_modified&lt;br /&gt;
* redo_mime_type&lt;br /&gt;
* redo_thumbnails&lt;br /&gt;
* refresh_abstracts&lt;br /&gt;
* refresh_views&lt;br /&gt;
* reindex&lt;br /&gt;
* reload&lt;br /&gt;
* set_developer_mode&lt;br /&gt;
* show_config&lt;br /&gt;
* show_plugins&lt;br /&gt;
* test&lt;br /&gt;
* unit_tests&lt;br /&gt;
* update&lt;br /&gt;
* upgrade&lt;br /&gt;
Type &amp;lt;code&amp;gt;epadmin help command&amp;lt;/code&amp;gt; for further help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_commands --&amp;gt;&lt;br /&gt;
==COMMANDS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create --&amp;gt;&lt;br /&gt;
===create===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin create&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new repository instance based on question-and-answer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_test --&amp;gt;&lt;br /&gt;
===create_test===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin create_test&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a test repository instance called &amp;quot;test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_cleanup_cachemaps --&amp;gt;&lt;br /&gt;
===cleanup_cachemaps===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin cleanup_cachemaps repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Drop any orphaned cache tables.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_config_core --&amp;gt;&lt;br /&gt;
===config_core===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin config_core repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set hostname, contact email and repository name. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_config_db --&amp;gt;&lt;br /&gt;
===config_db===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin config_db repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set database connection properties and, optionally, to create database and database user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_db --&amp;gt;&lt;br /&gt;
===create_db===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin create_db repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a database and database user with the current settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_user --&amp;gt;&lt;br /&gt;
===create_user===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin create_user repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new user. You need to do this to create your first admin account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_delete --&amp;gt;&lt;br /&gt;
===delete===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin delete repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Destroy repository_id and all of its content. Only use if you are absolutely sure you know what you're doing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_help --&amp;gt;&lt;br /&gt;
===help===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin help [command]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show help for &amp;lt;code&amp;gt;epadmin&amp;lt;/code&amp;gt;. Specify a &amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt; to get detailed help on a particular command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_redo_files_modified --&amp;gt;&lt;br /&gt;
===redo_files_modified===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin redo_files_modified repository_id [ dataset objectid, ... ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call [[API:EPrints/DataObj/Document#files_modified|EPrints::DataObj::Document/files_modified]] for every document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_redo_mime_type --&amp;gt;&lt;br /&gt;
===redo_mime_type===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin redo_mime_type repository_id dataset [ objectid, ... ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redo file format identification. Dataset may be &amp;lt;code&amp;gt;eprint&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;document&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_redo_thumbnails --&amp;gt;&lt;br /&gt;
===redo_thumbnails===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin redo_thumbnails repository_id [ eprintid, ... ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regenerate all the thumbnail and image-preview files and any other things which are triggered if the document file changed. Optionally supply a list of eprint ids to re-generate thumbnails for.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_refresh_views --&amp;gt;&lt;br /&gt;
===refresh_views===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin refresh_views repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the webserver that all views pages must be regenerated. The webserver will update them next time they are requested. Also causes config to be reloaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_refresh_abstracts --&amp;gt;&lt;br /&gt;
===refresh_abstracts===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin refresh_abstracts repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the webserver that all abstract summary pages must be regenerated. The webserver will update them next , but won't update them again unless something on the EPrint changes or you re-run refresh abstracts. Also causes config to be reloaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_reload --&amp;gt;&lt;br /&gt;
===reload===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin reload repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cause the web server to reload the repository configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_tables --&amp;gt;&lt;br /&gt;
===create_tables===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin create_tables repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the database tables.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_erase_data --&amp;gt;&lt;br /&gt;
===erase_data===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin erase_data repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Erases and recreates the database. Removes all documents and files. Does not touch the configuration files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_erase_eprints --&amp;gt;&lt;br /&gt;
===erase_eprints===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin erase_eprints repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Erases all the documents and eprints (including their files). Recreates the eprint and document tables. Leaves configuration files and the users and subjects tables alone.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_erase_fulltext_index --&amp;gt;&lt;br /&gt;
===erase_fulltext_index===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin erase_fulltext_index repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This erases all the .words and .indexcodes cache files from your repository, forcing the indexer to rerun the tools used to extract full text from your documents.&lt;br /&gt;
&lt;br /&gt;
This is useful if you only setup the fulltext indexing after your repository is already live, or if you discover there has been a problem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_show_config --&amp;gt;&lt;br /&gt;
===show_config===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin show_config repository_id key1 [key2 ...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dump the given configuration section identified by key1. Use extra keys to get a lower-level configuration setting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_show_plugins --&amp;gt;&lt;br /&gt;
===show_plugins===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin show_plugins repository_id [filters]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dump a list of all enabled plugins. You can constrain this list by providing filters e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  type=Import&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_test --&amp;gt;&lt;br /&gt;
===test===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin test repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A null operation which just checks your configuration files are OK and that you can connect to the database. If no repository_id is specified loads each repository in turn. Use --verbose to generate more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_profile --&amp;gt;&lt;br /&gt;
===profile===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin profile test&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a performance profile of test using {{API:PodLink|file=Devel/NYTProf|package_name=Devel::NYTProf|section=|text=Devel::NYTProf}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_unit_tests --&amp;gt;&lt;br /&gt;
===unit_tests===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin unit_tests&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run unit tests, printing the results to STDOUT. If everything passed will exit with a return code of 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_rehash --&amp;gt;&lt;br /&gt;
===rehash===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin rehash repository_id [document_id]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recalculate the hashes of the files in this document and write it to a probity log file. If a document id is given then just generate the hash for that document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_update --&amp;gt;&lt;br /&gt;
===update===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin update repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will add tables and columns to your SQL database to bring it in-line with your current configuration. It will not remove data. Use with caution on a live database. Database backup is recommended before use on live systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_recommit --&amp;gt;&lt;br /&gt;
===recommit===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin recommit repository_id dataset_id [eprint_id eprint_id ...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recommit all the records in the given dataset. What this does is cause the automatic values to be re-calculated. If a list of eprint_ids is given then just recommit those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_reorder --&amp;gt;&lt;br /&gt;
===reorder===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin reorder repository_id dataset_id [eprint_id eprint_id ...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regenerate the order values for the dataset. If a list of eprint_ids is given then just recalculate ordervalues for those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_rebuild_triples --&amp;gt;&lt;br /&gt;
===rebuild_triples===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin rebuild_triples repository_id [dataset_id item_id item_id ...]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue all the records to have their RDF triple cache rebuilt. This may tie-up the indexer for some time on a large repository. Do this if you have made changes to the way RDF triples are produced from an EPrint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_reindex --&amp;gt;&lt;br /&gt;
===reindex===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin reindex repository_id dataset_id [eprint_id eprint_id ...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Schedule the dataset for reindexing. The indexer will do the actual indexing and it may take some time. This only schedules the reindexing. If a list of eprint_ids is given then just reindex those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_field --&amp;gt;&lt;br /&gt;
===remove_field===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin remove_field repository_id dataset field_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove the database entries for the given field, can not be undone!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_developer_mode --&amp;gt;&lt;br /&gt;
===set_developer_mode===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin set_developer_mode repository_id &amp;amp;lt;on|off&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While set to on developer mode causes the web server to reload the repository configuration on every page request. This makes development much quicker but must not be left switched on in a production environment since it increases server load dramatically.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_upgrade --&amp;gt;&lt;br /&gt;
===upgrade===&lt;br /&gt;
&amp;lt;pre&amp;gt;  epadmin upgrade repository_id&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After upgrading EPrints, use this to update the database tables. It will advise any other tasks that are required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: This option does not do anything.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--force'''&lt;br /&gt;
: Be more forceful (don't ask for confirmation).&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/generate_abstracts&amp;diff=10723</id>
		<title>API:bin/generate abstracts</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/generate_abstracts&amp;diff=10723"/>
		<updated>2013-01-22T09:57:22Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/generate_abstracts|package_name=bin/generate_abstracts}}[[Category:API|BIN/GENERATE_ABSTRACTS]][[Category:API:bin/generate_abstracts|BIN/GENERATE_ABSTRACTS]][[Category:API:bin/generate_abstracts|BIN/GENERATE_ABSTRACTS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''generate_abstracts''' - Regenerate all the static abstract pages for an EPrint repository&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''generate_abstracts''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] [&amp;lt;em&amp;gt;eprintid&amp;lt;/em&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This script recreates every static abstract page for an eprints repository. To save load on the database, as archived data should not change, EPrints creates static webpages containing the summary of each eprint. If you change the way the abstracts are rendered or change the site template then you will want to run this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* '''repository_id''' &lt;br /&gt;
: The ID of the eprint repository to use.&lt;br /&gt;
&lt;br /&gt;
* '''eprintid''' &lt;br /&gt;
: An optional integer indicating that only the abstract page for record &amp;lt;em&amp;gt;eprintid&amp;lt;/em&amp;gt; should be updated. Handy for testing new configurations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/generate_static&amp;diff=10724</id>
		<title>API:bin/generate static</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/generate_static&amp;diff=10724"/>
		<updated>2013-01-22T09:57:22Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/generate_static|package_name=bin/generate_static}}[[Category:API|BIN/GENERATE_STATIC]][[Category:API:bin/generate_static|BIN/GENERATE_STATIC]][[Category:API:bin/generate_static|BIN/GENERATE_STATIC]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''generate_static''' - Generate static pages of an EPrint repository using the template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''generate_static''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This script creates the static web site for EPrints (or, if you are running in multiple lanugages it generates the websites).&lt;br /&gt;
&lt;br /&gt;
It processes every file in '''EPRINTS/archives/ARCHIVE/cfg/static/LANGID/'''. For each language processes all the files in /LANGID/ and /generic/ into '''EPRINTS/archives/ARCHIVE/html/LANGID'''. If that sounds confusing, don't worry, it's not that bad, just put your webpage outlines in static/en/ and your image files and the like in static/generic/ and run this script and see what happens.&lt;br /&gt;
&lt;br /&gt;
Most files are copied into the target directory as is and directory structure is preserved. &lt;br /&gt;
&lt;br /&gt;
Files with a .xpage or .xhtml suffix are processed as they are copied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''.xpage''' &lt;br /&gt;
: This is an XML file with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; standalone=&amp;quot;no&amp;quot; ?&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;!DOCTYPE page SYSTEM &amp;quot;entities.dtd&amp;quot; &amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;page&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;title&amp;amp;gt;This is the page title&amp;amp;lt;/title&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;body&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;p&amp;amp;gt;Some XHTML body&amp;amp;lt;/p&amp;amp;gt;&amp;amp;lt;p&amp;amp;gt;Which is &amp;amp;lt;b&amp;amp;gt;neat&amp;amp;lt;/b&amp;amp;gt;&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/body&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/page&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: The resulting file will be a .html file (foo.xpage becomes foo.html). It will take the template for this repository and insert the title and body from the appropriate places.  It will also cause the the special EPrints entities to be converted as it is copied. See the main documentation.&lt;br /&gt;
&lt;br /&gt;
* '''.xhtml''' &lt;br /&gt;
: This is a normal XHTML file but with the following XML header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; standalone=&amp;quot;no&amp;quot; ?&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;!DOCTYPE html SYSTEM &amp;quot;entities.dtd&amp;quot; &amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: This will cause the the HTML entities to be properly decoded. It will also be renamed to .html for example, foo.xhtml will become foo.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_note_for_the_non_english_majority --&amp;gt;&lt;br /&gt;
==NOTE FOR THE NON-ENGLISH MAJORITY==&lt;br /&gt;
If you are running EPrints in a language other than English then place the static files in a directory of your ISO language ID instead of '''en''', for example French is '''fr'''. The generic directory is for language neutral stuff. Which is extra handy if you want to run the site in more than one language. Also the entities file should be renamed from -en to -whatever eg. '''entities-fr.xml'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* '''repository_id''' &lt;br /&gt;
: The ID of the eprint repository to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--prune'''&lt;br /&gt;
: Remove stray files from the website (eg. if something was removed from the static pages).&lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/import_subjects&amp;diff=10721</id>
		<title>API:bin/import subjects</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/import_subjects&amp;diff=10721"/>
		<updated>2013-01-22T09:57:21Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/import_subjects|package_name=bin/import_subjects}}[[Category:API|BIN/IMPORT_SUBJECTS]][[Category:API:bin/import_subjects|BIN/IMPORT_SUBJECTS]][[Category:API:bin/import_subjects|BIN/IMPORT_SUBJECTS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''import_subjects''' - rebuild an EPrint repository subjects list from the contents of a file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''import_subjects''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] [&amp;lt;em&amp;gt;subjectfile&amp;lt;/em&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Import a set of subjects into an EPrints repository. The subjects are the heirarchical tree of options for &amp;quot;subject&amp;quot; type metadata fields in an eprint repository. &lt;br /&gt;
&lt;br /&gt;
Use the staff admin subject editor for little tweaks. Use this command for the initial setup or bulk editing subjects. Use the exporter to dump the current subjects if you (an administrator) have edited them online.&lt;br /&gt;
&lt;br /&gt;
This script should also be run after '''create_tables'''.&lt;br /&gt;
&lt;br /&gt;
Without the '''--force''' option, this script asks for confirmation before actually erasing anything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; &lt;br /&gt;
: The ID of the EPrint repository to use.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;subjectfile&amp;lt;/em&amp;gt;&lt;br /&gt;
: This is the file to import the subjects from. If you do not specify it then the system will use &amp;quot;subjects&amp;quot; from the given repository cfg directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--xml'''&lt;br /&gt;
: Import XML format instead of flat text.&lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--nopurge'''&lt;br /&gt;
: Do not purge the existing records from the subject table before importing this file. Rather than do this, it's probably easier to export the current subjects as XML, then combine in your new file and reimport it.&lt;br /&gt;
&lt;br /&gt;
* '''--force'''&lt;br /&gt;
: Don't ask before making the changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_file_format --&amp;gt;&lt;br /&gt;
==FILE FORMAT==&lt;br /&gt;
There are two different file formats excepted, the default colon seperated file and XML in the eprints export format. &lt;br /&gt;
&lt;br /&gt;
The colon seperated ASCII is easier to edit, but is more limited. It is not  intended for UTF-8 encoded characters and can only specify subject names in the default language. &lt;br /&gt;
&lt;br /&gt;
The XML format can contain any unicode characters and also allows multiple languages for the names of subjects. You may wish to dump the current subjects out of eprints as XML. Edit it. Then re-import it. The downside is that this format is far more verbose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_the_ascii_default_format --&amp;gt;&lt;br /&gt;
===The ASCII Default Format===&lt;br /&gt;
This is the default format. &lt;br /&gt;
&lt;br /&gt;
Comments may be placed on lines begining with a hash (#)&lt;br /&gt;
&lt;br /&gt;
Each (non-comment) line of the file should be in the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;em&amp;gt;subjectid&amp;lt;/em&amp;gt;:&amp;lt;em&amp;gt;name&amp;lt;/em&amp;gt;:&amp;lt;em&amp;gt;parents&amp;lt;/em&amp;gt;:&amp;lt;em&amp;gt;depositable&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
eg.&lt;br /&gt;
&lt;br /&gt;
blgc-bphy:Biophysics:blgc,phys:1&lt;br /&gt;
&lt;br /&gt;
Please see the main documentation for the meaning of these fields.&lt;br /&gt;
&lt;br /&gt;
* '''subjectid''' &lt;br /&gt;
: An ASCII string which is a unique ID for this subject.&lt;br /&gt;
&lt;br /&gt;
* '''name''' &lt;br /&gt;
: The name of this subject, in the default language of the repository.&lt;br /&gt;
&lt;br /&gt;
* '''parents''' &lt;br /&gt;
: A comma seperated list of the parents of this subject. Be careful not to cause loops. The top level subject id is ROOT and should not be imported as it always exists.&lt;br /&gt;
&lt;br /&gt;
* '''depositable''' &lt;br /&gt;
: A boolean value ( 1 or 0 ) which indicates if this subject may have eprints associated with it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_the_xml_file_format --&amp;gt;&lt;br /&gt;
===The XML File Format===&lt;br /&gt;
This is the standard eprints export format. It looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;eprintsdata&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;record&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;field name=&amp;quot;subjectid&amp;quot;&amp;amp;gt;phys&amp;amp;lt;/field&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;field name=&amp;quot;name&amp;quot;&amp;amp;gt;&amp;amp;lt;lang id=&amp;quot;en&amp;quot;&amp;amp;gt;Physical Sciences &amp;amp;amp;amp; Mathematics&amp;amp;lt;/lang&amp;amp;gt;&amp;amp;lt;/field&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;field name=&amp;quot;parents&amp;quot;&amp;amp;gt;subjects&amp;amp;lt;/field&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;field name=&amp;quot;depositable&amp;quot;&amp;amp;gt;FALSE!/field!&lt;br /&gt;
    &amp;amp;lt;/record&amp;amp;gt;&lt;br /&gt;
    .&lt;br /&gt;
    .&lt;br /&gt;
    .&lt;br /&gt;
  &amp;amp;lt;/eprintsdata&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fields have the same meaning as described for the ASCII format, with the following variations. The name field can (and should) have a name for each language supported by the repository. Multiple parents are indicated by multiple &amp;lt;code&amp;gt;&amp;amp;lt;lt&amp;lt;/code&amp;gt;field name=&amp;quot;parents&amp;amp;lt;gt&amp;amp;gt;&amp;amp;gt; elements. Depositable should be either TRUE or FALSE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/generate_apacheconf&amp;diff=10722</id>
		<title>API:bin/generate apacheconf</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/generate_apacheconf&amp;diff=10722"/>
		<updated>2013-01-22T09:57:21Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/generate_apacheconf|package_name=bin/generate_apacheconf}}[[Category:API|BIN/GENERATE_APACHECONF]][[Category:API:bin/generate_apacheconf|BIN/GENERATE_APACHECONF]][[Category:API:bin/generate_apacheconf|BIN/GENERATE_APACHECONF]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''generate_apacheconf''' - Create the apache config files needed for EPrints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''generate_apacheconf''' ['''options'''] [&amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
'''generate_apacheconf''' --replace [repoid]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This script generates the config files to include in your Apache configuration.&lt;br /&gt;
&lt;br /&gt;
If you have changed a repository's configuration (hostname/port/path) you can update the configuration for that repository with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; generate_apacheconf --replace [repoid]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_adding_to_apache_configuration --&amp;gt;&lt;br /&gt;
===Adding to Apache Configuration===&lt;br /&gt;
To enable EPrints you must add the following line to your main Apache configuration file (&amp;lt;em&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/em&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Include /opt/eprints3/cfg/apache.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable secure (HTTPS) you must add the following line to your SSL VirtualHost:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Include /opt/eprints3/cfg/apache_ssl.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* repository_id&lt;br /&gt;
: Optionally update the given repository's apache configuration only. Will only replace an existing configuration file with the --replace option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--replace'''&lt;br /&gt;
: Replace existing configuration files, overwriting any changes made.&lt;br /&gt;
&lt;br /&gt;
* '''--system'''&lt;br /&gt;
: Update the system configuration file, overwriting any changes made.&lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_files --&amp;gt;&lt;br /&gt;
==FILES==&lt;br /&gt;
* '''EPRINTS/cfg/apache.conf'''&lt;br /&gt;
: Loads the EPrints environment and repository-specific configuration files.&lt;br /&gt;
&lt;br /&gt;
* '''EPRINTS/cfg/apache_ssl.conf'''&lt;br /&gt;
: Loads the repository-specific SSL configuration files.&lt;br /&gt;
&lt;br /&gt;
* '''EPRINTS/cfg/apache/[repoid].conf'''&lt;br /&gt;
: A &amp;amp;lt;VirtualHost&amp;amp;gt; that responds to the configured hostname and port of the repository.&lt;br /&gt;
&lt;br /&gt;
* '''EPRINTS/cfg/apache_ssl/[repoid].conf'''&lt;br /&gt;
: A &amp;amp;lt;Location&amp;amp;gt; that responds to the configured https_root of the repository.&lt;br /&gt;
&lt;br /&gt;
* '''EPRINTS/archives/[repoid]/cfg.d/10_base.pl'''&lt;br /&gt;
: Default location for host and path directives used to build the Apache configuration files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:bin/generate_views&amp;diff=10720</id>
		<title>API:bin/generate views</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:bin/generate_views&amp;diff=10720"/>
		<updated>2013-01-22T09:57:20Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=bin/generate_views|package_name=bin/generate_views}}[[Category:API|BIN/GENERATE_VIEWS]][[Category:API:bin/generate_views|BIN/GENERATE_VIEWS]][[Category:API:bin/generate_views|BIN/GENERATE_VIEWS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''generate_views''' - Generate static browse pages for an EPrint repository&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
'''generate_views''' &amp;lt;em&amp;gt;repository_id&amp;lt;/em&amp;gt; ['''options'''] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This script creates some or all of the pages used in the /view/ section of the website. Since 3.1 these pages update themselves if they get only than a certain age, but this can cause delays for the viewer, so this script is still provided to pre-prepare them to provide a smoother experience.&lt;br /&gt;
&lt;br /&gt;
Note: Since EPrints 3.1 it is not essential to run generate_views periodically, but it is still recommended.&lt;br /&gt;
&lt;br /&gt;
What this does is generate browse pages for each field configured as browsable in '''ArchiveConfig.pm'''. It creates a static web page for each value of that field, and index pages to navigate to them. &lt;br /&gt;
&lt;br /&gt;
For example, if we make &amp;quot;year&amp;quot; browseable then this script will generate one page for each unique value of the year field. So a user can then view the 1995 page and see links to all the 1995 eprints.&lt;br /&gt;
&lt;br /&gt;
Advantages of this are that this puts less load on the database than user searches. Assuming you pick two or three sensible fields to make browsable. &lt;br /&gt;
&lt;br /&gt;
This script should be run every hour or so, but that should once a day or even once a week on large repositories, as the more eprints the longer it will take to run. The rough length of time to run this is of the order of O( '''languages''' * '''eprints''' * '''browsable fields''' ).  You can automate running this with the '''cron''' system.&lt;br /&gt;
&lt;br /&gt;
If viewid is specified then only that view is updated. This can be useful if some views need updating more often then others. The top /view/ page which links to each view is always updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_arguments --&amp;gt;&lt;br /&gt;
==ARGUMENTS==&lt;br /&gt;
* '''repository_id''' &lt;br /&gt;
: The ID of the eprint repository to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* '''--generate menus''' &lt;br /&gt;
: Only generate the menu pages, not the pages with links to records.&lt;br /&gt;
&lt;br /&gt;
* '''--generate lists''' &lt;br /&gt;
: Only generate the pages with lists of records, not the menu pages.&lt;br /&gt;
&lt;br /&gt;
* '''--view''' &amp;lt;em&amp;gt;view_id&amp;lt;/em&amp;gt;&lt;br /&gt;
: Generate only the view with this ID.&lt;br /&gt;
&lt;br /&gt;
* '''--lang''' &amp;lt;em&amp;gt;lang_id&amp;lt;/em&amp;gt;&lt;br /&gt;
: Generate only pages for the language with this ID. &lt;br /&gt;
&lt;br /&gt;
* '''--help'''&lt;br /&gt;
: Print a brief help message and exit.&lt;br /&gt;
&lt;br /&gt;
* '''--man'''&lt;br /&gt;
: Print the full manual page and then exit.&lt;br /&gt;
&lt;br /&gt;
* '''--quiet'''&lt;br /&gt;
: Be vewwy vewwy quiet. This option will supress all output unless an error occurs.&lt;br /&gt;
&lt;br /&gt;
* '''--verbose'''&lt;br /&gt;
: Explain in detail what is going on. May be repeated for greater effect.&lt;br /&gt;
&lt;br /&gt;
* '''--version'''&lt;br /&gt;
: Output version information and exit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
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 General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EPM&amp;diff=10718</id>
		<title>API:EPrints/DataObj/EPM</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EPM&amp;diff=10718"/>
		<updated>2013-01-22T09:57:19Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/EPM.pm|package_name=EPrints::DataObj::EPM}}[[Category:API|EPM]][[Category:API:EPrints/DataObj|EPM]][[Category:API:EPrints/DataObj/EPM|EPM]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::EPM''' - Class representing an EPrints Package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_metadata --&amp;gt;&lt;br /&gt;
==SYSTEM METADATA==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$metadata = EPrints::DataObj::EPM-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array describing the system metadata of the EPrint dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_map --&amp;gt;&lt;br /&gt;
===map===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::DataObj::EPM-&amp;gt;map( $repo, sub { ... }, $ctx )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Apply a function over all installed EPMs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  sub {&lt;br /&gt;
    my( $repo, $dataset, $epm [, $ctx ] ) = @_;&lt;br /&gt;
  }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This loads the EPM index files only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$epm = EPrints::DataObj::EPM-&amp;gt;new( $repo, $id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a new object representing the installed package $id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new_from_manifest --&amp;gt;&lt;br /&gt;
===new_from_manifest===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$epm = EPrint::DataObj::EPM-&amp;gt;new_from_manifest( $repo, $epdata [, @manifest ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Makes and returns a new EPM object based on a manifest of installable files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_commit --&amp;gt;&lt;br /&gt;
===commit===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$epm-&amp;gt;commit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Commit any changes to the installed .epm, .epmi files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_rebuild --&amp;gt;&lt;br /&gt;
===rebuild===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$epm-&amp;gt;rebuild&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reload all of the installed files (regenerating hashes if necessary).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_version --&amp;gt;&lt;br /&gt;
===version===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$v = $epm-&amp;gt;version&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a stringified version suitable for string gt/lt matching.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_enabled --&amp;gt;&lt;br /&gt;
===is_enabled===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $epm-&amp;gt;is_enabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if the $epm is enabled for the current repository.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_repositories --&amp;gt;&lt;br /&gt;
===repositories===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@repoids = $epm-&amp;gt;repositories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of repository ids this $epm is enabled in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_package_filename --&amp;gt;&lt;br /&gt;
===package_filename===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = $epm-&amp;gt;package_filename()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the complete package filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_epm_dir --&amp;gt;&lt;br /&gt;
===epm_dir===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dir = $epm-&amp;gt;epm_dir&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Path to the epm directory for this $epm.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_installed_files --&amp;gt;&lt;br /&gt;
===installed_files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@files = $epm-&amp;gt;installed_files()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a list of installed files as [[API:EPrints/DataObj/File|EPrints::DataObj::File]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_repository_files --&amp;gt;&lt;br /&gt;
===repository_files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@files = $epm-&amp;gt;repository_files()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the list of configuration files used to enable/configure an $epm.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_control_screen --&amp;gt;&lt;br /&gt;
===control_screen===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$screen = $epm-&amp;gt;control_screen( %params )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the control screen for this $epm. %params are passed to the plugin constructor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_serialise --&amp;gt;&lt;br /&gt;
===serialise===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$epm-&amp;gt;serialise( $fh, [ FILES ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Serialises this EPM to the open file handle $fh. If FILES is true file contents are included.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_install --&amp;gt;&lt;br /&gt;
===install===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $epm-&amp;gt;install( HANDLER [, FORCE ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Install the EPM into the system. HANDLER is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_uninstall --&amp;gt;&lt;br /&gt;
===uninstall===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $epm-&amp;gt;uninstall( HANDLER [, FORCE ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove the EPM from the system. HANDLER is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_disable_unchanged --&amp;gt;&lt;br /&gt;
===disable_unchanged===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $epm-&amp;gt;disable_unchanged()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove unchanged files from the repository directory. This allows a new version of the EPM to be installed/enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_enable --&amp;gt;&lt;br /&gt;
===enable===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $epm-&amp;gt;enable( $handler )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the $epm for the current repository.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_utility_methods --&amp;gt;&lt;br /&gt;
===Utility Methods===&lt;br /&gt;
 $conf = $epm-&amp;amp;gt;current_counters()&lt;br /&gt;
 $conf = $epm-&amp;amp;gt;current_datasets()&lt;br /&gt;
 $ok = $epm-&amp;amp;gt;update_counters( $conf )&lt;br /&gt;
 $ok = $epm-&amp;amp;gt;update_datasets( $conf )&lt;br /&gt;
Update the datasets following any configuration changes made by the extension on being enabled. $conf should be retrieved before enabling by using [[API:EPrints/DataObj/EPM#current_datasets|current_datasets]].&lt;br /&gt;
&lt;br /&gt;
 $ok = $epm-&amp;amp;gt;publish( $handler, $base_url, %opts )&lt;br /&gt;
Publish this EPM to a remote system using SWORD.&lt;br /&gt;
&lt;br /&gt;
$base_url is the URL of the SWORD endpoint or a page containing a SWORD &amp;amp;lt;link&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  username - username for Basic auth&lt;br /&gt;
  password - password for Basic auth&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $epm-&amp;amp;gt;add_to_xml( $dest, $src )&lt;br /&gt;
Add this package's XML $src to $dest XML. Useful for workflows and citations.&lt;br /&gt;
&lt;br /&gt;
$src may have these additional attributes on elements:&lt;br /&gt;
&lt;br /&gt;
* operation = &amp;quot;replace&amp;quot; | &amp;quot;disable&amp;quot; | *&amp;quot;merge&amp;quot;&lt;br /&gt;
: Where replace will replace the default element, disable will disable it and merge will merge the new branch with the old.&lt;br /&gt;
&lt;br /&gt;
 $epm-&amp;amp;gt;remove_from_xml( $dest )&lt;br /&gt;
Remove this package's extensions from $dest XML.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EventQueue&amp;diff=10719</id>
		<title>API:EPrints/DataObj/EventQueue</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EventQueue&amp;diff=10719"/>
		<updated>2013-01-22T09:57:19Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/EventQueue.pm|package_name=EPrints::DataObj::EventQueue}}[[Category:API|EVENTQUEUE]][[Category:API:EPrints/DataObj|EVENTQUEUE]][[Category:API:EPrints/DataObj/EventQueue|EVENTQUEUE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::DataObj::EventQueue - scheduler/indexer event queue&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_fields --&amp;gt;&lt;br /&gt;
==FIELDS==&lt;br /&gt;
* eventqueueid&lt;br /&gt;
: Either a UUID or a hash of the event (if created with [[API:EPrints/DataObj/EventQueue#create_unique|create_unique]]).&lt;br /&gt;
&lt;br /&gt;
* cleanup&lt;br /&gt;
: If set to true removes this event once it has finished. Defaults to true.&lt;br /&gt;
&lt;br /&gt;
* priority&lt;br /&gt;
: The priority for this event.&lt;br /&gt;
&lt;br /&gt;
* start_time&lt;br /&gt;
: The event should not be executed before this time.&lt;br /&gt;
&lt;br /&gt;
* end_time&lt;br /&gt;
: The event was last touched at this time.&lt;br /&gt;
&lt;br /&gt;
* status&lt;br /&gt;
: The status of this event.&lt;br /&gt;
&lt;br /&gt;
* userid&lt;br /&gt;
: The user (if any) that was responsible for creating this event.&lt;br /&gt;
&lt;br /&gt;
* description&lt;br /&gt;
: A human-readable description of this event (or error).&lt;br /&gt;
&lt;br /&gt;
* pluginid&lt;br /&gt;
: The [[API:EPrints/Plugin/Event|EPrints::Plugin::Event]] plugin id to call to execute this event.&lt;br /&gt;
&lt;br /&gt;
* action&lt;br /&gt;
: The name of the action to execute on the plugin (i.e. method name).&lt;br /&gt;
&lt;br /&gt;
* params&lt;br /&gt;
: Parameters to pass to the action (a text serialisation).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_unique --&amp;gt;&lt;br /&gt;
===create_unique===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$event = EPrints::DataObj::EventQueue-&amp;gt;create_unique( $repo, $data [, $dataset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Creates a unique event by setting the &amp;lt;code&amp;gt;eventqueueid&amp;lt;/code&amp;gt; to a hash of the &amp;lt;code&amp;gt;pluginid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; and (if given) &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Returns undef if such an event already exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_execute --&amp;gt;&lt;br /&gt;
===execute===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $event-&amp;gt;execute()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the action this event describes.&lt;br /&gt;
&lt;br /&gt;
The return from the [[API:EPrints/Plugin/Event|EPrints::Plugin::Event]] plugin action is treated as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  undef - equivalent to HTTP_OK&lt;br /&gt;
  HTTP_OK - action succeeded, event is removed if cleanup is TRUE&lt;br /&gt;
  HTTP_RESET_CONTENT - action succeeded, event is set 'waiting'&lt;br /&gt;
  HTTP_NOT_FOUND - action failed, event is removed if cleanup is TRUE&lt;br /&gt;
  HTTP_LOCKED - action failed, event is re-scheduled for 10 minutes time&lt;br /&gt;
  HTTP_INTERNAL_SERVER_ERROR - action failed, event is 'failed' and kept&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_message --&amp;gt;&lt;br /&gt;
===message===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$event-&amp;gt;message( $type, $xhtml )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Utility method to log a message for this event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
: Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/Subject&amp;diff=10717</id>
		<title>API:EPrints/DataObj/Subject</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/Subject&amp;diff=10717"/>
		<updated>2013-01-22T09:57:18Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/Subject.pm|package_name=EPrints::DataObj::Subject}}[[Category:API|SUBJECT]][[Category:API:EPrints/DataObj|SUBJECT]][[Category:API:EPrints/DataObj/Subject|SUBJECT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::Subject''' - Class and methods relating to the subejcts tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class represents a single node in the subejcts tree. It also contains a number of methods for handling the entire tree.&lt;br /&gt;
&lt;br /&gt;
EPrints::DataObj::Subject is a subclass of EPrints::DataObj&lt;br /&gt;
&lt;br /&gt;
* $thing = EPrints::DataObj::Subject-&amp;amp;gt;get_system_field_info&lt;br /&gt;
: Return an array describing the system metadata of the Subject dataset.&lt;br /&gt;
&lt;br /&gt;
* $subject = EPrints::DataObj::Subject-&amp;amp;gt;new( $session, $subjectid )&lt;br /&gt;
: Create a new subject object given the id of the subject. The values for the subject are loaded from the database.&lt;br /&gt;
&lt;br /&gt;
* $subject = EPrints::DataObj::Subject-&amp;amp;gt;new_from_data( $session, $data )&lt;br /&gt;
: Construct a new subject object from a hash reference containing the relevant fields. Generally this method is only used to construct new Subjects coming out of the database.&lt;br /&gt;
&lt;br /&gt;
* $success = $subject-&amp;amp;gt;commit( [$force] )&lt;br /&gt;
: Commit this subject to the database, but only if any fields have  changed since we loaded it.&lt;br /&gt;
&lt;br /&gt;
: If $force is set then always commit, even if there appear to be no changes.&lt;br /&gt;
&lt;br /&gt;
* $success = $subject-&amp;amp;gt;remove&lt;br /&gt;
: Remove this subject from the database.&lt;br /&gt;
&lt;br /&gt;
* $dataset = EPrints::DataObj::Subject-&amp;amp;gt;get_dataset_id&lt;br /&gt;
: Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
* EPrints::DataObj::Subject::remove_all( $session )&lt;br /&gt;
: Static function.&lt;br /&gt;
&lt;br /&gt;
: Remove all subjects from the database. Use with care!&lt;br /&gt;
&lt;br /&gt;
* $subject = $subject-&amp;amp;gt;top()&lt;br /&gt;
: Returns the subject that is at the top of this subject's tree (which may be this subject).&lt;br /&gt;
&lt;br /&gt;
: Returns undef if the subject is not part of a tree.&lt;br /&gt;
&lt;br /&gt;
* $child_subject = $subject-&amp;amp;gt;create_child( $id, $name, $depositable )&lt;br /&gt;
: Similar to EPrints::DataObj::Subject::create, but this creates the new subject as a child of the current subject.&lt;br /&gt;
&lt;br /&gt;
* @children = $subject-&amp;amp;gt;get_children&lt;br /&gt;
: Return a list of EPrints::DataObj::Subject objects which are direct children of the current subject.&lt;br /&gt;
&lt;br /&gt;
* @parents = $subject-&amp;amp;gt;get_parents&lt;br /&gt;
: Return a list of EPrints::DataObj::Subject objects which are direct parents of the current subject.&lt;br /&gt;
&lt;br /&gt;
* $boolean = $subject-&amp;amp;gt;can_post( [$user] )&lt;br /&gt;
: Determines whether the given user can post in this subject.&lt;br /&gt;
&lt;br /&gt;
: Currently there is no way to configure subjects for certain users, so this just returns the true or false depending on the &amp;quot;depositable&amp;quot; flag.&lt;br /&gt;
&lt;br /&gt;
* $xhtml = $subject-&amp;amp;gt;render_with_path( $session, $topsubjid )&lt;br /&gt;
: Return the name of this subject including it's path from $topsubjid.&lt;br /&gt;
&lt;br /&gt;
: $topsubjid must be an ancestor of this subject.&lt;br /&gt;
&lt;br /&gt;
: eg. &lt;br /&gt;
&lt;br /&gt;
: Library of Congress &amp;amp;gt; B Somthing &amp;amp;gt; BC Somthing more Detailed&lt;br /&gt;
&lt;br /&gt;
* @paths = $subject-&amp;amp;gt;get_paths( $session, $topsubjid )&lt;br /&gt;
: This function returns all the paths from this subject back up to the specified top subject.&lt;br /&gt;
&lt;br /&gt;
: @paths is an array of array references. Each of the inner arrays is a list of subject id's describing a path down the tree from $topsubjid to $session.&lt;br /&gt;
&lt;br /&gt;
* $subject_pairs = $subject-&amp;amp;gt;get_subjects ( [$postable_only], [$show_top_level], [$nes_tids], [$no_nest_label] )&lt;br /&gt;
: Return a reference to an array. Each item in the array is a two  element list. &lt;br /&gt;
&lt;br /&gt;
: The first element in the list is an indenifier string. &lt;br /&gt;
&lt;br /&gt;
: The second element is a utf-8 string describing the subject (in the  current language), including all the items above it in the tree, but only as high as this subject.&lt;br /&gt;
&lt;br /&gt;
: The subjects which are returned are this item and all its children,  and childrens children etc. The order is it returns  this subject, then the first child of this subject, then children of  that (recursively), then the second child of this subject etc.&lt;br /&gt;
&lt;br /&gt;
: If $postable_only is true then filter the results to only contain  subjects which have the &amp;quot;depositable&amp;quot; flag set to true.&lt;br /&gt;
&lt;br /&gt;
: If $show_top_level is not true then the pair representing the current subject is not included at the start of the list.&lt;br /&gt;
&lt;br /&gt;
: If $nest_ids is true then each then the ids retured are nested so that the ids of the children of this subject are prefixed with this  subjects id and a colon, and their children are prefixed by their  nested id and a colon. eg. L:LC:LC003 rather than just &amp;quot;LC003&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: if $no_nest_label is true then the subject label only contains the name of the subject, not the higher level ones.&lt;br /&gt;
&lt;br /&gt;
: A default result from this method would look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  [&lt;br /&gt;
    [ &amp;quot;D&amp;quot;, &amp;quot;History&amp;quot; ],&lt;br /&gt;
    [ &amp;quot;D1&amp;quot;, &amp;quot;History: History (General)&amp;quot; ],&lt;br /&gt;
    [ &amp;quot;D111&amp;quot;, &amp;quot;History: History (General): Medieval History&amp;quot; ]&lt;br /&gt;
 ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ( $subject_map, $reverse_map ) = EPrints::DataObj::Subject::get_all( $session )&lt;br /&gt;
: Get all the subjects for the current archvive of $session.&lt;br /&gt;
&lt;br /&gt;
: $subject_map is a reference to a hash. The keys of the hash are the id's of the subjects. The values of the hash are the  EPrint::Subject object relating to that id.&lt;br /&gt;
&lt;br /&gt;
: $reverse_map is a reference to a hash. Each key is the id of a subject. Each value is a reference to an array. The array contains a EPrints::DataObj::Subject objects, one for each child of the subject  with the id. The array is sorted by the labels for the subjects, in the current language.&lt;br /&gt;
&lt;br /&gt;
* $count = $subject-&amp;amp;gt;count_eprints( $dataset )&lt;br /&gt;
: Return the number of eprints in the dataset which are in this subject or one of its decendants. Search all fields of type subject.&lt;br /&gt;
&lt;br /&gt;
* $boolean = EPrints::DataObj::Subject::valid_id( $id )&lt;br /&gt;
: Return true if the string is an acceptable identifier for a subject.&lt;br /&gt;
&lt;br /&gt;
: This does not check all possible illegal values, yet.&lt;br /&gt;
&lt;br /&gt;
* $subj-&amp;amp;gt;render()&lt;br /&gt;
: undocumented&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10716</id>
		<title>API:EPrints/DataObj/File</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/File&amp;diff=10716"/>
		<updated>2013-01-22T09:57:17Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/File.pm|package_name=EPrints::DataObj::File}}[[Category:API|FILE]][[Category:API:EPrints/DataObj|FILE]][[Category:API:EPrints/DataObj/File|FILE]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::File''' - a stored file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class contains the technical metadata associated with a file. A file is a sequence of bytes stored in the storage layer (a &amp;quot;stored object&amp;quot;). Utility methods for storing and retrieving the stored object from the storage layer are made available.&lt;br /&gt;
&lt;br /&gt;
Revision numbers on File work slightly differently to other objects. A File is only revised when it's stored object is changed and not when changes to it's metadata are made.&lt;br /&gt;
&lt;br /&gt;
This class is a subclass of [[API:EPrints/DataObj/SubObject|EPrints::DataObj::SubObject]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_core_fields --&amp;gt;&lt;br /&gt;
==CORE FIELDS==&lt;br /&gt;
* fileid&lt;br /&gt;
: Unique identifier for this file.&lt;br /&gt;
&lt;br /&gt;
* rev_number (int)&lt;br /&gt;
: The number of the current revision of this file.&lt;br /&gt;
&lt;br /&gt;
* datasetid&lt;br /&gt;
: Id of the dataset of the parent object.&lt;br /&gt;
&lt;br /&gt;
* objectid&lt;br /&gt;
: Id of the parent object.&lt;br /&gt;
&lt;br /&gt;
* filename&lt;br /&gt;
: Name of the file (may contain directory separators).&lt;br /&gt;
&lt;br /&gt;
* mime_type&lt;br /&gt;
: MIME type of the file (e.g. &amp;quot;image/png&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* hash&lt;br /&gt;
: Check sum of the file.&lt;br /&gt;
&lt;br /&gt;
* hash_type&lt;br /&gt;
: Name of check sum algorithm used (e.g. &amp;quot;MD5&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* filesize&lt;br /&gt;
: Size of the file in bytes.&lt;br /&gt;
&lt;br /&gt;
* mtime&lt;br /&gt;
: Last modification time of the file.&lt;br /&gt;
&lt;br /&gt;
* url&lt;br /&gt;
: Virtual field for storing the file's URL.&lt;br /&gt;
&lt;br /&gt;
* data&lt;br /&gt;
: Virtual field for storing the file's content.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_constructor_methods --&amp;gt;&lt;br /&gt;
===Constructor Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new_from_filename --&amp;gt;&lt;br /&gt;
===new_from_filename===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;new_from_filename( $session, $dataobj, $filename )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Convenience method to get an existing File object for $filename stored in $dataobj.&lt;br /&gt;
&lt;br /&gt;
Returns undef if no such record exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_create_from_data --&amp;gt;&lt;br /&gt;
===create_from_data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataobj = EPrints::DataObj::File-&amp;gt;create_from_data( $session, $data [, $dataset ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a new File record using $data.&lt;br /&gt;
&lt;br /&gt;
Private data elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  _content - content to pass to [[API:EPrints/DataObj/File#set_file|set_file]].&lt;br /&gt;
  _filepath - path to source file used for improved mime-type detection&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_class_methods --&amp;gt;&lt;br /&gt;
===Class Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$thing = EPrints::DataObj::File-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Core fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::File-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_object_methods --&amp;gt;&lt;br /&gt;
===Object Methods===&lt;br /&gt;
* $new_file = $file-&amp;amp;gt;clone( $parent )&lt;br /&gt;
: Clone the $file object (including contained files) and return the new object.&lt;br /&gt;
&lt;br /&gt;
* $success = $file-&amp;amp;gt;remove&lt;br /&gt;
: Delete the stored file.&lt;br /&gt;
&lt;br /&gt;
* $file-&amp;amp;gt;update( $epdata )&lt;br /&gt;
* $filename = $file-&amp;amp;gt;get_local_copy()&lt;br /&gt;
: Return the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object).&lt;br /&gt;
&lt;br /&gt;
: Will retrieve and cache the remote object if necessary.&lt;br /&gt;
&lt;br /&gt;
* $success = $file-&amp;amp;gt;add_file( $filepath, $filename [, $preserve_path ] )&lt;br /&gt;
: Read and store the contents of $filepath at $filename.&lt;br /&gt;
&lt;br /&gt;
: If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
* $bytes = $file-&amp;amp;gt;upload( $filehandle, $filename, $filesize [, $preserve_path ] )&lt;br /&gt;
: Read and store the data from $filehandle at $filename at the next revision number.&lt;br /&gt;
&lt;br /&gt;
: If $preserve_path is untrue will strip any leading path in $filename.&lt;br /&gt;
&lt;br /&gt;
: Returns the number of bytes read from $filehandle or undef on failure.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;write_copy( $filename )&lt;br /&gt;
: Write a copy of this file to $filename.&lt;br /&gt;
&lt;br /&gt;
: Returns true if the written file contains the same number of bytes as the stored file.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;write_copy_fh( $filehandle )&lt;br /&gt;
: Write a copy of this file to $filehandle.&lt;br /&gt;
&lt;br /&gt;
* $md5 = $stored-&amp;amp;gt;generate_md5&lt;br /&gt;
: Calculates and returns the MD5 for this file.&lt;br /&gt;
&lt;br /&gt;
* $digest = $file-&amp;amp;gt;generate_sha( [ ALGORITHM ] )&lt;br /&gt;
: Generate a SHA for this file, see {{API:PodLink|file=Digest/SHA|package_name=Digest::SHA|section=|text=Digest::SHA}} for a list of supported algorithms. Defaults to &amp;quot;256&amp;quot; (SHA-256).&lt;br /&gt;
&lt;br /&gt;
: Returns the hex-encoded digest.&lt;br /&gt;
&lt;br /&gt;
* $stored-&amp;amp;gt;add_plugin_copy( $plugin, $sourceid )&lt;br /&gt;
: Add a copy of this file stored using $plugin identified by $sourceid.&lt;br /&gt;
&lt;br /&gt;
* $stored-&amp;amp;gt;remove_plugin_copy( $plugin )&lt;br /&gt;
: Remove the copy of this file stored using $plugin.&lt;br /&gt;
&lt;br /&gt;
* $success = $stored-&amp;amp;gt;get_file( CALLBACK [, $offset, $n ] )&lt;br /&gt;
: Get the contents of the stored file.&lt;br /&gt;
&lt;br /&gt;
: $offset is the position in bytes to start reading from, defaults to 0.&lt;br /&gt;
&lt;br /&gt;
: $n is the number of bytes to read, defaults to &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: CALLBACK is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  sub {&lt;br /&gt;
    my( $buffer ) = @_;&lt;br /&gt;
    ...&lt;br /&gt;
    return 1;&lt;br /&gt;
  }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* $content_length = $stored-&amp;amp;gt;set_file( CONTENT, $content_length )&lt;br /&gt;
: Write $content_length bytes from CONTENT to the file object. Updates &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hash&amp;lt;/code&amp;gt; (you must call [[API:EPrints/DataObj/File#commit|commit]]).&lt;br /&gt;
&lt;br /&gt;
: Returns $content_length or undef on failure.&lt;br /&gt;
&lt;br /&gt;
: CONTENT may be one of:&lt;br /&gt;
&lt;br /&gt;
** CODEREF&lt;br /&gt;
:: Will be called until it returns empty string (&amp;quot;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
** SCALARREF&lt;br /&gt;
:: A scalar reference to a string of octets that will be written as-is.&lt;br /&gt;
&lt;br /&gt;
** GLOB&lt;br /&gt;
:: Will be treated as a file handle and read with sysread().&lt;br /&gt;
&lt;br /&gt;
* $content_length = $file-&amp;amp;gt;set_file_chunk( CONTENT, $content_length, $offset, $total )&lt;br /&gt;
: Write a chunk of data to the content, overwriting or appending to the existing content. See [[API:EPrints/DataObj/File#set_file|set_file]] for CONTENT and $content_length. &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt; is updated if $offset + $content_length is greater than the current &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: $offset is the starting point (in bytes) to write. $total is the total file size, used to determine where to store the content.&lt;br /&gt;
&lt;br /&gt;
: Returns the number of bytes written or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
: [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
: Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EPrint&amp;diff=10715</id>
		<title>API:EPrints/DataObj/EPrint</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/EPrint&amp;diff=10715"/>
		<updated>2013-01-22T09:57:16Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/EPrint.pm|package_name=EPrints::DataObj::EPrint}}[[Category:API|EPRINT]][[Category:API:EPrints/DataObj|EPRINT]][[Category:API:EPrints/DataObj/EPrint|EPRINT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::EPrint''' - Class representing an actual EPrint&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class represents a single eprint record and the metadata  associated with it. This is associated with one of more  EPrint::Document objects.&lt;br /&gt;
&lt;br /&gt;
EPrints::DataObj::EPrint is a subclass of EPrints::DataObj with the following metadata fields (plus those defined in ArchiveMetadataFieldsConfig):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_metadata --&amp;gt;&lt;br /&gt;
==SYSTEM METADATA==&lt;br /&gt;
* eprintid (int)&lt;br /&gt;
: The unique numerical ID of this eprint. &lt;br /&gt;
&lt;br /&gt;
* rev_number (int)&lt;br /&gt;
: The number of the current revision of this record.&lt;br /&gt;
&lt;br /&gt;
* userid (itemref)&lt;br /&gt;
: The id of the user who deposited this eprint (if any). Scripted importing could cause this not to be set.&lt;br /&gt;
&lt;br /&gt;
* dir (text)&lt;br /&gt;
: The directory, relative to the documents directory for this repository, which this eprints data is stored in. Eg. disk0/00/00/03/34 for record 334.&lt;br /&gt;
&lt;br /&gt;
* datestamp (time)&lt;br /&gt;
: The date this record first appeared live in the repository.&lt;br /&gt;
&lt;br /&gt;
* lastmod (time)&lt;br /&gt;
: The date this record was last modified.&lt;br /&gt;
&lt;br /&gt;
* status_changes (time)&lt;br /&gt;
: The date/time this record was moved between inbox, buffer, archive, etc.&lt;br /&gt;
&lt;br /&gt;
* type (namedset)&lt;br /&gt;
: The type of this record, one of the types of the &amp;quot;eprint&amp;quot; dataset.&lt;br /&gt;
&lt;br /&gt;
* succeeds (itemref)&lt;br /&gt;
: The ID of the eprint (if any) which this succeeds.  This field should have been an int and may be changed in a later upgrade.&lt;br /&gt;
&lt;br /&gt;
* commentary (itemref)&lt;br /&gt;
: The ID of the eprint (if any) which this eprint is a commentary on.  This  field should have been an int and may be changed in a later upgrade.&lt;br /&gt;
&lt;br /&gt;
* metadata_visibility (set)&lt;br /&gt;
: This field is automatically set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  show - appears normally&lt;br /&gt;
  no_search - hidden from search/views&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: The 'hide' option may be used to force an eprint to not appear in search/views but is not considered a stable option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$metadata = EPrints::DataObj::EPrint-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array describing the system metadata of the EPrint dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_fileinfo --&amp;gt;&lt;br /&gt;
===fileinfo===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;fileinfo()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The special '''fileinfo''' field contains the icon URL and main-file URL for each non-volatile document in the eprint. This is a performance tweak to avoid having to retrieve documents when rendering eprint citations.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  /style/images/fileicons/application_pdf.png;/20/1/paper.pdf|/20/4.hassmallThumbnailVersion/tdb_portrait.jpg;/20/4/tdb_portrait.jpg&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These URLs are relative to the current repository base path ('http_url').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::EPrint-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset --&amp;gt;&lt;br /&gt;
===get_dataset===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = $eprint-&amp;gt;get_dataset&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the dataset to which this object belongs. This will return one of the virtual datasets: inbox, buffer, archive or deletion.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_defaults --&amp;gt;&lt;br /&gt;
===get_defaults===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$defaults = EPrints::DataObj::EPrint-&amp;gt;get_defaults( $session, $data )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return default values for this object based on the starting data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clone --&amp;gt;&lt;br /&gt;
===clone===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint = $eprint-&amp;gt;clone( $dest_dataset, $copy_documents, $link )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create a copy of this EPrint with a new ID in the given dataset. Return the new eprint, or undef in the case of an error.&lt;br /&gt;
&lt;br /&gt;
If $copy_documents is set and true then the documents (and files) will be copied in addition to the metadata.&lt;br /&gt;
&lt;br /&gt;
If $nolink is true then the new eprint is not connected to the old one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_log_mail_owner --&amp;gt;&lt;br /&gt;
===log_mail_owner===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;log_mail_owner( $mail )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Log that the given mail message was send to the owner of this EPrint.&lt;br /&gt;
&lt;br /&gt;
$mail is the same XHTML DOM that was sent as the email.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_editorial_contact --&amp;gt;&lt;br /&gt;
===get_editorial_contact===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $eprint-&amp;gt;get_editorial_contact&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the user identified as the editorial contact for this item.&lt;br /&gt;
&lt;br /&gt;
By default returns undef.&lt;br /&gt;
&lt;br /&gt;
nb. This has nothing to do with the editor defined in the metadata&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove --&amp;gt;&lt;br /&gt;
===remove===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Erase this eprint and any associated records from the database and filesystem.&lt;br /&gt;
&lt;br /&gt;
This should only be called on eprints in &amp;quot;inbox&amp;quot; or &amp;quot;buffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_commit --&amp;gt;&lt;br /&gt;
===commit===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;commit( [$force] );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Commit any changes to the database.&lt;br /&gt;
&lt;br /&gt;
Calls [[API:EPrints/DataObj/EPrint#update_triggers|update_triggers]] just before the database is updated.&lt;br /&gt;
&lt;br /&gt;
The actions this method does are dependent on some object attributes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  changed - HASH of changed fields (from [[API:EPrints/DataObj|EPrints::DataObj]])&lt;br /&gt;
  non_volatile_change - BOOL (from [[API:EPrints/DataObj|EPrints::DataObj]])&lt;br /&gt;
  under_construction - BOOL&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If '''datestamp''' is unset and this eprint is in the '''archive''' dataset datestamp will always be set which will in turn set '''datestamp''' as changed.&lt;br /&gt;
&lt;br /&gt;
If no field values were changed and &amp;lt;code&amp;gt;$force&amp;lt;/code&amp;gt; is false returns.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;under_construction&amp;lt;/code&amp;gt; is false:&lt;br /&gt;
 - static files updated&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;non_volatile_change&amp;lt;/code&amp;gt; is true:&lt;br /&gt;
 - '''lastmod''' field updated&lt;br /&gt;
 - triples update queued&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;under_construction&amp;lt;/code&amp;gt; is false and &amp;lt;code&amp;gt;non_volatile_change&amp;lt;/code&amp;gt; is true:&lt;br /&gt;
 - revision generated&lt;br /&gt;
&lt;br /&gt;
The goal of these controls is to only trigger expensive processes in response to user actions. Revisions need to be generated when the user changes metadata or uploads new files (see [[API:EPrints/DataObj/Document#commit|EPrints::DataObj::Document/commit]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_save_revision --&amp;gt;&lt;br /&gt;
===save_revision===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;save_revision( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Increase the eprint revision number and save a complete copy of the record into the history (see [[API:EPrints/DataObj/History|EPrints::DataObj::History]]).&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  user - user that caused the action to occur, defaults to current user&lt;br /&gt;
  action - see history.action, defaults to &amp;quot;modify&amp;quot;&lt;br /&gt;
  details - see history.details, defaults to a description of changed fields&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_validate --&amp;gt;&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$problems = $eprint-&amp;gt;validate( [$for_archive], $workflow_id )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a reference to an array of XHTML DOM objects describing validation problems with the entire eprint based on $workflow_id.&lt;br /&gt;
&lt;br /&gt;
If $workflow_id is undefined defaults to &amp;quot;default&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A reference to an empty array indicates no problems.&lt;br /&gt;
&lt;br /&gt;
Calls [[API:EPrints/DataObj/EPrint#validate_eprint|validate_eprint]] for the &amp;lt;code&amp;gt;$eprint&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_skip_validation --&amp;gt;&lt;br /&gt;
===skip_validation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;skip_validation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this eprint should pass validation without being properly validated. This is to allow the use of dodgey data imported from legacy systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_prune_documents --&amp;gt;&lt;br /&gt;
===prune_documents===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;prune_documents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove any documents associated with this eprint which don't actually have any files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_all_documents --&amp;gt;&lt;br /&gt;
===get_all_documents===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@documents = $eprint-&amp;gt;get_all_documents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a list of all {{API:PodLink|file=EPrint/Document|package_name=EPrint::Document|section=|text=EPrint::Document}} objects associated with this eprint excluding documents with a &amp;quot;isVolatileVersionOf&amp;quot; relation (e.g. thumbnails).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_move_to_deletion --&amp;gt;&lt;br /&gt;
===move_to_deletion===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;move_to_deletion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Transfer the EPrint into the &amp;quot;deletion&amp;quot; dataset. Should only be called in eprints in the &amp;quot;archive&amp;quot; dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_move_to_inbox --&amp;gt;&lt;br /&gt;
===move_to_inbox===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;move_to_inbox&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Transfer the EPrint into the &amp;quot;inbox&amp;quot; dataset. Should only be called in eprints in the &amp;quot;buffer&amp;quot; dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_move_to_buffer --&amp;gt;&lt;br /&gt;
===move_to_buffer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;move_to_buffer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Transfer the EPrint into the &amp;quot;buffer&amp;quot; dataset. Should only be called in eprints in the &amp;quot;inbox&amp;quot; or &amp;quot;archive&amp;quot; dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_move_to_archive --&amp;gt;&lt;br /&gt;
===move_to_archive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $eprint-&amp;gt;move_to_archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Move this eprint into the main &amp;quot;archive&amp;quot; dataset. Normally only called on eprints in &amp;quot;deletion&amp;quot; or &amp;quot;buffer&amp;quot; datasets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_local_path --&amp;gt;&lt;br /&gt;
===local_path===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$path = $eprint-&amp;gt;local_path&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the full path of the EPrint directory on the local filesystem. No trailing slash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_url_stem --&amp;gt;&lt;br /&gt;
===url_stem===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $eprint-&amp;gt;url_stem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the URL to this EPrint's directory. Note, this INCLUDES the trailing slash, unlike the local_path method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_generate_static --&amp;gt;&lt;br /&gt;
===generate_static===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;generate_static&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Generate the static version of the abstract web page. In a multi-language repository this will generate one version per language.&lt;br /&gt;
&lt;br /&gt;
If called on inbox or buffer, remove the abstract page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_static --&amp;gt;&lt;br /&gt;
===remove_static===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint-&amp;gt;remove_static&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove the static web page or pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;( $description, $title, $links ) = $eprint-&amp;gt;render&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render the eprint. The 3 returned values are references to XHTML DOM objects. $description is the public viewable description of this eprint that appears as the body of the abstract page. $title is the title of the abstract page for this eprint. $links is any elements which should go in the &amp;amp;lt;head&amp;amp;gt; of this page.&lt;br /&gt;
&lt;br /&gt;
Calls [[API:EPrints/DataObj/EPrint#eprint_render|eprint_render]] to actually render the &amp;lt;code&amp;gt;$eprint&amp;lt;/code&amp;gt;, if it isn't deleted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_control_url --&amp;gt;&lt;br /&gt;
===get_control_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $eprint-&amp;gt;get_control_url&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the URL of the control page for this eprint.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_url --&amp;gt;&lt;br /&gt;
===get_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $eprint-&amp;gt;get_url&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the public URL of this eprints abstract page. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_user --&amp;gt;&lt;br /&gt;
===get_user===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = $eprint-&amp;gt;get_user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the EPrints::DataObj::User to whom this eprint belongs (if any).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_in_thread --&amp;gt;&lt;br /&gt;
===in_thread===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $eprint-&amp;gt;in_thread( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if this eprint is in the $field thread.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_first_in_thread --&amp;gt;&lt;br /&gt;
===first_in_thread===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint = $eprint-&amp;gt;first_in_thread( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the first (earliest) version or first paper in the thread of commentaries of this paper in the repository.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_last_in_thread --&amp;gt;&lt;br /&gt;
===last_in_thread===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint = $eprint-&amp;gt;last_in_thread( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the latest item in the $field thread on this eprint's branch of the thread tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_version_thread --&amp;gt;&lt;br /&gt;
===render_version_thread===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = $eprint-&amp;gt;render_version_thread( $field )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render XHTML DOM describing the entire thread as nested unordered lists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_type --&amp;gt;&lt;br /&gt;
===get_type===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$type = $eprint-&amp;gt;get_type&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the type of this eprint.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user_roles --&amp;gt;&lt;br /&gt;
===user_roles===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@roles = $eprint-&amp;gt;user_roles( $user )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the @roles $user has on $eprint.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_in_editorial_scope_of --&amp;gt;&lt;br /&gt;
===in_editorial_scope_of===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;in_editorial_scope_of( $possible_editor )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if $possible_editor can edit this eprint. This is according to the user editperms. &lt;br /&gt;
&lt;br /&gt;
This does not mean the user has the editor priv., just that if they do then they may edit the given item.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_owner --&amp;gt;&lt;br /&gt;
===has_owner===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;has_owner( $possible_owner )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if $possible_owner can edit this eprint. This is according to the user editperms. &lt;br /&gt;
&lt;br /&gt;
This does not mean the user has the editor priv., just that if they do then they may edit the given item.&lt;br /&gt;
&lt;br /&gt;
Uses the callback &amp;quot;does_user_own_eprint&amp;quot; if available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_obtain_lock --&amp;gt;&lt;br /&gt;
===obtain_lock===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;obtain_lock( $user )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_lock --&amp;gt;&lt;br /&gt;
===remove_lock===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;remove_lock( $user )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_could_obtain_lock --&amp;gt;&lt;br /&gt;
===could_obtain_lock===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;could_obtain_lock( $user )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_locked --&amp;gt;&lt;br /&gt;
===is_locked===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $eprint-&amp;gt;is_locked()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_edit_lock --&amp;gt;&lt;br /&gt;
===render_edit_lock===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$xhtml = render_edit_lock( $session, $value )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_callbacks --&amp;gt;&lt;br /&gt;
==CALLBACKS==&lt;br /&gt;
Callbacks may optionally be defined in the ArchiveConfig.&lt;br /&gt;
&lt;br /&gt;
* validate_field&lt;br /&gt;
&amp;lt;pre&amp;gt;  validate_field( $field, $value, $session, [$for_archive] )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* validate_eprint&lt;br /&gt;
&amp;lt;pre&amp;gt;  validate_eprint( $eprint, $session, [$for_archive] )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* set_eprint_defaults&lt;br /&gt;
&amp;lt;pre&amp;gt;  set_eprint_defaults( $data, $session )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* set_eprint_automatic_fields&lt;br /&gt;
&amp;lt;pre&amp;gt;  set_eprint_automatic_fields( $eprint )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* eprint_render&lt;br /&gt;
&amp;lt;pre&amp;gt;  eprint_render( $eprint, $session )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: See {{API:PodLink|file=ArchiveRenderConfig|package_name=ArchiveRenderConfig|section=eprint_render|text=ArchiveRenderConfig/eprint_render}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/User&amp;diff=10714</id>
		<title>API:EPrints/DataObj/User</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/User&amp;diff=10714"/>
		<updated>2013-01-22T09:57:14Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/User.pm|package_name=EPrints::DataObj::User}}[[Category:API|USER]][[Category:API:EPrints/DataObj|USER]][[Category:API:EPrints/DataObj/User|USER]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::User''' - Class representing a single user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This class represents a single eprint user record and the metadata  associated with it. &lt;br /&gt;
&lt;br /&gt;
EPrints::DataObj::User is a subclass of EPrints::DataObj with the following metadata fields (plus those defined in ArchiveMetadataFieldsConfig:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_metadata --&amp;gt;&lt;br /&gt;
==SYSTEM METADATA==&lt;br /&gt;
* userid (int)&lt;br /&gt;
: The unique ID number of this user record. Unique within the current repository.&lt;br /&gt;
&lt;br /&gt;
* rev_number (int)&lt;br /&gt;
: The revision number of this record. Each time it is changed the revision number is increased. This is not currently used for anything but it may be used for logging later.&lt;br /&gt;
&lt;br /&gt;
* username (text)&lt;br /&gt;
: The username of this user. Used for logging into the system. Unique within this repository.&lt;br /&gt;
&lt;br /&gt;
* password (secret)&lt;br /&gt;
: The crypted password for this user as generated by [[API:EPrints/Utils#crypt|EPrints::Utils/crypt]]. This may be ignored if for example LDAP authentication is being used.&lt;br /&gt;
&lt;br /&gt;
* usertype (namedset)&lt;br /&gt;
: The type of this user. The options are configured in metadata-phrases.xml.&lt;br /&gt;
&lt;br /&gt;
* newemail (email)&lt;br /&gt;
: Used to store a new but as yet unconfirmed email address.&lt;br /&gt;
&lt;br /&gt;
* newpassword (secret)&lt;br /&gt;
: Used to store a new but as yet unconfirmed password.&lt;br /&gt;
&lt;br /&gt;
* pin (text)&lt;br /&gt;
: A code required to confirm a new username or password. This code is emailed to the user to confirm they are who they say they are.&lt;br /&gt;
&lt;br /&gt;
* pinsettime (int)&lt;br /&gt;
: When the pin code was set, so we can make it time out.&lt;br /&gt;
&lt;br /&gt;
* joined (time)&lt;br /&gt;
: The date and time that the user account was created. Before EPrints 2.4 this was a date field so users created before the upgrade will appear to have been  created at midnight.&lt;br /&gt;
&lt;br /&gt;
* email (email)&lt;br /&gt;
: The email address of this user. Unique within the repository. &lt;br /&gt;
&lt;br /&gt;
* lang (namedset) &lt;br /&gt;
: The ID of the prefered language of this user. Only really used in multilingual repositories.&lt;br /&gt;
&lt;br /&gt;
* editperms (search, multiple)&lt;br /&gt;
: This field is used to filter what eprints a staff member can approve and  modify. If it's unset then they can modify any (given the correct privs. but if it is set then an eprint must match at least one of the searches to be within their scope.&lt;br /&gt;
&lt;br /&gt;
* frequency (set)&lt;br /&gt;
: Only relevant to staff accounts. Is the frequency they want to be mailed  about eprints matching their scope that are in editorial review. never,  daily, weekly or monthly.&lt;br /&gt;
&lt;br /&gt;
* mailempty (boolean)&lt;br /&gt;
: Only relevant to staff accounts. If set to true then emails are sent even if there are no items matching the scope.&lt;br /&gt;
&lt;br /&gt;
* preference (compound)&lt;br /&gt;
: User preferences which need to be persistent (simple key-value pairs).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$field_info = EPrints::DataObj::User-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array describing the system metadata of the this  dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new --&amp;gt;&lt;br /&gt;
===new===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = EPrints::DataObj::User-&amp;gt;new( $session, $userid )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Load the user with the ID of $userid from the database and return it as an EPrints::DataObj::User object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_new_from_data --&amp;gt;&lt;br /&gt;
===new_from_data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = EPrints::DataObj::User-&amp;gt;new_from_data( $session, $data )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Construct a new EPrints::DataObj::User object based on the $data hash  reference of metadata.&lt;br /&gt;
&lt;br /&gt;
Used to create an object from the data retrieved from the database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::User-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_defaults --&amp;gt;&lt;br /&gt;
===get_defaults===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$defaults = EPrints::DataObj::User-&amp;gt;get_defaults( $session, $data )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return default values for this object based on the starting data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user_with_email --&amp;gt;&lt;br /&gt;
===user_with_email===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = EPrints::DataObj::User::user_with_email( $session, $email )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the EPrints::user with the specified $email, or undef if they are not found.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_user_with_username --&amp;gt;&lt;br /&gt;
===user_with_username===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user = EPrints::DataObj::User::user_with_username( $session, $username )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the EPrints::user with the specified $username, or undef if  they are not found.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_validate --&amp;gt;&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$problems = $thing-&amp;gt;validate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Validate the user - find out if all the required fields are filled out, and that what's been filled in is OK. Returns a reference to an array of problem descriptions.&lt;br /&gt;
&lt;br /&gt;
If there are no probelms then the array is empty.&lt;br /&gt;
&lt;br /&gt;
The problems are XHTML DOM objects describing the problem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_commit --&amp;gt;&lt;br /&gt;
===commit===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user-&amp;gt;commit( [$force] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Write this object to the database.&lt;br /&gt;
&lt;br /&gt;
If $force isn't true then it only actually modifies the database if one or more fields have been changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove --&amp;gt;&lt;br /&gt;
===remove===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $user-&amp;gt;remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove this user from the database. Also, remove their saved searches, but do not remove their eprints.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_staff --&amp;gt;&lt;br /&gt;
===is_staff===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $user-&amp;gt;is_staff()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if the user's type is '''editor''' or '''admin'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_langauge --&amp;gt;&lt;br /&gt;
===langauge===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$lang = $user-&amp;gt;langauge()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Get the preferred language of the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_owned_eprints_list --&amp;gt;&lt;br /&gt;
===owned_eprints_list===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$list = $user-&amp;gt;owned_eprints_list( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a [[API:EPrints/List|EPrints::List]] of all the [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s owned by this user.&lt;br /&gt;
&lt;br /&gt;
%opts is passed to a [[API:EPrints/Search|EPrints::Search]] which is used to filter the results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_editable_eprints_list --&amp;gt;&lt;br /&gt;
===editable_eprints_list===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$list = $user-&amp;gt;editable_eprints_list( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a [[API:EPrints/List|EPrints::List]] of [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s that match this user's editorial search expressions. If the user has no editorial scope a list of all eprints that match the given %opts is returned.&lt;br /&gt;
&lt;br /&gt;
%opts is passed to a [[API:EPrints/Search|EPrints::Search]] which is used to filter the results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $list = $user-&amp;amp;gt;editable_eprints_list(&lt;br /&gt;
      dataset =&amp;amp;gt; $repo-&amp;amp;gt;dataset( &amp;quot;buffer&amp;quot; ),&lt;br /&gt;
     );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_owner --&amp;gt;&lt;br /&gt;
===has_owner===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $user-&amp;gt;has_owner( $possible_owner )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
True if the users are the same record.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_mail --&amp;gt;&lt;br /&gt;
===mail===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$ok = $user-&amp;gt;mail( $subjectid, $message, [$replyto], [$email] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Send an email to this user. &lt;br /&gt;
&lt;br /&gt;
$subjectid is the ID of a phrase to use as the subject of this email.&lt;br /&gt;
&lt;br /&gt;
$message is an XML DOM object describing the message in simple XHTML.&lt;br /&gt;
&lt;br /&gt;
$replyto is the reply to address for this email, if different to the repository default.&lt;br /&gt;
&lt;br /&gt;
$email is the email address to send this email to if different from this users configured email address.&lt;br /&gt;
&lt;br /&gt;
Return true if the email was sent OK.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render --&amp;gt;&lt;br /&gt;
===render===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;( $page, $title ) = $user-&amp;gt;render&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render this user into HTML using the &amp;quot;user_render&amp;quot; method in ArchiveRenderConfig.pm. Returns both the rendered information and the title as XHTML DOM.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_full --&amp;gt;&lt;br /&gt;
===render_full===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;( $page, $title ) = $user-&amp;gt;render_full&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The same as $user-&amp;amp;gt;render, but renders all fields, not just those  intended for public viewing. This is the admin view of the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_url --&amp;gt;&lt;br /&gt;
===get_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $user-&amp;gt;get_url&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the URL which will display information about this user.&lt;br /&gt;
&lt;br /&gt;
If $staff is true then return the URL for an administrator to view and modify this record.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_type --&amp;gt;&lt;br /&gt;
===get_type===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$type = $user-&amp;gt;get_type&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the type of this user. Equivalent of  $user-&amp;amp;gt;get_value( &amp;quot;usertype&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_saved_searches --&amp;gt;&lt;br /&gt;
===get_saved_searches===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@saved_searches = $eprint-&amp;gt;get_saved_searches&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array of all EPrint::DataObj::SavedSearch objects associated with this user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_preference --&amp;gt;&lt;br /&gt;
===preference===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$value = $user-&amp;gt;preference( $key )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve the preference $key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_preference --&amp;gt;&lt;br /&gt;
===set_preference===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user-&amp;gt;set_preference( $key, $value )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set a preference $key for the user to $value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_send_out_editor_alert --&amp;gt;&lt;br /&gt;
===send_out_editor_alert===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$user-&amp;gt;send_out_editor_alert&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Called on users who are editors, when it's time to send their update on what items are in the editorial review buffer.&lt;br /&gt;
&lt;br /&gt;
Sends the email if needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_process_editor_alerts --&amp;gt;&lt;br /&gt;
===process_editor_alerts===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;EPrints::DataObj::User::process_editor_alerts( $session, $frequency );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Static method.&lt;br /&gt;
&lt;br /&gt;
Called to send out all editor alerts of a given frequency (daily, weekly, monthly) for the current repository.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_allow --&amp;gt;&lt;br /&gt;
===allow===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$result = $user-&amp;gt;allow( $priv )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if $user can perform this action/view this screen.&lt;br /&gt;
&lt;br /&gt;
To test whether a privilege is possible on an object use [[API:EPrints/DataObj#permit|EPrints::DataObj/permit]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_privilege --&amp;gt;&lt;br /&gt;
===has_privilege===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $user-&amp;gt;has_privilege( $priv )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if $priv is in the user's privileges table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/Document&amp;diff=10713</id>
		<title>API:EPrints/DataObj/Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/Document&amp;diff=10713"/>
		<updated>2013-01-22T09:57:13Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/Document.pm|package_name=EPrints::DataObj::Document}}[[Category:API|DOCUMENT]][[Category:API:EPrints/DataObj|DOCUMENT]][[Category:API:EPrints/DataObj/Document|DOCUMENT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::Document''' - A single format of a record.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Document represents a single format of an EPrint (eg. PDF) - the  actual file(s) rather than the metadata.&lt;br /&gt;
&lt;br /&gt;
This class is a subclass of DataObj, with the following metadata fields: &lt;br /&gt;
&lt;br /&gt;
* docid (text)&lt;br /&gt;
: The unique ID of the document. This is a string of the format 123-02 where the first number is the eprint id and the second is the document number within that eprint.&lt;br /&gt;
&lt;br /&gt;
: This should probably have been and &amp;quot;int&amp;quot; but isn't. I later version of EPrints may change this.&lt;br /&gt;
&lt;br /&gt;
* eprintid (itemref)&lt;br /&gt;
: The id number of the eprint to which this document belongs.&lt;br /&gt;
&lt;br /&gt;
* placement (int)&lt;br /&gt;
: Placement of the document - the order documents should be shown in.&lt;br /&gt;
&lt;br /&gt;
* format (namedset)&lt;br /&gt;
: The format of this document. One of the types of the dataset &amp;quot;document&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* formatdesc (text)&lt;br /&gt;
: An additional description of this document. For example the specific version of a format.&lt;br /&gt;
&lt;br /&gt;
* language (namedset)&lt;br /&gt;
: The ISO ID of the language of this document. The default configuration of EPrints does not set this.&lt;br /&gt;
&lt;br /&gt;
* security (namedset)&lt;br /&gt;
: The security type of this document - who can view it. One of the types of the dataset &amp;quot;security&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* main (text)&lt;br /&gt;
: The file which we should link to. For something like a PDF file this is the only file. For an HTML document with images it would be the name of the actual HTML file.&lt;br /&gt;
&lt;br /&gt;
* files (subobject, multiple)&lt;br /&gt;
: A virtual field which represents the list of Files which are part of this record.&lt;br /&gt;
&lt;br /&gt;
* media&lt;br /&gt;
: A compound field containing a description of the document media - dimensions, codec etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$metadata = EPrints::DataObj::Document-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array describing the system metadata of the Document dataset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::Document-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_defaults --&amp;gt;&lt;br /&gt;
===get_defaults===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$defaults = EPrints::DataObj::Document-&amp;gt;get_defaults( $session, $data )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return default values for this object based on the starting data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_clone --&amp;gt;&lt;br /&gt;
===clone===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$newdoc = $doc-&amp;gt;clone( $eprint )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Attempt to clone this document. Both the document metadata and the actual files. The clone will be associated with the given EPrint.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove --&amp;gt;&lt;br /&gt;
===remove===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;remove&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Attempt to completely delete this document&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_eprint --&amp;gt;&lt;br /&gt;
===get_eprint===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$eprint = $doc-&amp;gt;get_eprint&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the EPrint this document is associated with.&lt;br /&gt;
&lt;br /&gt;
This is a synonym for get_parent().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_baseurl --&amp;gt;&lt;br /&gt;
===get_baseurl===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $doc-&amp;gt;get_baseurl( [$staff] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the base URL of the document. Overrides the stub in DataObj. $staff is currently ignored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_is_public --&amp;gt;&lt;br /&gt;
===is_public===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$boolean = $doc-&amp;gt;is_public()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
True if this document has no security set and is in the live archive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_path --&amp;gt;&lt;br /&gt;
===path===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$path = $doc-&amp;gt;path&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the relative path to the document WITHOUT any file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_file_path --&amp;gt;&lt;br /&gt;
===file_path===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$path = $doc-&amp;gt;file_path( [ $filename ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the relative path to $filename stored in this document. If $filename is undefined returns the path to the main file.&lt;br /&gt;
&lt;br /&gt;
This is an efficient shortcut to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  my $file = $doc-&amp;amp;gt;stored_file( $filename );&lt;br /&gt;
  my $path = $file-&amp;amp;gt;path;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_url --&amp;gt;&lt;br /&gt;
===get_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$url = $doc-&amp;gt;get_url( [$file] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the full URL of the document. Overrides the stub in DataObj.&lt;br /&gt;
&lt;br /&gt;
If file is not specified then the &amp;quot;main&amp;quot; file is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_files --&amp;gt;&lt;br /&gt;
===files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;%files = $doc-&amp;gt;files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a hash, the keys of which are all the files belonging to this document (relative to $doc-&amp;amp;gt;local_path). The values are the sizes of the files, in bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_file --&amp;gt;&lt;br /&gt;
===remove_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;remove_file( $filename )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Attempt to remove the given file. Give the filename as it is returned by get_files().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_main --&amp;gt;&lt;br /&gt;
===set_main===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;set_main( $main_file )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Sets the main file and adjusts format and mime type as necessary. Won't affect the database until a $doc-&amp;amp;gt;commit().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_main --&amp;gt;&lt;br /&gt;
===get_main===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = $doc-&amp;gt;get_main&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the name of the main file in this document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_format --&amp;gt;&lt;br /&gt;
===set_format===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;set_format( $format )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set format. Won't affect the database until a commit(). Just an alias  for $doc-&amp;amp;gt;set_value( &amp;quot;format&amp;quot; , $format );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_set_format_desc --&amp;gt;&lt;br /&gt;
===set_format_desc===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;set_format_desc( $format_desc )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the format description.  Won't affect the database until a commit(). Just an alias for $doc-&amp;amp;gt;set_value( &amp;quot;format_desc&amp;quot; , $format_desc );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_file --&amp;gt;&lt;br /&gt;
===add_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$fileobj = $doc-&amp;gt;add_file( $file, $filename [, $preserve_path] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
$file is the full path to a file to be added to the document, with name $filename. $filename is passed through [[API:EPrints/System#sanitise|EPrints::System/sanitise]] before being written.&lt;br /&gt;
&lt;br /&gt;
If $preserve_path is true then include path components in $filename.&lt;br /&gt;
&lt;br /&gt;
Returns the $fileobj created or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_archive --&amp;gt;&lt;br /&gt;
===add_archive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;add_archive( $file, $archive_format )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
$file is the full path to an archive file, eg. zip or .tar.gz &lt;br /&gt;
&lt;br /&gt;
This function will add the contents of that archive to the document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_directory --&amp;gt;&lt;br /&gt;
===add_directory===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;add_directory( $directory )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Upload the contents of $directory to this document. This will not set the main file.&lt;br /&gt;
&lt;br /&gt;
This method expects $directory to have a trailing slash (/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_upload_url --&amp;gt;&lt;br /&gt;
===upload_url===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;upload_url( $url )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Attempt to grab stuff from the given URL. Grabbing HTML stuff this way is always problematic, so (by default): only relative links will  be followed and only links to files in the same directory or  subdirectory will be followed.&lt;br /&gt;
&lt;br /&gt;
This (by default) uses wget. The details can be configured in SystemSettings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_commit --&amp;gt;&lt;br /&gt;
===commit===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$success = $doc-&amp;gt;commit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Commit any changes that have been made to this object to the database.&lt;br /&gt;
&lt;br /&gt;
Calls &amp;quot;set_document_automatic_fields&amp;quot; in the ArchiveConfig first to set any automatic fields that may be needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_validate --&amp;gt;&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$problems = $doc-&amp;gt;validate( [$for_archive] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return an array of XHTML DOM objects describing validation problems with the entire document, including the metadata and repository config specific requirements.&lt;br /&gt;
&lt;br /&gt;
A reference to an empty array indicates no problems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_type --&amp;gt;&lt;br /&gt;
===get_type===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$type = $doc-&amp;gt;get_type&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return the type of this document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_files_modified --&amp;gt;&lt;br /&gt;
===files_modified===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;files_modified&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This method does all the things that need doing when a file has been modified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_rehash --&amp;gt;&lt;br /&gt;
===rehash===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;rehash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Recalculate the hash value of the document. Uses MD5 of the files (in alphabetic order), but can use user specified hashing function instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_make_indexcodes --&amp;gt;&lt;br /&gt;
===make_indexcodes===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc = $doc-&amp;gt;make_indexcodes()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Make the indexcodes document for this document. Returns the generated document or undef on failure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_indexcodes --&amp;gt;&lt;br /&gt;
===remove_indexcodes===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc = $doc-&amp;gt;remove_indexcodes()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Remove any documents containing index codes for this document. Returns the number of documents removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_icon_link --&amp;gt;&lt;br /&gt;
===render_icon_link===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$frag = $doc-&amp;gt;render_icon_link( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render a link to the icon for this document.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
* new_window =&amp;amp;gt; 1&lt;br /&gt;
: Make link go to _blank not current window.&lt;br /&gt;
&lt;br /&gt;
* preview =&amp;amp;gt; 1&lt;br /&gt;
: If possible, provide a preview pop-up.&lt;br /&gt;
&lt;br /&gt;
* public =&amp;amp;gt; 0&lt;br /&gt;
: Show thumbnail/preview only on public docs.&lt;br /&gt;
&lt;br /&gt;
* public =&amp;amp;gt; 1&lt;br /&gt;
: Show thumbnail/preview on all docs if poss.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_render_preview_link --&amp;gt;&lt;br /&gt;
===render_preview_link===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$frag = $doc-&amp;gt;render_preview_link( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Render a link to the preview for this document (if available) using a lightbox.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
* caption =&amp;amp;gt; $frag&lt;br /&gt;
: XHTML fragment to use as the caption, defaults to empty.&lt;br /&gt;
&lt;br /&gt;
* set =&amp;amp;gt; &amp;quot;foo&amp;quot;&lt;br /&gt;
: The name of the set this document belongs to, defaults to none (preview won't be shown as part of a set).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_add_relation --&amp;gt;&lt;br /&gt;
===add_relation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;add_relation( $tgt, @types )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add one or more relations to $doc pointing to $tgt (does not modify $tgt).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_remove_relation --&amp;gt;&lt;br /&gt;
===remove_relation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$doc-&amp;gt;remove_relation( $tgt [, @types ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Removes the relations in $doc to $tgt. If @types isn't given removes all relations to $tgt. If $tgt is undefined removes all relations given in @types.&lt;br /&gt;
&lt;br /&gt;
If you want to remove all relations do $doc-&amp;amp;gt;set_value( &amp;quot;relation&amp;quot;, [] );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_has_relation --&amp;gt;&lt;br /&gt;
===has_relation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$bool = $doc-&amp;gt;has_relation( $tgt [, @types ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns true if $doc has relations to $tgt. If @types is given checks that $doc satisfies all of the given types. $tgt may be undefined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_search_related --&amp;gt;&lt;br /&gt;
===search_related===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$list = $doc-&amp;gt;search_related( [ $type ] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Return a [[API:EPrints/List|EPrints::List]] that contains all documents related to this document. If $type is defined returns only those documents related by $type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/LoginTicket&amp;diff=10712</id>
		<title>API:EPrints/DataObj/LoginTicket</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/DataObj/LoginTicket&amp;diff=10712"/>
		<updated>2013-01-22T09:57:12Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/DataObj/LoginTicket.pm|package_name=EPrints::DataObj::LoginTicket}}[[Category:API|LOGINTICKET]][[Category:API:EPrints/DataObj|LOGINTICKET]][[Category:API:EPrints/DataObj/LoginTicket|LOGINTICKET]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::DataObj::LoginTicket''' - user system loginticket&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Login tickets are the database entries for the user's session cookies.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_configuration_settings --&amp;gt;&lt;br /&gt;
===Configuration Settings===&lt;br /&gt;
* user_cookie_timeout = undef&lt;br /&gt;
: Set an expiry on the session cookies. This will cause the user's browser to delete the cookie after the given time. The time is specified according to {{API:PodLink|file=CGI|package_name=CGI|section=|text=CGI}}'s cookie constructor. This allows settings like &amp;lt;code&amp;gt;+1h&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;+7d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* user_inactivity_timeout = 86400 * 7&lt;br /&gt;
: How long to wait in seconds before logging the user out after their last activity.&lt;br /&gt;
&lt;br /&gt;
* user_session_timeout = undef&lt;br /&gt;
: How long in seconds the user can stay logged in before they must re-log in. Defaults to never - if you do specify this setting you probably want to reduce user_inactivity_timeout to &amp;amp;lt;1 hour.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_system_field_info --&amp;gt;&lt;br /&gt;
===get_system_field_info===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$thing = EPrints::DataObj::Access-&amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Core fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_class_methods --&amp;gt;&lt;br /&gt;
===Class Methods===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_get_dataset_id --&amp;gt;&lt;br /&gt;
===get_dataset_id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$dataset = EPrints::DataObj::LoginTicket-&amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_object_methods --&amp;gt;&lt;br /&gt;
===Object Methods===&lt;br /&gt;
 $ticket-&amp;amp;gt;set_cookies()&lt;br /&gt;
Set the session cookies for this login ticket.&lt;br /&gt;
&lt;br /&gt;
 $ticket-&amp;amp;gt;update()&lt;br /&gt;
Update the login ticket by increasing the expiry time.&lt;br /&gt;
&lt;br /&gt;
The expiry time is increased &amp;lt;code&amp;gt;user_inactivity_timeout&amp;lt;/code&amp;gt; or 7 days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Int&amp;diff=10711</id>
		<title>API:EPrints/MetaField/Int</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Int&amp;diff=10711"/>
		<updated>2013-01-22T09:57:10Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/MetaField/Int.pm|package_name=EPrints::MetaField::Int}}[[Category:API|INT]][[Category:API:EPrints/MetaField|INT]][[Category:API:EPrints/MetaField/Int|INT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::MetaField::Int - integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_properties --&amp;gt;&lt;br /&gt;
==PROPERTIES==&lt;br /&gt;
* maxlength = 9&lt;br /&gt;
: Maximum digits to allow (excluding '-' for negative numbers). The maximum allowed will depend on your database (probably 18 for BIGINT).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Timestamp&amp;diff=10710</id>
		<title>API:EPrints/MetaField/Timestamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Timestamp&amp;diff=10710"/>
		<updated>2013-01-22T09:57:07Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/MetaField/Timestamp.pm|package_name=EPrints::MetaField::Timestamp}}[[Category:API|TIMESTAMP]][[Category:API:EPrints/MetaField|TIMESTAMP]][[Category:API:EPrints/MetaField/Timestamp|TIMESTAMP]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::MetaField::Timestamp - date + time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
A date/time that defaults to the current time in UTC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Multilang&amp;diff=10709</id>
		<title>API:EPrints/MetaField/Multilang</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/MetaField/Multilang&amp;diff=10709"/>
		<updated>2013-01-22T09:57:06Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/MetaField/Multilang.pm|package_name=EPrints::MetaField::Multilang}}[[Category:API|MULTILANG]][[Category:API:EPrints/MetaField|MULTILANG]][[Category:API:EPrints/MetaField/Multilang|MULTILANG]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::MetaField::Multilang''' - Subclass of compound for multilingual data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;{&lt;br /&gt;
	name =&amp;gt; &amp;quot;title&amp;quot;,&lt;br /&gt;
	type =&amp;gt; &amp;quot;multilang&amp;quot;,&lt;br /&gt;
	multiple =&amp;gt; 1,&lt;br /&gt;
	fields =&amp;gt; [&lt;br /&gt;
		{ sub_name =&amp;gt; &amp;quot;title&amp;quot;, type =&amp;gt; &amp;quot;text&amp;quot;, },&lt;br /&gt;
	],&lt;br /&gt;
},&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
not done&lt;br /&gt;
&lt;br /&gt;
* $value = $field-&amp;amp;gt;lang_value( $langid, $value )&lt;br /&gt;
: Returns the most local language value for $langid.&lt;br /&gt;
&lt;br /&gt;
: If $langid is undefined uses the current language.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
: Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Update/Views&amp;diff=10708</id>
		<title>API:EPrints/Update/Views</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Update/Views&amp;diff=10708"/>
		<updated>2013-01-22T09:57:05Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Update/Views.pm|package_name=EPrints::Update::Views}}[[Category:API|VIEWS]][[Category:API:EPrints/Update|VIEWS]][[Category:API:EPrints/Update/Views|VIEWS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Update::Views''' - Update view pages&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$c-&amp;gt;{browse_views} = [&lt;br /&gt;
	{&lt;br /&gt;
		id =&amp;gt; &amp;quot;year&amp;quot;,&lt;br /&gt;
		order =&amp;gt; &amp;quot;creators_name/title&amp;quot;,&lt;br /&gt;
		menus =&amp;gt; [&lt;br /&gt;
			{&lt;br /&gt;
				fields =&amp;gt; [qw( date;res=year )],&lt;br /&gt;
				reverse_order =&amp;gt; 1,&lt;br /&gt;
				allow_null =&amp;gt; 1,&lt;br /&gt;
				new_column_at =&amp;gt; [10, 10]&lt;br /&gt;
			},&lt;br /&gt;
		],&lt;br /&gt;
		variations =&amp;gt; [qw(&lt;br /&gt;
			creators_name;first_letter&lt;br /&gt;
			type&lt;br /&gt;
			DEFAULT&lt;br /&gt;
		)],&lt;br /&gt;
	},&lt;br /&gt;
];&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Update the browse-by X web pages on demand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_options --&amp;gt;&lt;br /&gt;
==OPTIONS==&lt;br /&gt;
* id&lt;br /&gt;
: Set the unique id for the view, which in the URL will be /view/[id]/...&lt;br /&gt;
&lt;br /&gt;
* dataset = &amp;quot;archive&amp;quot;&lt;br /&gt;
: Set the dataset id to retrieve records from.&lt;br /&gt;
&lt;br /&gt;
* menus = [ ... ]&lt;br /&gt;
: An array of hierarchical menu choices.&lt;br /&gt;
&lt;br /&gt;
* order = &amp;quot;&amp;quot;&lt;br /&gt;
: Order matching records by the given field structure.&lt;br /&gt;
&lt;br /&gt;
* variations = [qw( DEFAULT )]&lt;br /&gt;
: Add group-bys on additional pages. &amp;quot;DEFAULT&amp;quot; shows all of the records in a list.&lt;br /&gt;
&lt;br /&gt;
* nolink = 0&lt;br /&gt;
: Don't show a link to this view from the /view/ page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_menus --&amp;gt;&lt;br /&gt;
===Menus===&lt;br /&gt;
* allow_null = 0&lt;br /&gt;
* fields = [qw( ... )]&lt;br /&gt;
* new_column_at = [x, y]&lt;br /&gt;
* reverse_order = 0&lt;br /&gt;
* mode = &amp;quot;default&amp;quot;&lt;br /&gt;
: Use &amp;quot;sections&amp;quot; to cause the menu to be broken into sections.&lt;br /&gt;
&lt;br /&gt;
* open_first_section = 1&lt;br /&gt;
: Open the first section of the browse menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_variations --&amp;gt;&lt;br /&gt;
===Variations===&lt;br /&gt;
Format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  [fieldname];[options]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where options is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  [option1],[option2],[option3]=[value]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no value is given the option is implicitly 1 (enable).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  creators_name;first_letter,allow_null=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* allow_null = 0&lt;br /&gt;
: Show items that have no value(s) for the selected field.&lt;br /&gt;
&lt;br /&gt;
* cloud&lt;br /&gt;
: Render a &amp;quot;Tag Cloud&amp;quot; of links, where the individual links are scaled by their frequency of occurence.&lt;br /&gt;
&lt;br /&gt;
* cloudmin = 80, cloudmax = 200&lt;br /&gt;
: Scale cloud tag links by between cloudmin and cloudmax percent from normal text size.&lt;br /&gt;
&lt;br /&gt;
* first_letter&lt;br /&gt;
: Implies truncate=1 and first_value.&lt;br /&gt;
&lt;br /&gt;
* first_value&lt;br /&gt;
: Only group-by on the first value in a multiple field.&lt;br /&gt;
&lt;br /&gt;
* jump = none|plain|default&lt;br /&gt;
: Hide the jump-to links, render just the links or render as a phrase ('Update/Views:jump_to').&lt;br /&gt;
&lt;br /&gt;
* tags&lt;br /&gt;
: Treat the field value as a comma or semi-colon separated list of values.&lt;br /&gt;
&lt;br /&gt;
* truncate = n&lt;br /&gt;
: Truncate the value to at most n characters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_update_view_file --&amp;gt;&lt;br /&gt;
===update_view_file===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$filename = update_view_file( $repo, $langid, $localpath, $uri )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is the function which decides which type of view it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  * the main menu of views&lt;br /&gt;
  * the top level menu of a view&lt;br /&gt;
  * the sub menu of a view&lt;br /&gt;
  * a page within a single value of a view&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Does not update the file if it's not needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_pseudo_views_class --&amp;gt;&lt;br /&gt;
===Pseudo-Views Class===&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
===name===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$desc = $view-&amp;gt;name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a human-readable name of this view (for debugging).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_update_view_by_path --&amp;gt;&lt;br /&gt;
===update_view_by_path===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$view-&amp;gt;update_view_by_path( %opts )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Updates the view source files.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  on_write - callback called with the filename written&lt;br /&gt;
  langid - language to write&lt;br /&gt;
  do_menus - suppress generation of menus&lt;br /&gt;
  do_lists - suppress generation of lists&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
: Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
: This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Paginate/Columns&amp;diff=10707</id>
		<title>API:EPrints/Paginate/Columns</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Paginate/Columns&amp;diff=10707"/>
		<updated>2013-01-22T09:57:03Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Paginate/Columns.pm|package_name=EPrints::Paginate::Columns}}[[Category:API|COLUMNS]][[Category:API:EPrints/Paginate|COLUMNS]][[Category:API:EPrints/Paginate/Columns|COLUMNS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
'''EPrints::Paginate::Columns''' - Methods for rendering a paginated List as sortable columns&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search/External&amp;diff=10706</id>
		<title>API:EPrints/Plugin/Search/External</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Search/External&amp;diff=10706"/>
		<updated>2013-01-22T09:56:49Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: Created page with '&amp;lt;!-- 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…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Search/External.pm|package_name=EPrints::Plugin::Search::External}}[[Category:API|EXTERNAL]][[Category:API:EPrints/Plugin/Search|EXTERNAL]][[Category:API:EPrints/Plugin/Search/External|EXTERNAL]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Search::Search::External&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
External data source search utility super class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Convert/Thumbnails&amp;diff=10705</id>
		<title>API:EPrints/Plugin/Convert/Thumbnails</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Convert/Thumbnails&amp;diff=10705"/>
		<updated>2013-01-22T09:56:48Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Convert/Thumbnails.pm|package_name=EPrints::Plugin::Convert::Thumbnails}}[[Category:API|THUMBNAILS]][[Category:API:EPrints/Plugin/Convert|THUMBNAILS]][[Category:API:EPrints/Plugin/Convert/Thumbnails|THUMBNAILS]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Convert::Thumbnails - thumbnail-sized versions of audio/video/images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Thumbnail How-to may also be useful: [[How to customise thumbnails]]&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;use EPrints;&lt;br /&gt;
&lt;br /&gt;
# enable audio previews&lt;br /&gt;
$c-&amp;gt;{plugins}-&amp;gt;{'Convert::Thumbnails'}-&amp;gt;{params}-&amp;gt;{audio} = 1;&lt;br /&gt;
# disable video previews&lt;br /&gt;
$c-&amp;gt;{plugins}-&amp;gt;{'Convert::Thumbnails'}-&amp;gt;{params}-&amp;gt;{video} = 0;&lt;br /&gt;
&lt;br /&gt;
# enable audio_*/video_* previews&lt;br /&gt;
$c-&amp;gt;{thumbnail_types} = sub {&lt;br /&gt;
	my( $list, $repo, $doc ) = @_;&lt;br /&gt;
&lt;br /&gt;
	push @$list, qw( audio_mp4 audio_ogg video_mp4 video_ogg );&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
my $plugin = $session-&amp;gt;plugin( &amp;quot;Convert&amp;quot; );&lt;br /&gt;
my %available = $plugin-&amp;gt;can_convert( $doc );&lt;br /&gt;
$plugin = $available{&amp;quot;thumbnail_video&amp;quot;}-&amp;gt;{plugin};&lt;br /&gt;
$new_doc = $plugin-&amp;gt;convert( $doc, &amp;quot;thumbnail_video&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
Conversion of images, videos and audio into preview/thumbnail versions.&lt;br /&gt;
&lt;br /&gt;
This plugin wraps the ImageMagick ''convert'' and ''ffmpeg'' tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_testing_audio_and_video_conversion --&amp;gt;&lt;br /&gt;
===Testing Audio and Video Conversion===&lt;br /&gt;
When files are uploaded to EPrints a file format identification process occurs. This is based on the &amp;lt;code&amp;gt;EP_TRIGGER_MEDIA_INFO&amp;lt;/code&amp;gt; callbacks. A set of callbacks are provided by ''lib/cfg.d/media_info.pl''. To customise these copy the file to your repository's ''cfg.d/'' directory.&lt;br /&gt;
&lt;br /&gt;
This plugin relies on the &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; info added by the file format identification. To check this is working export the EPrint as XML and check for a &amp;amp;lt;media&amp;amp;gt; entry in your document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  ./bin/export [archiveid] eprint XML [eprintid]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At any time you can re-run the file format identification by using &amp;lt;code&amp;gt;redo_mime_type&amp;lt;/code&amp;gt; in epadmin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  ./bin/epadmin redo_mime_type [archiveid] eprint [eprintid] --verbose&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If ''ffprobe'' is configured correctly you should see it being called for each document.&lt;br /&gt;
&lt;br /&gt;
Finally, to regenerate thumbnails do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  ./bin/epadmin redo_thumbnails [archiveid] [eprintid] --verbose&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_parameters --&amp;gt;&lt;br /&gt;
==PARAMETERS==&lt;br /&gt;
These parameters can be set through the '''plugins.pl''' configuration file. You must also configure the '''executables''' locations for &amp;lt;em&amp;gt;convert&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;ffmpeg&amp;lt;/em&amp;gt; in [[API:EPrints/SystemSettings|EPrints::SystemSettings]].&lt;br /&gt;
&lt;br /&gt;
* convert_formats = { ext =&amp;amp;gt; mime_type }&lt;br /&gt;
: Define the formats supported for input by the call_convert() method.&lt;br /&gt;
&lt;br /&gt;
* ffmpeg_formats = { ext =&amp;amp;gt; mime_type }&lt;br /&gt;
: Define the formats supported for input by the call_ffmpeg() method.&lt;br /&gt;
&lt;br /&gt;
* sizes = { size =&amp;amp;gt; [$w, $h] }&lt;br /&gt;
: Define the size of thumbnails that can be generated e.g. &amp;quot;small =&amp;amp;gt; [66,50]&amp;quot;. The image dimensions generated may be smaller than those specified if the aspect ratio of the source document is different.&lt;br /&gt;
&lt;br /&gt;
: Images are output in 8-bit paletted PNG.&lt;br /&gt;
&lt;br /&gt;
* video = 1&lt;br /&gt;
: Enable video previews.&lt;br /&gt;
&lt;br /&gt;
* audio = 1&lt;br /&gt;
: Enable audio previews.&lt;br /&gt;
&lt;br /&gt;
* video_height = &amp;quot;480&amp;quot;&lt;br /&gt;
: Video preview vertical lines.&lt;br /&gt;
&lt;br /&gt;
* audio_sampling = &amp;quot;44100&amp;quot;&lt;br /&gt;
: Audio frequency sampling rate in Hz.&lt;br /&gt;
&lt;br /&gt;
* audio_bitrate = &amp;quot;96k&amp;quot;&lt;br /&gt;
: Audio bit rate in kb/s&lt;br /&gt;
&lt;br /&gt;
* audio_codec = &amp;quot;libfaac&amp;quot;&lt;br /&gt;
: &amp;lt;em&amp;gt;ffmpeg&amp;lt;/em&amp;gt; compiled-in AAC codec name.&lt;br /&gt;
&lt;br /&gt;
* frame_rate = &amp;quot;10.00&amp;quot;&lt;br /&gt;
: Video frame rate in fps.&lt;br /&gt;
&lt;br /&gt;
* video_codec = &amp;quot;h264&amp;quot;&lt;br /&gt;
: &amp;lt;em&amp;gt;ffmpeg&amp;lt;/em&amp;gt; compiled-in H.264 codec name (may be libx264 on some platforms).&lt;br /&gt;
&lt;br /&gt;
* video_rate = &amp;quot;1500k&amp;quot;&lt;br /&gt;
: Video bit rate in kilobits.&lt;br /&gt;
&lt;br /&gt;
* call_convert = sub( $plugin, $dst, $doc, $src, $geom, $size )&lt;br /&gt;
: See [[API:EPrints/Plugin/Convert/Thumbnails#call_convert|call_convert]].&lt;br /&gt;
&lt;br /&gt;
* call_ffmpeg = sub( $plugin, $dst, $doc, $src, $geom, $size, $offset )&lt;br /&gt;
: See [[API:EPrints/Plugin/Convert/Thumbnails#call_ffmpeg|call_ffmpeg]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_can_convert --&amp;gt;&lt;br /&gt;
===can_convert===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;%types = $plugin-&amp;gt;can_convert( $doc )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Returns a hash map of types this plugin can convert $doc to.&lt;br /&gt;
&lt;br /&gt;
This may be relatively expensive to do if the plugin has to call an external tool to determine if it can export something.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_convert --&amp;gt;&lt;br /&gt;
===convert===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;$new_doc = $plugin-&amp;gt;convert( $eprint, $doc, $type )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Request the plugin converts $doc to $type, as returned by [[API:EPrints/Plugin/Convert/Thumbnails#can_convert|can_convert]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_export --&amp;gt;&lt;br /&gt;
===export===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;@filelist = $plugin-&amp;gt;export( $dir, $doc, $type )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Request the plugin converts $doc to $type, as returned by [[API:EPrints/Plugin/Convert/Thumbnails#can_convert|can_convert]]. Outputs the resulting files to $dir and returns their paths (excluding the leading $dir part).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_utility_methods --&amp;gt;&lt;br /&gt;
===Utility Methods===&lt;br /&gt;
 $ver = $plugin-&amp;amp;gt;convert_version()&lt;br /&gt;
Returns the MAJOR.MINOR version of ImageMagick.&lt;br /&gt;
&lt;br /&gt;
Returns 0.0 if the version can not be determined.&lt;br /&gt;
&lt;br /&gt;
 $ok = $plugin-&amp;amp;gt;is_video( $doc )&lt;br /&gt;
Returns true if $doc is a video.&lt;br /&gt;
&lt;br /&gt;
 $doc = $plugin-&amp;amp;gt;intermediate( $doc, $src, $geom, $src )&lt;br /&gt;
Attempt to find an intermediate document that we can use to convert from (e.g. make a thumbnail from a preview version).&lt;br /&gt;
&lt;br /&gt;
Returns the original $doc if not intermediate is found.&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;call_convert( $dst, $doc, $src, $geom, $size )&lt;br /&gt;
Calls the ImageMagick &amp;lt;em&amp;gt;convert&amp;lt;/em&amp;gt; tool to convert $doc into a thumbnail image. Writes the image to $dst. $src is the full path to the main file from $doc. The resulting image should not exceed $geom dimensions ([w,h] array ref).&lt;br /&gt;
&lt;br /&gt;
$size is the thumbnail-defined size (as-in the keys to the '''sizes''' parameter).&lt;br /&gt;
&lt;br /&gt;
This method can be overridden with the '''call_convert''' parameter.&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;call_ffmpeg( $dst, $doc, $src, $geom, $size, $offset )&lt;br /&gt;
Uses the &amp;lt;em&amp;gt;ffmpeg&amp;lt;/em&amp;gt; tool to do the image conversion of $doc. $dst is the filename to write to, $src is the filename to read from and $geom is the image dimensions to write.&lt;br /&gt;
&lt;br /&gt;
$size is the thumbnail-defined size (as-in the keys to the '''sizes''' parameter or '''audio''' or '''video''').&lt;br /&gt;
&lt;br /&gt;
$offset is the time offset to extract (for '''audio'''/'''video'''). It is an array ref of [HOUR, MINUTE, SECOND, FRAME].&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;export_mp3( $dst, $doc, $src, $rate )&lt;br /&gt;
Export $src to $dst in MP3 format at sampling rate $rate.&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;export_audio( $dst, $doc, $src, $container )&lt;br /&gt;
Export audio-only $src to $dst in $container format.&lt;br /&gt;
&lt;br /&gt;
Audio is encoded as &amp;lt;em&amp;gt;audio_codec&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;export_video( $dst, $doc, $src, $container )&lt;br /&gt;
Export audio and video $src to $dst in $container format with vertical lines $lines maintaining aspect ratio.&lt;br /&gt;
&lt;br /&gt;
Video is encoded as &amp;lt;em&amp;gt;video_codec&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Audio is encoded as &amp;lt;em&amp;gt;audio_codec&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 $plugin-&amp;amp;gt;export_cell( $dir, $doc, $src, $geom, $size, $offset )&lt;br /&gt;
Export $src to $dst in JPG format in dimensions $geom from offset $offset.&lt;br /&gt;
&lt;br /&gt;
 $secs = $plugin-&amp;amp;gt;calculate_offset( $duration, $offset )&lt;br /&gt;
Translates a seconds or percentage offset into seconds from the start time. If the resulting time is greater than $duration returns $duration.&lt;br /&gt;
&lt;br /&gt;
To specify seconds either use just a number (1234) or append 's' (1234s).&lt;br /&gt;
&lt;br /&gt;
To specify a percentage of $duration append '%' (52%).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[API:EPrints/Plugin|EPrints::Plugin]], [[API:EPrints/Plugin/Convert|EPrints::Plugin::Convert]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_author --&amp;gt;&lt;br /&gt;
==AUTHOR==&lt;br /&gt;
Copyright 2009 Tim Brody &amp;amp;lt;tdb2@ecs.soton.ac.uk&amp;amp;gt;, University of Southampton, UK.&lt;br /&gt;
&lt;br /&gt;
This module is released under the GPLv3 license.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Export/XSLT&amp;diff=10704</id>
		<title>API:EPrints/Plugin/Export/XSLT</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=API:EPrints/Plugin/Export/XSLT&amp;diff=10704"/>
		<updated>2013-01-22T09:56:43Z</updated>

		<summary type="html">&lt;p&gt;Tdb01r: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
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.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin/Export/XSLT.pm|package_name=EPrints::Plugin::Export::XSLT}}[[Category:API|XSLT]][[Category:API:EPrints/Plugin/Export|XSLT]][[Category:API:EPrints/Plugin/Export/XSLT|XSLT]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
EPrints::Plugin::Export::XSLT - XSLT-based exports&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
Create a file in &amp;lt;code&amp;gt;Plugins/Export/XSLT/&amp;lt;/code&amp;gt; called 'Title.xsl' containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsl:stylesheet&lt;br /&gt;
	version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
	xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;br /&gt;
	ept:name=&amp;quot;Titles&amp;quot;&lt;br /&gt;
	ept:visible=&amp;quot;all&amp;quot;&lt;br /&gt;
	ept:advertise=&amp;quot;1&amp;quot;&lt;br /&gt;
	ept:accept=&amp;quot;list/eprint dataobj/eprint&amp;quot;&lt;br /&gt;
	ept:mime_type=&amp;quot;application/xml; charset=utf-8&amp;quot;&lt;br /&gt;
	ept:qs=&amp;quot;0.1&amp;quot;&lt;br /&gt;
	xmlns:ept=&amp;quot;http://eprints.org/ep2/xslt/1.0&amp;quot;&lt;br /&gt;
	xmlns:ep=&amp;quot;http://eprints.org/ep2/data/2.0&amp;quot;&lt;br /&gt;
	exclude-result-prefixes=&amp;quot;ept ep&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsl:param name=&amp;quot;results&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsl:template match=&amp;quot;text()&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsl:template match=&amp;quot;/ept:template&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;titles&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;$results&amp;quot;/&amp;gt;&amp;lt;/titles&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsl:template match=&amp;quot;/ep:eprints/ep:eprint&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;ep:title&amp;quot;/&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This export plugin allows you to use XSL Transforms to export data from EPrints. The plugin is fed EPrints XML and can output any resulting data supported by XSLT.&lt;br /&gt;
&lt;br /&gt;
This is the inverse process of [[API:EPrints/Plugin/Import/XSLT|EPrints::Plugin::Import::XSLT]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_headers_and_footers --&amp;gt;&lt;br /&gt;
===Headers and Footers===&lt;br /&gt;
You can specify a template to use for your output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;xsl:template match=&amp;quot;ept:template&amp;quot;&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;html&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;body&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;xsl:value-of select=&amp;quot;$results&amp;quot;/&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;/body&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/html&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/xsl:template&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you can output unbalanced XML by using disable-output-escaping:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;xsl:template match=&amp;quot;ept:template&amp;quot;&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xsl:text disable-output-escaping=&amp;quot;yes&amp;quot;&amp;amp;gt;&lt;br /&gt;
      &amp;amp;amp;lt;html&amp;amp;amp;gt;&lt;br /&gt;
        &amp;amp;amp;lt;body&amp;amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/xsl:text&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xsl:value-of select=&amp;quot;$results&amp;quot;/&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/xsl:template&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_controlling_xml_declarations --&amp;gt;&lt;br /&gt;
===Controlling XML Declarations===&lt;br /&gt;
If your stylesheet outputs XML (the default):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;xsl:output method=&amp;quot;xml&amp;quot;/&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The XML declaration will only be outputted once at the start of the export, regardless of how many records there are.&lt;br /&gt;
&lt;br /&gt;
To output as XML and suppress the XML declaration entirely define an empty prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;xsl:stylesheet&lt;br /&gt;
    xmlns:ept=&amp;quot;http://eprints.org/ep2/xslt/1.0&amp;quot;&lt;br /&gt;
    ept:prefix=&amp;quot;&amp;quot;&lt;br /&gt;
  &amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_plugin_options --&amp;gt;&lt;br /&gt;
==PLUGIN OPTIONS==&lt;br /&gt;
All attributes on &amp;amp;lt;xsl:stylesheet&amp;amp;gt; that are in the EPT namespace are treated as plugin parameters. In addition to those parameters used by all [[API:EPrints/Plugin/Export|EPrints::Plugin::Export]] plugins XSLT uses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  prefix&lt;br /&gt;
    Value is printed before any content (defaults to XML decl.)&lt;br /&gt;
  postfix&lt;br /&gt;
    Value is printed after any content.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_stylesheet_parameters --&amp;gt;&lt;br /&gt;
==STYLESHEET PARAMETERS==&lt;br /&gt;
The following parameters are passed to the transform for each item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  total&lt;br /&gt;
    Total items in result set.&lt;br /&gt;
  position&lt;br /&gt;
    1-indexed position in result set.&lt;br /&gt;
  dataset&lt;br /&gt;
    Base id of the item's dataset (e.g. &amp;quot;eprint&amp;quot;).&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_extended_functions --&amp;gt;&lt;br /&gt;
==EXTENDED FUNCTIONS==&lt;br /&gt;
The standard EPrints global extended XPath functions are supported, see [[API:EPrints/XSLT|EPrints::XSLT]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[API:EPrints/Plugin/Export|EPrints::Plugin::Export]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
		
	</entry>
</feed>