Page History
...
Since, DSpace administrators may have incorporated their own metadata scheme within DSpace (apart from default Dublin Core), someone may need to configure BTE to match their custom schemes.
BTE configuration file is located in path: [dspace]/config/spring/api/bte.xml
and it's a Spring XML configuration file that consists of beans. (If these terms are unknown to you, please refer to Spring Dependency Injection web site for more information)
Explanation of beans: beam id="gr.ekt.transformationengine.core.TransformationEngine"
This bean is instantiated when the import takes place. It deploys a new BTE transformation engine that will do the transformation from one format to the other. It needs to input arguments, the workflow (the processing step mentioned before) and the output generator.bean id="org.dspace.app.itemimport.DataLoaderService"
Within this bean we declare all the possible data loaders that we need to support. Keep in mind that for each data loader we specify a key value that can be used as the value of option "-i" in the import script that we mentioned earlier.bean id="conjunctionTransformationWorkflow"
This bean describes the processing steps. Currently there are no processing steps meaning that all records loaded by the data loader will pass to the output generator, unfiltered and unmodified. (See next section "Case studies" for info about how to add a filter or a modifier)bean id="outputGenerator"
This bean declares the output generator, that in this case the default DSpace output generator is used. As anyone can see, the input properties for this bean is the configuration of metadata scemes that are used in the DSpace repository. This is the place where someone can configure how the input data map to the metadata schema of DSpace. The references maps are actually key/value pairs where key is the record key mentioned earlier and the value is the metadata element (schema, element, qualifier) that this key will map to.
By default, the data loaders provided with the BTE use as record keys the values that are specified in the input data file. For example, in the case of a bibtex input:
================
@article{small,
author = {Freely, I.P.},
title = {A small paper},
journal = {The journal of small papers},
year = 1997,
volume = {-1},
note = {to appear},
}================
the record keys will be "author", "title", "journal", "year" and so on.
In the case of a RIS format input file:
================
TY - JOUR
AU - Shannon,Claude E.
PY - 1948/07//
TI - A Mathematical Theory of Communication
JO - Bell System Technical Journal
SP - 379
EP - 423
VL - 27
ER -=================
the record keys will be "TY", "AU" and so on.
Thus, depending on the value of "-i" option in import script, the user needs to change the configuration of this bean accordingly.
Case Studies
1) I have my data in a format different from the ones that are supported by this functionality. What can I do?
In this case, you will need to create a new data loader. To do this, just create a new Java class by extending the abstract class
...
of BTE. You will need to implement the method
public abstract RecordSet RecordSet loadData();
in which you have to create records from the input file - most propably you will need to create your own Record class (by extending gr.ekt.transformationengine.core.Record class) and fill a RecordSet.
After that, you will need to declare the new DataLoader in the Spring XML configuration file (in the bean with id: "org.dspace.app.itemimport.DataLoaderService") using your own key. Use this key as a value for option "-i" in the import key so as to specify that your data loader must run.
2) I need to filter some of the input records or modify some value from records before outputting them
In this case you will need to create your own filters and mofidiersmodifiers.
To create a new filter, you need to extend BTE abstact class:
...