API:EPrints/DataObj/Import: Difference between revisions
m adding Category:Rubbish, page was emptied 9 years ago and has been untouched since |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category: | <!-- Pod2Wiki=_preamble_ | ||
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. | |||
-->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/Import.pm|package_name=EPrints::DataObj::Import}}[[Category:API|IMPORT]][[Category:API:EPrints/DataObj|IMPORT]]<div><!-- Edit below this comment --> | |||
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | |||
==NAME== | |||
'''EPrints::DataObj::Import''' - bulk imports logging | |||
<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== | |||
Inherits from [[API:EPrints/DataObj|EPrints::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 --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=head_instance_variables --> | |||
==INSTANCE VARIABLES== | |||
<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_$obj->{ --> | |||
===$obj->{ "data" }=== | |||
<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_$obj->{ --> | |||
===$obj->{ "dataset" }=== | |||
<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_$obj->{ --> | |||
===$obj->{ "session" }=== | |||
<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_core_metadata_fields --> | |||
==CORE METADATA FIELDS== | |||
<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_importid --> | |||
===importid (counter)=== | |||
Unique ID for the import. | |||
<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_datestamp --> | |||
===datestamp (timestamp)=== | |||
Time import record was created. | |||
<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_source_repository --> | |||
===source_repository (text)=== | |||
Source entity from which this import came. | |||
<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_url --> | |||
===url (longtext)=== | |||
Location of the imported content (e.g. the file name). | |||
<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_description --> | |||
===description (longtext)=== | |||
Human-readable description of the import. | |||
<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_last_run --> | |||
===last_run (time)=== | |||
Time the import was last started. | |||
<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_last_success --> | |||
===last_success (time)=== | |||
Time the import was last successfully completed. | |||
<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_references_and_related_objects --> | |||
==REFERENCES AND RELATED OBJECTS== | |||
<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_userid --> | |||
===userid (itemref)=== | |||
ID of the user responsible for causing the import. | |||
<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_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=head_class_methods --> | |||
===Class 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_get_system_field_info --> | |||
====get_system_field_info==== | |||
$fields = EPrints::DataObj::Import->get_system_field_info | |||
Returns an array describing the system metadata of the import dataset. | |||
<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_get_dataset_id --> | |||
====get_dataset_id==== | |||
$dataset = EPrints::DataObj::Import->get_dataset_id | |||
Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs. | |||
<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_object_methods --> | |||
===Object 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_run --> | |||
====run==== | |||
$list = $import->run( $processor ) | |||
Run this bulk import. Returns a list of created eprint data objects. <tt>$processor</tt> is used for reporting errors. | |||
<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_map --> | |||
====map==== | |||
$import->map( $fn, $info ) | |||
Maps the function <tt>$fn</tt> onto every eprint in this import. | |||
<tt>$info</tt> provides additonal information that may need to be processed by the function <tt>$fn</tt>. | |||
<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_clear --> | |||
====clear==== | |||
$import->clear | |||
Clear the contents of this bulk import. | |||
<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_get_list --> | |||
====get_list==== | |||
$list = $import->get_list | |||
Returns a list of the items in this import. | |||
<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_get_from_source --> | |||
====get_from_source==== | |||
$eprint = $import->get_from_source( $sourceid ) | |||
Get the <tt>$eprint</tt> that is from this import set and identified by <tt>$sourceid</tt>. | |||
<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_epdata_to_dataobj --> | |||
====epdata_to_dataobj==== | |||
$dataobj = $import->epdata_to_dataobj( $dataset, $epdata ) | |||
Convert <tt>$epdata</tt> to a <tt>$dataobj</tt>. If an existing object exists in this import that has the same identifier that object will be used instead of creating a new object. | |||
Also calls <tt>set_eprint_import_automatic_fields</tt> on the object before writing it to the database. | |||
<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_see_also --> | |||
==SEE ALSO== | |||
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]]. | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=head_copyright --> | |||
==COPYRIGHT== | |||
{{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 --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> | |||
Revision as of 20:47, 29 December 2021
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
NAME
EPrints::DataObj::Import - bulk imports logging
DESCRIPTION
Inherits from EPrints::DataObj.
INSTANCE VARIABLES
$obj->{ "data" }
$obj->{ "dataset" }
$obj->{ "session" }
CORE METADATA FIELDS
importid (counter)
Unique ID for the import.
datestamp (timestamp)
Time import record was created.
source_repository (text)
Source entity from which this import came.
url (longtext)
Location of the imported content (e.g. the file name).
description (longtext)
Human-readable description of the import.
last_run (time)
Time the import was last started.
last_success (time)
Time the import was last successfully completed.
REFERENCES AND RELATED OBJECTS
userid (itemref)
ID of the user responsible for causing the import.
METHODS
Class Methods
get_system_field_info
$fields = EPrints::DataObj::Import->get_system_field_info
Returns an array describing the system metadata of the import dataset.
get_dataset_id
$dataset = EPrints::DataObj::Import->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
Object Methods
run
$list = $import->run( $processor )
Run this bulk import. Returns a list of created eprint data objects. $processor is used for reporting errors.
map
$import->map( $fn, $info )
Maps the function $fn onto every eprint in this import.
$info provides additonal information that may need to be processed by the function $fn.
clear
$import->clear
Clear the contents of this bulk import.
get_list
$list = $import->get_list
Returns a list of the items in this import.
get_from_source
$eprint = $import->get_from_source( $sourceid )
Get the $eprint that is from this import set and identified by $sourceid.
epdata_to_dataobj
$dataobj = $import->epdata_to_dataobj( $dataset, $epdata )
Convert $epdata to a $dataobj. If an existing object exists in this import that has the same identifier that object will be used instead of creating a new object.
Also calls set_eprint_import_automatic_fields on the object before writing it to the database.
SEE ALSO
EPrints::DataObj and EPrints::DataSet.
COPYRIGHT
© Copyright 2000-2024 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/.