Hi Claire, We are working on this in order to include it in the 4.0 release of DSpace. Apart from other changes like the improvement of the library and the support for other bibliographic formats, we want to fix issues that are mentioned by the users, like the one you reported, the ability to support multiple mappings without the need to change the configuration.
Moreover, we would like to support the ability, these transformations to happen via a UI. If you have already a JSPUI front end for this functionality, we would be glad if you could share it with the community via a JIRA issue and probably a github pull request. Best regards, Kostas Stamatis -----Original Message----- From: KNOWLES Claire [mailto:claire.know...@ed.ac.uk] Sent: Tuesday, August 06, 2013 10:21 AM To: Konstantinos Stamatis; 'Thomas Misilo'; dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] Uploading Bibliographic information from RefWorks Hi Tom Sorry to re-open a topic from January, but I was wondering if you had managed to make the changes so you can have more than one import type loading without changing the configuration files? If so, are you happy to share them? We have written a jspui front end for this functionality and want users to be able to select the import type from a drop down. Thanks Claire Claire Knowles Library and University Collections University of Edinburgh From: Konstantinos Stamatis <kstama...@ekt.gr<mailto:kstama...@ekt.gr>> To: 'Thomas Misilo' <misi...@fit.edu<mailto:misi...@fit.edu>>, dspace-tech <dspace-tech@lists.sourceforge.net<mailto:dspace-tech@lists.sourceforge.net> > Subject: Re: [Dspace-tech] Uploading Bibliographic information from RefWorks Dear Tom, Regarding your first question, the fact is that you cannot have different configurations based on the import type. However, there are two solutions/tricks that you can try and help you in this point. 1) Since bte.xml file is a Spring Configuration file for Dependency Injection, you can isolate some of the beans in different files. Then, In the main file (bte.xml) you can import the file you like with the specific configuration for the specific import type using the following code snippet <import resource="classpath:spring-config.xml" /> It is not perfect because you will have to change the xml when you change the import type. However, it's easier than changing all the beans. 2) As you can see from here: https://code.google.com/p/biblio-transformation-engine/ BTE has a transformation workflow that can consist of Modifiers. Modifiers are there to change your records. We have shipped a specific modifier with BTE called FileKeyRenameModifier (http://bit.ly/Wh5GoP). This modifier is responsible of reading a map file to transform from one schema to another. BTE has such files by default (for example http://bit.ly/YkJf0q which is a bibtex to dc mapping). If you use a modifier like this, you can have many mapping files with the "key_after" value be the same for all cases, and finally, in your bte.xml file use only the values for dc. So instead of having mapping from A to DSpace, B to DSpace, C to DSpace and so on in your bte.xml, you can have mappings A to DC, B to DC, C to DC in different files and another one mapping DC to DSpace in your bte.xml. So, what you need to do is summarized here: a. Copy/Create mapping files from your input format to dc b. Enable modifiers in the bte.xml by adding a step in the TransformationWorkflow bean <property name="steps"> <list> <ref bean="fileKeyRenameModifier"/> </list> </property> c. Create the modifier bean: <bean id="fileKeyRenameModifier" class="gr.ekt.transformationengine.modifiers.FileKeyRenameModifier"> <property name="filename" value="/input/bibtex2dc_keymapping.xml"/> </bean> d. Change the mapping xml file according to your import type e. Configure output generator to use the new values Regarding the second question, again you can use a modifier to change the values of a field. But in this case, you will need to write the modifier class by your own. All you need to do, is to write a class (by extending our abstract Modifier) and implement a method. In this modifier, you can have access to the record, and by using the Record class methods you can add/remove/change the values. For instance, you can keep author in a local variable, delete this field and create a new one with the same name, but now do not forget to split the author value. Each field within a record can have a list of values. For more information, please check the google code site https://code.google.com/p/biblio-transformation-engine/ and in the downloads section you can find sample projects and documentation. If you have any other specific question, please contact me either through this list or directly via email. Best regards, kostas From: Thomas Misilo [mailto:misi...@fit.edu] Sent: Wednesday, January 30, 2013 5:09 PM To: 'Konstantinos Stamatis'; dspace-tech@lists.sourceforge.net<mailto:dspace-tech@lists.sourceforge.net> Subject: RE: [Dspace-tech] Uploading Bibliographic information from RefWorks Thanks Kostas for the information, I have started looking at this, and am able to get Bibtex working item by item (trying to narrow out the bad ones). I was wondering if there is any thoughts to have different configuration files based on the import type? That way one does not need to change the bte.xml depending on the format they are using to import the data? Second, I do not think it is possible at least by default, to be able to split on multiple authors in a Bibtex authors line, and maybe be able to intelligently split the first and last name up correctly? Thanks, Tom From: Konstantinos Stamatis [mailto:kstama...@ekt.gr] Sent: Wednesday, January 30, 2013 2:46 AM To: dspace-tech@lists.sourceforge.net<mailto:dspace-tech@lists.sourceforge.net> Subject: Re: [Dspace-tech] Uploading Bibliographic information from RefWorks Dear Thomas, At the very beginning, we would like to thanks you for trying to use EKT's contribution to DSpace in order to load records in your system. As far as the bibtex exception concerns, it seems that the problem relies on jbibtex library rather on the BTE implementation. My guess is that the exported bibtex file includes invalid characters or something like that. Regarding the issue that Endnote or RIS data are imported with no values in the various fields, keep in mind that you have to specify your configuration in the following file: dspace/config/spring/api/bte.xml In this file, you have to specify in the output generator bean (<bean id="outputGenerator" class="gr.ekt.transformationengine.outputGenerators.DSpaceOutputGenerator">) the schemas that you have in your DSpace installation and then, in each of these schemas you need to specify a list of pairs (name of the field of the imported data + the name of the schema element) like the following XML snippet : <key> <value>Title</value> </key> <ref bean="titleDSpaceMetadata" /> In the case of RIS format, values must be terms like AU, TY, PY and so on. The default value "Title" is not going to work in your case. The reference bean (titleDSpaceMetadata) must declare the element and qualifier of your DSpace schema like the following lines: <bean id="titleDSpaceMetadata" class="gr.ekt.transformationengine.dspace.DSpaceMetadata"> <property name="schema" value="dc" /> <property name="element" value="title" /> </bean> Hope it helps. Should you need any further help, we would be more than happy to help you. Best regards, Kostas Stamatis National Documentation Center, Athens, Greece On 1/29/13 10:55 AM, "Thomas Misilo" <misilot@...<mailto:misilot@...>> wrote: >Hi, > >I was wondering if anyone has used the new bibliographic upload for >DSpace 3.0 yet with a refworks bibtex file? > >Below is what I have tried, and the ouput I got. If you want the >refworks >bibtex file, I can > >dspace import -b -m refworks-map.map -e misilot@... -c 123456789/6856 >-s refworkstest.txt -i bibtex >INFO [main] (DSpaceKernelInit.java:52) - Created new kernel: >DSpaceKernel:org.dspace:name=cf20d3c4-227c-4adb-82da-1def97a034c7,type= >DSp >aceKernel:lastLoad=null:loadTime=0:running=false:kernel=null >INFO [main] (ConfigurationManager.java:1224) - Loading from classloader: >file:/srv/dspace/config/dspace.cfg >INFO [main] (ConfigurationManager.java:1224) - Using dspace provided >log >configuration (log.init.config) >INFO [main] (ConfigurationManager.java:1224) - Loading: >/srv/dspace/config/log4j.properties >Destination collections: >Owning Collection: Bibupload Holding >INFO: Dataloader >gr.ekt.transformationengine.dataloaders.dspace.BibTexDataLoader@<mailto:gr. ekt.transformationengine.dataloaders.dspace.BibTexDataLoader@>... >will be used for the import! >Started: 1359477659086 >Ended: 1359477660013 >Elapsed time: 0 secs (927 msecs) >Exception: Lexical error at line 1, column 79. Encountered: "\u03b7" >(951), after : "" >org.jbibtex.TokenMgrError: Lexical error at line 1, column 79. >Encountered: "\u03b7" (951), after : "" > at >org.jbibtex.LaTeXParserTokenManager.getNextToken(LaTeXParserTokenManage >r.j >ava:303) > at org.jbibtex.LaTeXParser.jj_scan_token(LaTeXParser.java:408) > at org.jbibtex.LaTeXParser.jj_3R_6(LaTeXParser.java:270) > at org.jbibtex.LaTeXParser.jj_3_3(LaTeXParser.java:253) > at org.jbibtex.LaTeXParser.jj_2_3(LaTeXParser.java:242) > at org.jbibtex.LaTeXParser.String(LaTeXParser.java:190) > at org.jbibtex.LaTeXParser.Object(LaTeXParser.java:66) > at org.jbibtex.LaTeXParser.ObjectList(LaTeXParser.java:46) > at org.jbibtex.LaTeXParser.LaTeX(LaTeXParser.java:21) > at org.jbibtex.LaTeXParser.parse(LaTeXParser.java:16) > at >gr.ekt.transformationengine.dataloaders.dspace.BibTexDataLoader.parseLa >TeX >(BibTexDataLoader.java:169) > at >gr.ekt.transformationengine.dataloaders.dspace.BibTexDataLoader.loadDat >a(B >ibTexDataLoader.java:132) > at >gr.ekt.transformationengine.core.TransformationEngine.transform(Transfo >rma >tionEngine.java:111) > at >org.dspace.app.itemimport.ItemImport.addBTEItems(ItemImport.java:649) > at > org.dspace.app.itemimport.ItemImport.main(ItemImport.java:575) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: >57) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso >rIm >pl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at >org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183) > > > >I was able to load the data via an EndNote export from RefWorks, >however >all it did was create the ~400 records, with all Unknown data. > >Thanks for any help, > >Tom > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette