|
37 | 37 | import tla.domain.command.SentenceSearch; |
38 | 38 | import tla.domain.command.TextSearch; |
39 | 39 | import tla.domain.command.TranslationSpec; |
| 40 | +import tla.domain.command.TranscriptionSpec; |
| 41 | +//import tla.domain.command.RootSpec; |
40 | 42 | import tla.domain.dto.AnnotationDto; |
41 | 43 | import tla.domain.dto.CorpusObjectDto; |
42 | 44 | import tla.domain.dto.LemmaDto; |
@@ -71,6 +73,20 @@ protected TranslationSpec convert(TranslationSpec source) { |
71 | 73 | return source; |
72 | 74 | } |
73 | 75 | } |
| 76 | + |
| 77 | + public static class TranscriptionSpecConverter extends AbstractConverter<TranscriptionSpec, TranscriptionSpec> { |
| 78 | + @Override |
| 79 | + protected TranscriptionSpec convert(TranscriptionSpec source) { |
| 80 | + return source; |
| 81 | + } |
| 82 | + } |
| 83 | + |
| 84 | + /* public static class RootSpecConverter extends AbstractConverter<RootSpec, RootSpec> { |
| 85 | + @Override |
| 86 | + protected RootSpec convert(RootSpec source) { |
| 87 | + return source; |
| 88 | + } |
| 89 | + }*/ |
74 | 90 | /** |
75 | 91 | * Container for configurations that can be attributed to an eClass specified |
76 | 92 | * via {@link BTSeClass} annotation on top of an {@link TLAEntity} instance: |
@@ -290,12 +306,33 @@ protected static ModelMapper initModelMapper() { |
290 | 306 | SentenceSearch::getPassport, SentenceSearchQueryBuilder::setPassport |
291 | 307 | ) |
292 | 308 | ); |
| 309 | + /* modelMapper.createTypeMap(LemmaSearch.class, LemmaSearchQueryBuilder.class).addMappings( |
| 310 | + m -> m.using(new TranslationSpecConverter()).map( |
| 311 | + LemmaSearch::getTranslation, LemmaSearchQueryBuilder::setTranslation |
| 312 | + ) |
| 313 | + );*/ |
| 314 | + |
| 315 | + |
| 316 | + |
293 | 317 | modelMapper.createTypeMap(TranslationSpec.class, TranslationSpec.class); |
294 | 318 | modelMapper.createTypeMap(LemmaSearch.class, LemmaSearchQueryBuilder.class).addMappings( |
295 | 319 | m -> m.using(new TranslationSpecConverter()).map( |
296 | 320 | LemmaSearch::getTranslation, LemmaSearchQueryBuilder::setTranslation |
297 | 321 | ) |
298 | 322 | ); |
| 323 | + modelMapper.createTypeMap(TranscriptionSpec.class, TranscriptionSpec.class); |
| 324 | + modelMapper.getTypeMap(LemmaSearch.class, LemmaSearchQueryBuilder.class).addMappings( |
| 325 | + m -> m.using(new TranscriptionSpecConverter()).map( |
| 326 | + LemmaSearch::getTranscription, LemmaSearchQueryBuilder::setTranscription |
| 327 | + ) |
| 328 | + ); |
| 329 | + |
| 330 | + /* modelMapper.createTypeMap(RootSpec.class, RootSpec.class); |
| 331 | + modelMapper.getTypeMap(LemmaSearch.class, LemmaSearchQueryBuilder.class).addMappings( |
| 332 | + m -> m.using(new RootSpecConverter()).map( |
| 333 | + LemmaSearch::getRoot, LemmaSearchQueryBuilder::setRoot |
| 334 | + ) |
| 335 | + );*/ |
299 | 336 | modelMapper.getTypeMap(SentenceSearch.class, SentenceSearchQueryBuilder.class).addMappings( |
300 | 337 | m -> m.using(new TranslationSpecConverter()).map( |
301 | 338 | SentenceSearch::getTranslation, SentenceSearchQueryBuilder::setTranslation |
|
0 commit comments