Revision 9c128421
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/abcd/AbcdImportConfiguratorWizardPageE4.java | ||
---|---|---|
23 | 23 |
import org.eclipse.swt.widgets.Text; |
24 | 24 |
|
25 | 25 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator; |
26 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
|
|
26 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
|
|
27 | 27 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
28 | 28 |
|
29 | 29 |
/** |
... | ... | |
235 | 235 |
} |
236 | 236 |
|
237 | 237 |
public void saveConfigToPrefernceStore() { |
238 |
//should use PreferencePredicate.AbcdImportConfig |
|
239 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_INDIVIDUALS_ASSOCIATIONS_SUCH_AS_SPECIMEN_AND_OBSERVATIONS, |
|
240 |
configurator.isAddIndividualsAssociationsSuchAsSpecimenAndObservations()); |
|
241 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_MEDIA_AS_MEDIASPECIMEN, |
|
242 |
configurator.isAddMediaAsMediaSpecimen()); |
|
243 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ALLOW_REUSE_OTHER_CLASSIFICATIONS, |
|
244 |
configurator.isAllowReuseOtherClassifications()); |
|
245 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_CLASSIFICATIONS, |
|
246 |
configurator.isDeduplicateClassifications()); |
|
247 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_REFERENCES, |
|
248 |
configurator.isDeduplicateReferences()); |
|
249 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DO_SIBLINGS, |
|
250 |
configurator.isGetSiblings()); |
|
251 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_AUTHORSHIP, |
|
252 |
configurator.isIgnoreAuthorship()); |
|
253 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_IMPORT_OF_EXISTING_SPECIMEN, |
|
254 |
configurator.isIgnoreImportOfExistingSpecimen()); |
|
255 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_ACCESSION_NUMBER, |
|
256 |
configurator.isMapUnitIdToAccessionNumber()); |
|
257 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_BARCODE, |
|
258 |
configurator.isMapUnitIdToBarcode()); |
|
259 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TOCATALOG_NUMBER, |
|
260 |
configurator.isMapUnitIdToCatalogNumber()); |
|
261 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MOVE_NEW_TAXA_TO_DEFAULT_CLASSIFICATION, |
|
262 |
configurator.isMoveNewTaxaToDefaultClassification()); |
|
263 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_OVERWRITE_EXISTING_SPECIMEN, |
|
264 |
configurator.isOverwriteExistingSpecimens()); |
|
265 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_DESCRIPTIVE_GROUPS, |
|
266 |
configurator.isReuseExistingDescriptiveGroups()); |
|
267 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_META_DATA, |
|
268 |
configurator.isReuseExistingMetaData()); |
|
269 |
PreferencesUtil.setBooleanValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_TAXA_WHEN_POSSIBLE, |
|
270 |
configurator.isReuseExistingTaxaWhenPossible()); |
|
271 |
|
|
272 |
PreferencesUtil.setStringValue(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DNA_PROVIDER, |
|
273 |
textDNAProviderString.getText()); |
|
238 |
PreferencesUtil.setStringValue(PreferencePredicate.AbcdImportConfig.getKey(), configurator.toString()); |
|
239 |
|
|
274 | 240 |
} |
275 | 241 |
|
276 | 242 |
public String createConfigString(){ |
Also available in: Unified diff
ref #8385: adapt local and db preference pages