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

Kostas Stamatis commented on DS-257:
------------------------------------

Just working on this issue and I wanted to comment some things:

1) Everyone who wants can review the code on 
https://github.com/kstamatis/DSpace/commits/DS-257 (latest commit)

2) So far, for the import, there must be a file named "dublin-core.xml" and as 
many files as different schemas the user has with the name 
"metadata_{schema_name}.xml"
However, the schema_name part in the file is never used. The thing that 
determined the schema of the metadata is the attribute "schema" in the root 
element of the xml file. The same applies for the dublin_core.xml file, even if 
it is named "dublin_core.xml", if the root element specifies an attribute named 
"schema" the value of this attribute will be used as a schema for the metadata 
inside this file.
having this in mind, the implemented code do the following: 

a) You need to have a new file named "metadata.xml" with the same root element 
as in the previous files but a "<metadatavalue> subelement (and not a 
"<dcvalue>" as before
b) Any subelement can have a "schema" attribute (apart from "element", 
"qualifier" and "language").
c) If "schema" element is not given, the "schema" value of the attribute in the 
root element is supposed to be the schema for the specific row
d) If no schema is given in the root element, the super default "dc" is 
supposed.
e) All files are permitted to exist for an item: "dublin-core.xml", 
"metadata_{schema_name}.xml and "metadata.xml". The tool can parse all of them 
even if they co-exist!
f) The exporter tool has an option o (onefile) (which is default to false) in 
order to export multiple files (old version) or just one file (metadata.xml - 
new version)


I would be helpful if anyone could comment on this, review the code and/or test 
it in his local environment,

                
> Item Import and Export, use of multiple metadata schema
> -------------------------------------------------------
>
>                 Key: DS-257
>                 URL: https://jira.duraspace.org/browse/DS-257
>             Project: DSpace
>          Issue Type: Improvement
>          Components: DSpace API
>    Affects Versions: 1.6.0
>            Reporter: Claudia Jürgen
>            Assignee: Kostas Stamatis
>            Priority: Major
>              Labels: has-patch
>         Attachments: ItemImExport.patch
>
>
> At the moment the item import of items with metadata from different metadata 
> schemata requires an extra metadata file per schema.
> This patch enables the use of one metadata file which can hold metadata of 
> all schema both for import and export.
> The new file is named (schema neutral) metadata.xml and got the structure
> <?xml version="1.0" encoding="utf-8" standalone="no"?>
> <metadata>
> <metadatavalue schema="SCHEMA" element="ELEMENT" qualifier="QUALIFIER/NONE"  
> language="LANGUAGE">Foo
> </metadatavalue>
> ...
> </metadata>
> A new command line option is introduced
> -l  for the use of the default language qualifier which defaults to not use it
> This will avoid assigning unintentionally wrongly qualified metadata, as it 
> is often the case with DSpace instances which hold non en metainformation.
> Furthermore this patch fixes DS-256 
> http://jira.dspace.org/jira/browse/DS-256. 
> (The documentation will follow for the DSpace docs will follow.)

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

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to