[ 
https://jira.duraspace.org/browse/DS-973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21754#comment-21754
 ] 

Stuart Lewis commented on DS-973:
---------------------------------

Hi Ivan,

Could you re-test this please?  I've tried, and it worked OK for me.  It is 
handled by this piece of code:

See: 
http://scm.dspace.org/svn/repo/dspace/trunk/dspace-api/src/main/java/org/dspace/app/bulkedit/DSpaceCSV.java


                    // Verify that the heading is valid in the metadata registry
                    String[] clean = element.split("\\[");
                    String[] parts = clean[0].split("\\.");

                    if (parts.length < 2) {
                        throw new MetadataImportInvalidHeadingException(element,
                                                                        
MetadataImportInvalidHeadingException.ENTRY,
                                                                        
columnCounter);
                    }

Any heading with less than one period ('.') in it will fail this test, and 
throw the exception.  Then see:

http://scm.dspace.org/svn/repo/dspace/trunk/dspace-api/src/main/java/org/dspace/app/bulkedit/MetadataImportInvalidHeadingException.java

        else
        {
            return "Bad metadata declaration in row " + column + ": " + 
badHeading;
        }

Thanks,


Stuart
                
> Improve error reporting during CSV import
> -----------------------------------------
>
>                 Key: DS-973
>                 URL: https://jira.duraspace.org/browse/DS-973
>             Project: DSpace
>          Issue Type: Bug
>          Components: DSpace API
>    Affects Versions: 1.7.0, 1.7.1, 1.7.2, 1.8.0
>            Reporter: Ivan Masár
>            Assignee: Stuart Lewis
>
> The metadata-import script returns "Error reading file: 1" when the CSV 
> header contains an unknown element (e.g. "test").
> It works well if the element is qualified (e.g. "dc.test") "Error reading 
> file: Unknown metadata element in heading: dc.test"
> There should be a more helpful error message for this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy 
to use, easy to manage, easy to install, easy to extend. 
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel
  • [Dspace-devel] [DuraSpace JIRA] ... Stuart Lewis (Commented) (DuraSpace JIRA)

Reply via email to