[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] import "feature"



Dear all,

as you know i'm testing 3.3.10.
Our repository is a "read-only" repository : all records are imported 
from another internal software used to collect publication records from 
authors. The importing method is via batch file XML.
When i implemented the past repository on 3.2.4 i noticed a strange 
behaviour with import program, it seemed not to update records : 
--update parameter didn't work when the record was already present. I 
resolved deleting and importing new records also per records already 
present.
Now with 3.3.10 version the situation seems to be similar: having more 
experience with eprints source i debugged the import program again and i 
think i'm resolving the problem with this little patch.

--- /data/eprints-3.3.10/bin/import    2012-05-18 15:21:23.000000000 +0200
+++ import    2012-08-30 17:28:07.000000000 +0200
@@ -335,6 +335,7 @@
              $item->update( $epdata,
                      include_subdataobjs => 1,
                  );
+                        $item->commit();
              print "EPRINTS_IMPORT: ITEM_UPDATED ".$item->get_id."\n" 
if $scripted;
          }
          elsif( defined($item = $opts{dataset}->create_dataobj( $epdata 
)) )


What do you think about ? Am i missed something ? Is it acceptable ?

The import program is called with this parameters :

~/bin/import "EPRINTS_REPOSITORY"  --force --verbose 
--enable-web-imports --enable-import-fields --update archive XML 
"EPRINTS_XML"

Best regards,
Paolo Tealdi

-- 
Ing. Paolo Tealdi         Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi,  24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail