Dear Lewatle,

I've done this via a csv file and a some simple steps to push metadatafields directly into the postgres database. This is how it works:

1) create metadata-schema in dspace webinterface first and keep the schema-id in mind
2) update metadatafieldregistry.csv with the schema-id:
   sed -i 's/^/[schema-id]/' metadatafieldregistry.csv
3) copy csv into dspace database
psql> copy metadatafieldregistry (metadata_schema_id,element,qualifier) from '/path/to/metadatafieldregistry.csv' (DELIMITER('|'));
4) correct null values:
psql> update metadatafieldregistry set (qualifier) = (NULL) where qualifier = '';
5) restart tomcat or reload webapp

My csv file looks as follows:

$ head metadatafieldregistry.csv
|accessRights|
|acronym|
|additionalTitle|type#AlternativeTitle
|additionalTitle|type#Subtitle
|additionalTitle|type#TranslatedTitle
|alternateIdentifier|
|description|
|enddate|
|funder|
|funder|Other

After step 2) it should look like this (assuming your schema-id is 5):
$ head metadatafieldregistry.csv
5|accessRights|
5|acronym|
...

The actual values of this file are like 'schema-id|element|qualifier' (see step 3) ). You may easily extend it if you also need the scope_note.

HTH,
Christian


Am 20.06.2016 um 16:11 schrieb Lewatle Johannes Phaladi:
> Dear All,
>
> Is there anyway of importing metadata schema to Dspace rather than
> manually adding them, and also adding fields without adding them one by one?
>
> please see attached image, i have added few metadata schemas and fields
> manually, but i would like to know if there is a way to import them
> automatically.
>
> Regards,
> Lewatle
>
> --
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.




---------------------------------
Christian Loeschen, Dipl.-Ing. (FH)
Wiss. Mitarbeiter/Research Associate

Technische Universität Dresden
Center for Information Services and HPC (ZIH)
Distributed and Data Intensive Computing

01062 Dresden (Germany)
Phone: +49 351 463-42330
Fax :    +49 351 463-37773
E-Mail: [email protected]
---------------------------------


--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to