Difference between revisions of "API:EPrints/CLIProcessor"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/CLIProcessor.pm|package_name=EPrints::CLIProcessor}}[[Category:API|CLIProcessor]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/CLIProcessor.pm|package_name=EPrints::CLIProcessor}}[[Category:API|CLIPROCESSOR]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
 
EPrints::CLIProcessor - utility module supporting command-line scripts
 
  
<!-- End of Pod2Wiki -->
+
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 +
'''EPrints::CLIProcessor''' - utility module supporting command-line scripts
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 
Currently this module is just a 'handler' for import scripts. In future it may do more things to support the CLI (Command-Line Interface) to EPrints.
 
Currently this module is just a 'handler' for import scripts. In future it may do more things to support the CLI (Command-Line Interface) to EPrints.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=head_methods -->=METHODS=
+
<span style='display:none'>User Comments</span>
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_new -->==new==
+
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_methods -->
 +
==METHODS==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_color -->
 +
===color===
 +
 
 +
EPrints::CLIProcessor::color( $type )
 +
Returns boolean depending on whether $type is a permitted setting for  the '''EPrints::CLIProcessor'''.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
  $processor = EPrints::CLIProcessor-&gt;new( session =&gt; $session, %opts )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_new -->
 +
===new===
  
 +
$processor = EPrints::CLIProcessor-&gt;new( session =&gt; $session, %opts )
 
Create a new processor object. Supported options:
 
Create a new processor object. Supported options:
  
 
   scripted - backwards compatibility for import scripted interface
 
   scripted - backwards compatibility for import scripted interface
 +
  epdata_to_dataobj - replace [[API:EPrints/CLIProcessor#epdata_to_dataobj|epdata_to_dataobj]]
 +
  message - replace [[API:EPrints/CLIProcessor#message|message]]
 
    
 
    
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_add_message -->==add_message==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_add_message -->
 +
===add_message===
 +
 
 +
$processor-&gt;add_message( $type, $msg )
 +
Add a message for the user. $type is 'error', 'warning' or 'message'. $msg is an XHTML fragment.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
  $processor-&gt;add_message( TYPE, MESSAGE )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_epdata_to_dataobj -->
 +
===epdata_to_dataobj===
  
Add a message for the user. TYPE is 'error', 'warning' or 'message'. MESSAGE is an XHTML fragment.
+
$dataobj = $processor-&gt;epdata_to_dataobj( $epdata, %opts )
 +
Requests the handler create the new object from $epdata.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_parsed -->==parsed==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $processor-&gt;parsed( [ $epdata ] )
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_parsed -->
 +
===parsed===
 +
 +
$processor-&gt;parsed( [ $epdata ] )
 
Register a parsed event, optionally with $epdata.
 
Register a parsed event, optionally with $epdata.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_object -->==object==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_object -->
 +
===object===
 +
 
 +
$processor-&gt;object( $dataset, $dataobj )
 +
Register a new object event in $dataset with new object $dataobj.
  
  $processor-&gt;object( DATASET, DATAOBJ )
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
Register a new object event in DATASET with new object DATAOBJ.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
</div>
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_copyright -->
<!-- Pod2Wiki=item_color -->==color==
+
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_message -->==message==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
</div>
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Revision as of 10:10, 20 December 2021

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::CLIProcessor - utility module supporting command-line scripts

User Comments


DESCRIPTION

Currently this module is just a 'handler' for import scripts. In future it may do more things to support the CLI (Command-Line Interface) to EPrints.

User Comments


METHODS

User Comments


color

EPrints::CLIProcessor::color( $type )

Returns boolean depending on whether $type is a permitted setting for the EPrints::CLIProcessor.

User Comments


new

$processor = EPrints::CLIProcessor->new( session => $session, %opts )

Create a new processor object. Supported options:

 scripted - backwards compatibility for import scripted interface
 epdata_to_dataobj - replace epdata_to_dataobj
 message - replace message
 

User Comments


add_message

$processor->add_message( $type, $msg )

Add a message for the user. $type is 'error', 'warning' or 'message'. $msg is an XHTML fragment.

User Comments


epdata_to_dataobj

$dataobj = $processor->epdata_to_dataobj( $epdata, %opts )

Requests the handler create the new object from $epdata.

User Comments


parsed

$processor->parsed( [ $epdata ] )

Register a parsed event, optionally with $epdata.

User Comments


object

$processor->object( $dataset, $dataobj )

Register a new object event in $dataset with new object $dataobj.

User Comments


COPYRIGHT

© Copyright 2023 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

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

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 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 3.4. If not, see http://www.gnu.org/licenses/.

User Comments