Export migrate option incorrectly removes non-handle identifier.uris
--------------------------------------------------------------------

                 Key: DS-303
                 URL: http://jira.dspace.org/jira/browse/DS-303
             Project: DSpace 1.x
          Issue Type: Bug
          Components: DSpace API
    Affects Versions: 1.5.2
            Reporter: Stuart Lewis
            Assignee: Stuart Lewis
            Priority: Minor
             Fix For: 1.6.0


Reported by John Davison:


Collection-based export is working as expected when using the -m 
(migrate) flag in DSpace 1.5.2 with one exception.

/bin/export ItemExport --type=COLLECTION --id=collID --dest=dest_dir 
--number=seq_num -m

This will correctly remove the handle file, as well as the following 
metadata fields from dublin_core.xml:
 <dcvalue element="date" qualifier="accessioned"></dcvalue>
 <dcvalue element="date" qualifier="available"></dcvalue>
 <dcvalue element="date" qualifier="issued"></dcvalue>*
 <dcvalue element="description" qualifier="provenance"></dcvalue>
 <dcvalue element="format" qualifier="extent"></dcvalue>
 <dcvalue element="format" qualifier="mimetype"></dcvalue>
(*Date.issued is retained if the item has been published before.)

It also removes dc.identifier.uri in all cases. The dspace_migrate 
script uses a regular expression to only remove identifier.uri fields 
that start with http://hdl (retaining non-handle based identifier.uri 
elements), while ItemExport.java is eliminating all identifier.uri fields.

Line 474:
               if ((!migrate) ||
                   (migrate && !(
                    (dcv.element.equals("date") && 
qualifier.equals("issued")) ||
                    (dcv.element.equals("date") && 
qualifier.equals("accessioned")) ||
                    (dcv.element.equals("date") && 
qualifier.equals("available")) ||
                    (dcv.element.equals("identifier") && 
qualifier.equals("uri")) ||
                    (dcv.element.equals("description") && 
qualifier.equals("provenance")) ||
                    (dcv.element.equals("format") && 
qualifier.equals("extent")) ||
                    (dcv.element.equals("format") && 
qualifier.equals("mimetype")))))
               {
                   out.write(utf8, 0, utf8.length);


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to