Difference between revisions of "API:EPrints/DataObj/Import"
(4 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
<!-- Pod2Wiki=head_description --> | <!-- Pod2Wiki=head_description --> | ||
==DESCRIPTION== | ==DESCRIPTION== | ||
− | + | This class represents a mass import of record's (i.e. eprint data objects) into a repository. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 171: | Line 132: | ||
ID of the user responsible for causing the import. | 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_instance_variables --> | ||
+ | ==INSTANCE VARIABLES== | ||
+ | See [[API:EPrints/DataObj#INSTANCE_VARIABLES|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%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 290: | Line 262: | ||
$eprint = $import->get_from_source( $sourceid ) | $eprint = $import->get_from_source( $sourceid ) | ||
− | Get the | + | Get the eprint 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%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 303: | Line 275: | ||
$dataobj = $import->epdata_to_dataobj( $dataset, $epdata ) | $dataobj = $import->epdata_to_dataobj( $dataset, $epdata ) | ||
− | Convert <tt>$epdata</tt> to | + | Convert <tt>$epdata</tt> to an eprint data object. 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. | Also calls <tt>set_eprint_import_automatic_fields</tt> on the object before writing it to the database. |
Latest revision as of 17:08, 10 January 2022
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
Contents
NAME
EPrints::DataObj::Import - bulk imports logging
DESCRIPTION
This class represents a mass import of record's (i.e. eprint data objects) into a repository.
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.
INSTANCE VARIABLES
See EPrints::DataObj.
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 an eprint data object. 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/.