Issue facing while Bulk Editing metadata of Subject Category

256 views
Skip to first unread message

SAI KUMAR S

unread,
Mar 7, 2024, 8:15:39 AM3/7/24
to DSpace Community
Hi,

Good Evening All

Facing issue while performing bulk edits on metadata within the 'dc.subject' field in our DSpace instance.

While the keywords are being correctly listed, I've encountered difficulties when attempting to add 'dc.subject' as a category. This issue arises specifically when we refer to values sourced from our 'srsc.xml' file. We have many categories mention in the file but for example I have mentioned below

<?xml version="1.0" encoding="UTF-8"?>
<node id="ResearchSubjectCategories" label="Research Subject Categories">
    <isComposedBy>
        <node id="SCB11" label="Agricultural &amp; Biological Sciences">
            <isComposedBy>
                <node id="SCB110" label="Agriculture Sciences">
                    <isComposedBy>
                        <node id="VR110102" label="Agricultural Biotechnology ">
                            <hasNote>Agricultural Biotechnology</hasNote>
                        </node>
                    </isComposedBy>
                  <hasNote>Agriculture Sciences</hasNote>
                </node>
</isComposedBy>
</node>
</isComposedBy>
</node>

During manual submission of items, we typically input "Agricultural Biotechnology" in the Subject Keyword field of the submission form. Subsequently, we proceed with depositing the item by including all other requisite metadata.

However, upon searching for the deposited items within the repository and reviewing their details, I've noticed that the 'dc.subject' field displays the values in a format.

For instance, it appears as follows: "Agricultural & Biological Sciences::Agriculture Sciences::Agricultural Biotechnology".

Furthermore, when attempting to export the metadata to a .csv file and make modifications – such as adding
Agricultural & Biological Sciences::Agriculture Sciences::Organic Farming, Rural Development, Sustainable Agriculture – and subsequently importing the modified .csv file using the 'import-metadata' tool, I encounter an error.

The error message reads as follows:

2024-03-04 18:00:10.282 INFO metadata-import - 19 @ The script has started
2024-03-04 18:00:10.316 ERROR metadata-import - 19 @ null
2024-03-04 18:00:10.319 ERROR metadata-import - 19 @ java.lang.NumberFormatException: For input string: "Agricultural Biotechnology"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.valueOf(Integer.java:983)
at org.dspace.app.bulkedit.MetadataImport.compareAndUpdate(MetadataImport.java:748)
at org.dspace.app.bulkedit.MetadataImport.runImport(MetadataImport.java:415)
at org.dspace.app.bulkedit.MetadataImport.internalRun(MetadataImport.java:217)
at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:150)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Could you please assist me in resolving this issue? Any insights or guidance you can provide would be greatly appreciated.

Thankyou
- Sai Kumar S


Tianyi Gu

unread,
Mar 7, 2024, 8:41:33 AM3/7/24
to SAI KUMAR S, DSpace Community
Hi Sai,

If you question on is about Metadata import, please see the instructions below:

Basically, you need to export first to get these items index number, metadata, metadata value, then modify the metadata values, at last import the package back.

Thanks,
Tianyi 

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/df25c8d0-2578-4823-9b4d-b4bb9531f426n%40googlegroups.com.

Toni Prieto

unread,
Mar 7, 2024, 11:10:14 AM3/7/24
to dspace-c...@googlegroups.com

Hi,

This could be related to the default delimiter used to separate authority data in imported csv files. See:

https://github.com/DSpace/DSpace/blob/main/dspace/config/modules/bulkedit.cfg#L15

setting a different separator in local.cfg might fix the issue. For example, ussing $$:

bulkedit.authorityseparator = $$

Regards,

Toni


El 7/3/24 a las 14:15, SAI KUMAR S escribió:
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/df25c8d0-2578-4823-9b4d-b4bb9531f426n%40googlegroups.com.
-- 
Toni Prieto
Universitat Politècnica de Catalunya
Tel.: 93 405 42 49

SAI KUMAR S

unread,
Mar 8, 2024, 1:53:16 AM3/8/24
to DSpace Community

Hi,

@Toni Prieto @Tianyi Gu

Thank you very much for your prompt response and for providing a solution to the issue I encountered with bulk editing metadata in DSpace.

I appreciate your assistance in resolving the problem. The solution "bulkedit.authorityseparator = $$" you provided has been implemented successfully, and I can confirm that the issue has been resolved.

Once again, thank you for your help and support in addressing this matter.

Regards
- Sai Kumar S
Reply all
Reply to author
Forward
0 new messages