(Copying in dspace-tech again for this response. Please keep all messages on list.)
In DSpace 7, all tasks that can be performed from the UI can also be performed via the REST API. Therefore, as of DSpace 7 it is possible to create metadata fields programmatically using the REST API. Here's the endpoint which is used: https://github.com/DSpace/RestContract/blob/main/metadatafields.md#creating-a-metadata-field You can also watch (using your browser's dev tools) the requests sent from the UI to the REST API when you create a new field for more examples. Tim ________________________________ From: Milan Majchrak <[email protected]> Sent: Tuesday, April 5, 2022 2:31 AM To: Tim Donohue <[email protected]> Subject: Re: [dspace-tech] Re: Cannot see created custom metadata in the Item Hi Tim, thank for your quick answer, it works! I still find out how to create/define custom metadata by configuration/programatically and I would like to see custom metadata after first run in the dspace. Is it possible to create custom metadata by configuration? Thank you! Milan Majchrak dataquest s.r.o. po 4. 4. 2022 v 16:50 odesÃlatel 'Tim Donohue' via DSpace Technical Support <[email protected]<mailto:[email protected]>> napsal: Hi Milan, The "local-types.xml" file is only used to *initialize* metadata fields in a fresh install of DSpace. After that, you can add/remove/customize all metadata fields (and schemas) from the Administrative User Interface of DSpace. As an example, here's how you'd add a field to the "local" schema in DSpace 7: 1. Login as an Administrator 2. In the side menu that appears, open the "Registries" menu. Click on "Metadata". This is where all your Metadata fields are defined 3. Now, you'll see a list of all the metadata schema that DSpace is initialized with. click on the "local" schema to see its fields 4. The "local" schema is empty by default, so no fields should appear. But, you can add a new field by minimally adding an Element & clicking Save. For example, to create "local.myfield", place the text "myfield" in the Element and click Save. To add a field named "local.myfield.other", add the text "myfield" in the Element and "other" in Qualifier and click Save. At this point, the metadata field is immediately created. It can be used immediately in any Edit screen. But if you want to add it to your Submission forms you'd need to customize your Submission forms. See https://wiki.lyrasis.org/display/DSDOC7x/Submission+User+Interface If you want it to appear in your Item view pages, you may need to customize the User Interface to display it. See https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Customization If you have other questions, feel free to ask them on this list. Tim On Monday, April 4, 2022 at 9:19:02 AM UTC-5 [email protected]<mailto:[email protected]> wrote: Hi all, I have been started customizing DSpace for a few days and I cannot solve one - hope simple problem. When I create a new local metadata or some dublin core type I cannot see added metadata in the Item, it is not in the database too. My procedure (dspace is running locally): 1. I added a new custom metadata to the local-types.xml . 2. Run mvn package in the [dspace-source]/dspace 3. Update tomcat webapp 4. Copied Solr configsets, restart sorl 5. Run dspace database migrate in the [dspace]/bin 6. Run tomcat After that I hoped the changes will be seen, but nothing. What am I doing wrong? Than you for you advice! Have a nice day, Milan Majchrak dataquest s.r.o. -- 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 a topic in the Google Groups "DSpace Technical Support" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/ELon2GCD118/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/cee1a5bf-ab02-496a-ab6b-2b6ba91bc316n%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/cee1a5bf-ab02-496a-ab6b-2b6ba91bc316n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/PH0PR22MB327465260C96B09AF94D31D8EDE49%40PH0PR22MB3274.namprd22.prod.outlook.com.
