Project

General

Profile

« Previous | Next » 

Revision dc55d92e

Added by Andreas Müller over 4 years ago

ref #1444, ref #8509 Updates for ERMS reference handling

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsReferenceImport.java
21 21
import eu.etaxonomy.cdm.io.common.IOValidator;
22 22
import eu.etaxonomy.cdm.io.common.mapping.DbIgnoreMapper;
23 23
import eu.etaxonomy.cdm.io.common.mapping.DbImportAnnotationMapper;
24
import eu.etaxonomy.cdm.io.common.mapping.DbImportDoiMapper;
24 25
import eu.etaxonomy.cdm.io.common.mapping.DbImportExtensionMapper;
25 26
import eu.etaxonomy.cdm.io.common.mapping.DbImportMapping;
26 27
import eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapper;
......
76 77
			mapping.addMapper(DbImportExtensionMapper.NewInstance("imis_id", imisExtType));
77 78

  
78 79
			ExtensionType truncatedExtType = getExtensionType( ErmsTransformer.uuidExtTruncatedCache, "truncated cache", "truncated cache", "truncated cache");
79
//            mapping.addMapper(DbImportTruncatedStringMapper.NewInstance("source_name", "titleCache", "title"));
80 80
            mapping.addMapper(DbImportTruncatedStringMapper.NewInstance("source_name", "titleCache", truncatedExtType, 800, true));
81 81
            mapping.addMapper(DbImportStringMapper.NewInstance("source_abstract", "referenceAbstract"));
82
			mapping.addMapper(DbImportAnnotationMapper.NewInstance("source_note", AnnotationType.EDITORIAL(), Language.DEFAULT()));
82
            mapping.addMapper(DbImportStringMapper.NewInstance("source_title", "title"));
83
            mapping.addMapper(DbImportAnnotationMapper.NewInstance("source_note", AnnotationType.EDITORIAL(), Language.DEFAULT()));
83 84
			mapping.addMapper(DbImportTimePeriodMapper.NewVerbatimInstance("source_year", "datePublished"));
85
			mapping.addMapper(DbImportDoiMapper.NewInstance("source_doi", "doi"));
84 86

  
85 87
			//TODO handle as External Link once they are available for Reference
86 88
			logger.warn("Handle source_link as ExternalLink once available for class Reference");
87 89
			mapping.addMapper(DbImportExtensionMapper.NewInstance("source_link", ExtensionType.URL()));
88 90

  
89 91
			//not yet implemented
90
			mapping.addMapper(DbNotYetImplementedMapper.NewInstance("source_doi", "Requires according mapper. See LSID or TimePeriod mapper as example"));
92
			mapping.addMapper(DbNotYetImplementedMapper.NewInstance("source_author", "Still missing but exists in destination. Implement either as real author or as extension"));
93

  
91 94

  
92 95
			mapping.addMapper(DbIgnoreMapper.NewInstance("source_type", "Handled by ObjectCreateMapper - but mapping not yet fully correct. See comments there."));
93 96
			mapping.addMapper(DbIgnoreMapper.NewInstance("source_orig_fn", "Currently not needed. Holds information about pdf files."));
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiSourceExport.java
22 22
import eu.etaxonomy.cdm.io.common.IExportConfigurator.DO_REFERENCES;
23 23
import eu.etaxonomy.cdm.io.common.Source;
24 24
import eu.etaxonomy.cdm.io.common.mapping.out.DbAnnotationMapper;
25
import eu.etaxonomy.cdm.io.common.mapping.out.DbDoiMapper;
25 26
import eu.etaxonomy.cdm.io.common.mapping.out.DbExtensionMapper;
26 27
import eu.etaxonomy.cdm.io.common.mapping.out.DbStringMapper;
27 28
import eu.etaxonomy.cdm.io.common.mapping.out.DbTimePeriodMapper;
......
423 424
		mapping.addMapper(DbStringMapper.NewInstance("title", "Title"));
424 425
		mapping.addMapper(MethodMapper.NewInstance("AuthorString", this));
425 426
		mapping.addMapper(DbTimePeriodMapper.NewInstance("datePublished", "RefYear"));
427
		mapping.addMapper(DbDoiMapper.NewInstance("doi", "Doi"));
428

  
426 429
		mapping.addMapper(MethodMapper.NewInstance("NomRefCache", this));
427 430
		mapping.addMapper(DbExtensionMapper.NewInstance(ExtensionType.URL(), "Link"));
428 431
		mapping.addMapper(DbAnnotationMapper.NewInstance(null, "Notes"));

Also available in: Unified diff