#What is it? The MetadataTranstator is a converter from CMDI to IMDI and vice-versa. It is composed by 2 modules:
- A translation library (Translator) providing methods to translate metadata documents from CMDI to IMDI and vice-versa.
- A Jersey JAX-RS service, exposing the library functionality via http.
Further documentation (info on changes, installation, upgrading) can be found in TranslationService/src/main/doc
#Changes Please see the file called CHANGES.TXT
#Documentation The documentation available as of the date of this release:
##Context parameter configuration There is just one context configuration parameter for the translation service, specifying whether or not to allow the service to be called using as input, file path pointing to a file in the server file system.
- Parameter:
allowFileProtocol
| Possible values:true
orfalse
- By default this is set to false. See and change it in:
META-INF/context.xml
- By default this is set to false. See and change it in:
The service answers on the /translate
path of the of the servlet URL.
i.e.
- given the translation service servlet is mapped in the URL:
https://<server name>/<servlet path>
- the service will answer to translation requests for URLs in the form:
https://<server name>/<servlet path>/translate?<URL parameters>
##URL parameters
in
:- This parameter points to the input file to translate (imdi or cmdi).
- Possible value forms:
- Handle without "hdl:" prefix. e.g.
1839/00-0000-0000-0009-294C-9
- Full HTTP URL (escaped or not) e.g.
http://lux16.mpi.nl/cmdi_test/leslla/Discourse/Turkish/Hilal/Cycle3/d_t_hi_3.cmdi
- File path in the server file system if the context variable "allowFileProtocol" is set to "true". e.g.
file:///lat/corpora/cmdi/iprosla/IPROSLA_Corpora/IPROSLA_Nijmegen.cmdi
- Handle without "hdl:" prefix. e.g.
- Possible value forms:
- This parameter points to the input file to translate (imdi or cmdi).
outFormat
:- This parameter specifies the desired output format of the translation.
- Possible values:
cmdi
orimdi
- Possible values:
- This parameter specifies the desired output format of the translation.
###Assumptions
- If
outFormat
is not specified, imdi is assumed. - If the file extension of the input file (after resolving the
in
parameter) turns out to be the same as the requestedoutFormat
, the original document is returned. - If the file extension of the input file (after resolving the
in
parameter) is neithercmdi
norimdi
, the input file is assumed to beimdi
orcmdi
if theoutFormat
parameter iscmdi
orimdi
respectively. Taking into account the assumption made in (1).
See INSTALL.TXT for usage examples.