Difference between revisions of "API:EPrints/Plugin/Export"

From EPrints Documentation
Jump to: navigation, search
(Created page with '<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' com…')
 
(new)
 
Line 22: Line 22:
 
Creates a new Export plugin. In addition to those parameters defined by [[API:EPrints/Plugin|EPrints::Plugin]]:
 
Creates a new Export plugin. In addition to those parameters defined by [[API:EPrints/Plugin|EPrints::Plugin]]:
  
* accept
+
* accept (default: [])
 
: Array reference of object types this plugin can accept.
 
: Array reference of object types this plugin can accept.
  
* advertise
+
* advertise (default: true)
 
: Boolean for whether to advertise this plugin to users.
 
: Boolean for whether to advertise this plugin to users.
  
* arguments
+
* arguments (default: {})
 
: Hash reference of supported arguments/default values.
 
: Hash reference of supported arguments/default values.
  
* mimetype
+
* mimetype (default: undef)
 
: The MIME type to set when outputting to an HTTP response.
 
: The MIME type to set when outputting to an HTTP response.
  
* produce
+
* produce (default: returned value of sub mime_type)
 
: Array reference of MIME types this plugin can output. By default includes '''application/x-eprints-export-XXX''', where <em>XXX</em> is the case-insensitive id of the plugin.
 
: Array reference of MIME types this plugin can output. By default includes '''application/x-eprints-export-XXX''', where <em>XXX</em> is the case-insensitive id of the plugin.
  
* qs
+
* qs (default: 0.5)
 
: Score used to determine which plugin to use, if all else is equal, where 0 is least likely and 1 is most likely.
 
: Score used to determine which plugin to use, if all else is equal, where 0 is least likely and 1 is most likely.
  
* suffix
+
* suffix (default: ".txt")
 
: File name extension to use when outputting to file.
 
: File name extension to use when outputting to file.
  
* visible
+
* visible (default: "all")
 
: "staff" (staff only) or "all" (anyone).
 
: "staff" (staff only) or "all" (anyone).
  
Line 51: Line 51:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki=head_initialise_fh -->
 
<!-- Pod2Wiki=head_initialise_fh -->
 +
 
===initialise_fh===
 
===initialise_fh===
  

Latest revision as of 13:40, 17 October 2013

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


API: Core API

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


NAME

EPrints::Plugin::Export


METHODS

new

$plugin = EPrints::Plugin::Export->new( %params )

Creates a new Export plugin. In addition to those parameters defined by EPrints::Plugin:

  • accept (default: [])
Array reference of object types this plugin can accept.
  • advertise (default: true)
Boolean for whether to advertise this plugin to users.
  • arguments (default: {})
Hash reference of supported arguments/default values.
  • mimetype (default: undef)
The MIME type to set when outputting to an HTTP response.
  • produce (default: returned value of sub mime_type)
Array reference of MIME types this plugin can output. By default includes application/x-eprints-export-XXX, where XXX is the case-insensitive id of the plugin.
  • qs (default: 0.5)
Score used to determine which plugin to use, if all else is equal, where 0 is least likely and 1 is most likely.
  • suffix (default: ".txt")
File name extension to use when outputting to file.
  • visible (default: "all")
"staff" (staff only) or "all" (anyone).



initialise_fh

$plugin->initialise_fh( FH )

Initialise the file handle FH for writing. This may be used to manipulate the Perl IO layers in effect.

Defaults to setting the file handle to binary semantics.


byte_order_mark

$bom = $plugin->byte_order_mark

If writing a file the byte order mark will be written before any other content. This may be necessary to write plain-text Unicode-encoded files.

Defaults to empty string.


COPYRIGHT

Copyright 2000-2011 University of Southampton.

This file is part of EPrints http://www.eprints.org/.

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.

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.

You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.