[
http://jira.dspace.org/jira/browse/DS-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10751#action_10751
]
Jeffrey Trimble commented on DS-257:
------------------------------------
It seems that there is a way to resolve this very elegantly and without having
to deal with backwards compatibility at this point. First,
the import code could "fork" to expect one of two types of files
automatically. (That is, we test for the file name):
dublin_core.xml OR metadata.xml
If the test result is dublin_core.xml, then the program proceeds to process as
it always has. If the import code test returns
the file "metadata.xml", then it now looks at the dspace.cfg file to see its
property keys which we will define as follows
and will provide examples of the metadata.xml file.
We define the following in dspace.cfg:
xmlschema=dc | dcvalue, vra | vra_value, mods | mods_value
The first element is the schema, and second element is the expected and define
schema that will be used coding the xml
file. Examples using the property key defined above:
For the xmlschema=dc | dcvalue we have:
Then we have the following "metadata.xml"
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xml_schema="dc">
<dcvalue element="something" qualifier="something>Foo</dcvalue>
</xml_schema>
or if using, for example, VRA
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xml_schema="vra">
<vra_value element="something" qualifier="something>Foo</vr_avalue>
</xml_schema>
Notice a little redundancy? This would assist in making sure that the file
doesn't have mixed schema and that
the import is able to look at the correct metadata registry. If a coding
mismatch is found due to the "xml_schema" and the "xxx value" not matching,
then the program should throw an error to the user.
You could even make this for import and export as configurable:
import.xmlschema=
export.xmlschema=
Again, this leaves the users with backwards compatibility.
> Item Import and Export, use of multiple metadata schema
> -------------------------------------------------------
>
> Key: DS-257
> URL: http://jira.dspace.org/jira/browse/DS-257
> Project: DSpace 1.x
> Issue Type: Improvement
> Components: DSpace API
> Affects Versions: 1.6.0
> Reporter: Claudia Jürgen
> Assignee: Stuart Lewis
> Fix For: 1.6.0
>
> 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 contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel