} catch(Exception ex) {
throw new GateRuntimeException("Problem parsing JAPE File "+filepath,ex);
}
// convert the docstrings according to the required format conversion!
Converter converter = ConverterFactory.getConverter(fromFormat, toFormat);
for(Map<String,String> entry : listOfJapeDocs) {
entry.put("docstring",converter.convert(entry.get("docstring")));
}
return new CollectionModel(listOfJapeDocs,new DefaultObjectWrapper());
}