commit 12d758128b27bb301c66d66e1e9dcfa2dfdf2626
Author: Katja Luther <k.luther@bgbm.org>
Date:   Mon Nov 26 15:10:04 2018 +0100

    ref #7849: remove OVERRIDE constants from IPreferenceKeys and handle it by method

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java
deleted file mode 100755
index a146ac1af..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/**
-* Copyright (C) 2016 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
-
-import java.util.List;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-import eu.etaxonomy.cdm.model.metadata.CdmPreference;
-import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.ListComponent;
-import eu.etaxonomy.taxeditor.l10n.Messages;
-import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-
-/**
- * @author k.luther
- * @date 01.11.2016
- *
- */
-public class DatabasePreferencesPage extends AbstractPreferenceWizard implements IWizardPage{
-
-    CdmPreference preferedNomenclaturalCode;
-    NameDetailsConfigurator config ;
-    CdmPreference isRedListPreference;
-    CdmPreference determinationOnlyForFieldUnitsPreference;
-    CdmPreference showCollectingAreaInGeneralSectionPreference;
-    CdmPreference showTaxonAssociationsPreference;
-    CdmPreference setPublishFlagAsDefault;
-
-    boolean isSimpleDetailsViewActivated;
-
-    Composite child ;
-    NameDetailsViewComposite nameDetailsConfig;
-    protected NameDetailsViewComposite getNameDetailsConfig() {
-        return nameDetailsConfig;
-    }
-
-    String selectedPreferenceKey = null;
-
-    ListComponent biocaseProviderList;
-    Abcd206ImportConfigurator abcdImportConfigurator;
-
-    String[][] labelAndValues;
-
-    /*
-     *
-     */
-    public DatabasePreferencesPage(String pageName) {
-        super(pageName);
-        this.preferedNomenclaturalCode = PreferencesUtil.setPreferredNomenclaturalCode(null, false);
-        this.config = PreferencesUtil.getPreferredNameDetailsConfiguration( false);
-        if (config == null){
-            config = new NameDetailsConfigurator(false);
-        }
-
-
-    }
-
-
-    protected IPreferenceStore doGetPreferenceStore() {
-        return PreferencesUtil.getPreferenceStore();
-    }
-
-    /**
-     * @return
-     */
-    private String[][] getLabelAndValues() {
-        List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
-                .getSupportedCodes();
-        labelAndValues = new String[supportedCodes.size()][2];
-        for (int i = 0; i < supportedCodes.size(); i++) {
-            labelAndValues[i][0] = NomenclaturalCodeHelper
-                    .getDescription(supportedCodes.get(i));
-            labelAndValues[i][1] = PreferencesUtil
-                    .getPreferenceKey(supportedCodes.get(i));
-        }
-        return labelAndValues;
-    }
-
-
-
-
-    public void createNomenclaturalCodeTab(Composite parent){
-
-        Combo nomenclaturalCodeCombo;
-        Label nomenclaturalCodeLabel;
-
-        composite = addTab(Messages.DatabasePreferencesPage_Define_Default_NomenclaturalCode);
-        nomenclaturalCodeCombo = new Combo(composite, SWT.DROP_DOWN);
-
-        List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
-              .getSupportedCodes();
-        for (NomenclaturalCode code: supportedCodes) {
-           nomenclaturalCodeCombo.add(NomenclaturalCodeHelper
-                   .getDescription(code));
-
-       }
-       nomenclaturalCodeCombo.select(0);
-       getLabelAndValues();
-       //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
-       nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
-           @Override
-        public void widgetSelected(SelectionEvent evt) {
-
-               String name = nomenclaturalCodeCombo.getText();
-
-               for (String[] labelAndValue: labelAndValues){
-                   if (labelAndValue[0].equals(name)){
-                       selectedPreferenceKey = labelAndValue[1];
-                   }
-               }
-
-
-               PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY, selectedPreferenceKey);
-
-           }
-       });
-       nomenclaturalCodeLabel = new Label(composite, SWT.READ_ONLY);
-
-
-        final Button useLocalPreference = new Button(composite, SWT.CHECK);
-        boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
-        useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
-        useLocalPreference.setSelection(isUseLocalPreference);
-        useLocalPreference.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isUseLocalPreference = useLocalPreference.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, isUseLocalPreference);
-              }
-         });
-
-
-
-
-    }
-    public void createSetPublishFlagTab(Composite parent){
-        composite = addTab(Messages.DatabasePreferencesPage_SetPublishFlag);
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 2;
-        composite.setLayout(gridLayout);
-        //radio buttons for set publish as default, set not publish as default and inherit from parent
-
-    }
-
-
-    public void createBiocaseProviderTab(Composite parent){
-        composite = addTab(Messages.DatabasePreferencesPage_Biocase_Provider);
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 2;
-        composite.setLayout(gridLayout);
-        biocaseProviderList = new ListComponent(composite, SWT.SCROLL_LINE);
-
-    }
-
-    public ListComponent getBiocaseProviderList() {
-        return biocaseProviderList;
-    }
-
-    public void createNameDetailsViewConfigurationTab(Composite parent, NameDetailsConfigurator config){
-    	composite = parent;
-        composite = addTab(Messages.DatabasePreferencesPage_details_view_configuration);
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 1;
-
-        composite.setLayout(gridLayout);
-        nameDetailsConfig = new NameDetailsViewComposite(composite, SWT.SCROLL_LINE, config);
-
-
-    }
-
-
-    public void createSpecimenOrObservationTab(Composite parent){
-       composite = addTab(Messages.DatabasePreferencesPage_Specimen_Or_Observation);
-
-        final Button showCollectingAreaInGeneralSectionButton = new Button(composite, SWT.CHECK);
-        CdmPreference isShowCollectingAreaInGeneralSection = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
-        if (isShowCollectingAreaInGeneralSection == null){
-            isShowCollectingAreaInGeneralSection = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowCollectingAreasInGeneralSection, Boolean.toString(false));
-        }
-        showCollectingAreaInGeneralSectionButton.setText(Messages.DatabasePreferncesPage_Show_Collecting_Areas_in_general_section);
-
-        showCollectingAreaInGeneralSectionButton.setSelection(Boolean.valueOf(isShowCollectingAreaInGeneralSection.getValue()));
-        showCollectingAreaInGeneralSectionButton.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isShowCollectingAreaInGeneralSection = showCollectingAreaInGeneralSectionButton.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION, isShowCollectingAreaInGeneralSection);
-              }
-         });
-
-        final Button determinationOnlyForFieldUnitsButton = new Button(composite, SWT.CHECK);
-//        boolean isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS);
-        CdmPreference isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DeterminationOnlyForFieldUnits);
-        if (isDeterminationOnlyForFieldUnits == null){
-            isDeterminationOnlyForFieldUnits = CdmPreference.NewDatabaseInstance(PreferencePredicate.DeterminationOnlyForFieldUnits, Boolean.toString(false));
-        }
-        determinationOnlyForFieldUnitsButton.setText(Messages.DatabasePreferncesPage_Determination_only_for_field_unnits);
-
-        determinationOnlyForFieldUnitsButton.setSelection(Boolean.valueOf(isDeterminationOnlyForFieldUnits.getValue()));
-        determinationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isDeterminationOnlyForFieldUnits = determinationOnlyForFieldUnitsButton.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS, isDeterminationOnlyForFieldUnits);
-              }
-         });
-
-        final Button showTaxonAssociationButton = new Button(composite, SWT.CHECK);
-        CdmPreference isShowTaxonAssociation = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
-        if (isShowTaxonAssociation == null){
-            isShowTaxonAssociation = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowTaxonAssociations, Boolean.toString(false));
-        }
-        showTaxonAssociationButton.setText(Messages.DatabasePreferncesPage_Taxon_Associations);
-
-        showTaxonAssociationButton.setSelection(Boolean.valueOf(isShowTaxonAssociation.getValue()));
-        showTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isShowTaxonAssociation = showTaxonAssociationButton.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS, isShowTaxonAssociation);
-              }
-         });
-
-        final Button showLifeFormButton = new Button(composite, SWT.CHECK);
-        CdmPreference  isShowLifeForm = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowLifeForm);
-        if (isShowLifeForm == null){
-            isShowLifeForm = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowLifeForm, Boolean.toString(false));
-        }
-
-        showLifeFormButton.setText(Messages.DatabasePreferncesPage_Life_Form);
-        showLifeFormButton.setSelection(Boolean.valueOf(isShowLifeForm.getValue()));
-        showLifeFormButton.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isShowLifeForm = showLifeFormButton.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_LIFE_FORM, isShowLifeForm);
-              }
-         });
-
-//        Composite useLocalComp = new Composite(composite, SWT.NONE);
-
-
-        final Button useLocalPreference = new Button(composite, SWT.CHECK);
-        boolean isUseLocalPreference = isShowTaxonAssociation.isAllowOverride();
-        useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
-        GridData gridData = new GridData(SWT.FILL, SWT.BOTTOM, false, false);
-        gridData.verticalIndent = 10;
-        useLocalPreference.setLayoutData(gridData);
-
-        useLocalPreference.setSelection(isUseLocalPreference);
-        useLocalPreference.addSelectionListener(new SelectionAdapter(){
-             @Override
-             public void widgetSelected(SelectionEvent e) {
-                 boolean isUseLocalPreference = useLocalPreference.getSelection();
-               //  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_SPECIMEN_PREF, isUseLocalPreference);
-              }
-         });
-
-
-
- }
-
-/**
- * {@inheritDoc}
- */
-@Override
-public boolean canFlipToNextPage() {
-    // TODO Auto-generated method stub
-    return false;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public String getName() {
-    // TODO Auto-generated method stub
-    return null;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public IWizardPage getNextPage() {
-    // TODO Auto-generated method stub
-    return null;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public IWizardPage getPreviousPage() {
-    // TODO Auto-generated method stub
-    return null;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public IWizard getWizard() {
-    // TODO Auto-generated method stub
-    return null;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public boolean isPageComplete() {
-
-    return true;
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public void setPreviousPage(IWizardPage page) {
-    // TODO Auto-generated method stub
-
-}
-
-
-
-/**
- * {@inheritDoc}
- */
-@Override
-public void setWizard(IWizard newWizard) {
-    // TODO Auto-generated method stub
-
-}
-
-/**
- * {@inheritDoc}
- */
-@Override
-public void createControl(Composite parent) {
-    createNameDetailsViewConfigurationTab(parent, config);
-    createNomenclaturalCodeTab(parent);
-
-    createSpecimenOrObservationTab(parent);
-    createBiocaseProviderTab(parent);
-    setControl(parent);
-}
-
-/**
- * @return
- */
-public NameDetailsConfigurator getConfig() {
-    return config;
-}
-
-/**
- *
- */
-public Abcd206ImportConfigurator getAbcdImportConfig() {
-    return abcdImportConfigurator;
-
-}
-
-/**
- * @return
- */
-public void createAbcdImportConfig() {
-    this.abcdImportConfigurator.setAddIndividualsAssociationsSuchAsSpecimenAndObservations(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_INDIVIDUALS_ASSOCIATIONS_SUCH_AS_SPECIMEN_AND_OBSERVATIONS));
-    this.abcdImportConfigurator.setAddMediaAsMediaSpecimen(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_MEDIA_AS_MEDIASPECIMEN));
-    this.abcdImportConfigurator.setAllowReuseOtherClassifications(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ALLOW_REUSE_OTHER_CLASSIFICATIONS));
-    //this.abcdImportConfigurator.setClassificationUuid(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_CLASSIFICATION_UUID));
-    this.abcdImportConfigurator.setDeduplicateClassifications(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_CLASSIFICATIONS));
-    this.abcdImportConfigurator.setDeduplicateReferences(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_REFERENCES));
-   // this.abcdImportConfigurator.setDefaultAuthor(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEFAULT_AUTHOR));
-    this.abcdImportConfigurator.setGetSiblings(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DO_SIBLINGS));
-    this.abcdImportConfigurator.setIgnoreAuthorship(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_AUTHORSHIP));
-    this.abcdImportConfigurator.setIgnoreImportOfExistingSpecimen(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_IMPORT_OF_EXISTING_SPECIMEN));
-    this.abcdImportConfigurator.setMapUnitIdToAccessionNumber(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_ACCESSION_NUMBER));
-    this.abcdImportConfigurator.setMapUnitIdToBarcode(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_BARCODE));
-    this.abcdImportConfigurator.setMapUnitIdToCatalogNumber(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TOCATALOG_NUMBER));
-    this.abcdImportConfigurator.setMoveNewTaxaToDefaultClassification(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MOVE_NEW_TAXA_TO_DEFAULT_CLASSIFICATION));
-    this.abcdImportConfigurator.setReuseExistingDescriptiveGroups(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_DESCRIPTIVE_GROUPS));
-    this.abcdImportConfigurator.setReuseExistingTaxaWhenPossible(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_TAXA_WHEN_POSSIBLE));
-
-}
-
-
-
-
-
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage__.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage__.java
new file mode 100755
index 000000000..b9375c009
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage__.java
@@ -0,0 +1,429 @@
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
+
+import java.util.List;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
+import eu.etaxonomy.cdm.model.metadata.CdmPreference;
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.ListComponent;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+
+/**
+ * @author k.luther
+ * @date 01.11.2016
+ *
+ */
+public class DatabasePreferencesPage__ extends AbstractPreferenceWizard implements IWizardPage{
+
+    CdmPreference preferedNomenclaturalCode;
+    NameDetailsConfigurator config ;
+    CdmPreference isRedListPreference;
+    CdmPreference determinationOnlyForFieldUnitsPreference;
+    CdmPreference showCollectingAreaInGeneralSectionPreference;
+    CdmPreference showTaxonAssociationsPreference;
+    CdmPreference setPublishFlagAsDefault;
+
+    boolean isSimpleDetailsViewActivated;
+
+    Composite child ;
+    NameDetailsViewComposite nameDetailsConfig;
+    protected NameDetailsViewComposite getNameDetailsConfig() {
+        return nameDetailsConfig;
+    }
+
+    String selectedPreferenceKey = null;
+
+    ListComponent biocaseProviderList;
+    Abcd206ImportConfigurator abcdImportConfigurator;
+
+    String[][] labelAndValues;
+
+    /*
+     *
+     */
+    public DatabasePreferencesPage__(String pageName) {
+        super(pageName);
+        this.preferedNomenclaturalCode = PreferencesUtil.setPreferredNomenclaturalCode(null, false);
+        this.config = PreferencesUtil.getPreferredNameDetailsConfiguration( false);
+        if (config == null){
+            config = new NameDetailsConfigurator(false);
+        }
+
+
+    }
+
+
+    protected IPreferenceStore doGetPreferenceStore() {
+        return PreferencesUtil.getPreferenceStore();
+    }
+
+    /**
+     * @return
+     */
+    private String[][] getLabelAndValues() {
+        List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
+                .getSupportedCodes();
+        labelAndValues = new String[supportedCodes.size()][2];
+        for (int i = 0; i < supportedCodes.size(); i++) {
+            labelAndValues[i][0] = NomenclaturalCodeHelper
+                    .getDescription(supportedCodes.get(i));
+            labelAndValues[i][1] = PreferencesUtil
+                    .getPreferenceKey(supportedCodes.get(i));
+        }
+        return labelAndValues;
+    }
+
+
+
+
+    public void createNomenclaturalCodeTab(Composite parent){
+
+        Combo nomenclaturalCodeCombo;
+        Label nomenclaturalCodeLabel;
+
+        composite = addTab(Messages.DatabasePreferencesPage_Define_Default_NomenclaturalCode);
+        nomenclaturalCodeCombo = new Combo(composite, SWT.DROP_DOWN);
+
+        List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
+              .getSupportedCodes();
+        for (NomenclaturalCode code: supportedCodes) {
+           nomenclaturalCodeCombo.add(NomenclaturalCodeHelper
+                   .getDescription(code));
+
+       }
+       nomenclaturalCodeCombo.select(0);
+       getLabelAndValues();
+       //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
+       nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
+           @Override
+        public void widgetSelected(SelectionEvent evt) {
+
+               String name = nomenclaturalCodeCombo.getText();
+
+               for (String[] labelAndValue: labelAndValues){
+                   if (labelAndValue[0].equals(name)){
+                       selectedPreferenceKey = labelAndValue[1];
+                   }
+               }
+
+
+               PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY, selectedPreferenceKey);
+
+           }
+       });
+       nomenclaturalCodeLabel = new Label(composite, SWT.READ_ONLY);
+
+
+//        final Button useLocalPreference = new Button(composite, SWT.CHECK);
+//        boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
+//        useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
+//        useLocalPreference.setSelection(isUseLocalPreference);
+//        useLocalPreference.addSelectionListener(new SelectionAdapter(){
+//             @Override
+//             public void widgetSelected(SelectionEvent e) {
+//                 boolean isUseLocalPreference = useLocalPreference.getSelection();
+//                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, isUseLocalPreference);
+//              }
+//         });
+
+
+
+
+    }
+    public void createSetPublishFlagTab(Composite parent){
+        composite = addTab(Messages.DatabasePreferencesPage_SetPublishFlag);
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 2;
+        composite.setLayout(gridLayout);
+        //radio buttons for set publish as default, set not publish as default and inherit from parent
+
+    }
+
+
+    public void createBiocaseProviderTab(Composite parent){
+        composite = addTab(Messages.DatabasePreferencesPage_Biocase_Provider);
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 2;
+        composite.setLayout(gridLayout);
+        biocaseProviderList = new ListComponent(composite, SWT.SCROLL_LINE);
+
+    }
+
+    public ListComponent getBiocaseProviderList() {
+        return biocaseProviderList;
+    }
+
+    public void createNameDetailsViewConfigurationTab(Composite parent, NameDetailsConfigurator config){
+    	composite = parent;
+        composite = addTab(Messages.DatabasePreferencesPage_details_view_configuration);
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 1;
+
+        composite.setLayout(gridLayout);
+        nameDetailsConfig = new NameDetailsViewComposite(composite, SWT.SCROLL_LINE, config);
+
+
+    }
+
+
+    public void createSpecimenOrObservationTab(Composite parent){
+       composite = addTab(Messages.DatabasePreferencesPage_Specimen_Or_Observation);
+
+        final Button showCollectingAreaInGeneralSectionButton = new Button(composite, SWT.CHECK);
+        CdmPreference isShowCollectingAreaInGeneralSection = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
+        if (isShowCollectingAreaInGeneralSection == null){
+            isShowCollectingAreaInGeneralSection = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowCollectingAreasInGeneralSection, Boolean.toString(false));
+        }
+        showCollectingAreaInGeneralSectionButton.setText(Messages.DatabasePreferncesPage_Show_Collecting_Areas_in_general_section);
+
+        showCollectingAreaInGeneralSectionButton.setSelection(Boolean.valueOf(isShowCollectingAreaInGeneralSection.getValue()));
+        showCollectingAreaInGeneralSectionButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isShowCollectingAreaInGeneralSection = showCollectingAreaInGeneralSectionButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION, isShowCollectingAreaInGeneralSection);
+              }
+         });
+
+        final Button determinationOnlyForFieldUnitsButton = new Button(composite, SWT.CHECK);
+//        boolean isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS);
+        CdmPreference isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DeterminationOnlyForFieldUnits);
+        if (isDeterminationOnlyForFieldUnits == null){
+            isDeterminationOnlyForFieldUnits = CdmPreference.NewDatabaseInstance(PreferencePredicate.DeterminationOnlyForFieldUnits, Boolean.toString(false));
+        }
+        determinationOnlyForFieldUnitsButton.setText(Messages.DatabasePreferncesPage_Determination_only_for_field_unnits);
+
+        determinationOnlyForFieldUnitsButton.setSelection(Boolean.valueOf(isDeterminationOnlyForFieldUnits.getValue()));
+        determinationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isDeterminationOnlyForFieldUnits = determinationOnlyForFieldUnitsButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS, isDeterminationOnlyForFieldUnits);
+              }
+         });
+
+        final Button showTaxonAssociationButton = new Button(composite, SWT.CHECK);
+        CdmPreference isShowTaxonAssociation = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
+        if (isShowTaxonAssociation == null){
+            isShowTaxonAssociation = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowTaxonAssociations, Boolean.toString(false));
+        }
+        showTaxonAssociationButton.setText(Messages.DatabasePreferncesPage_Taxon_Associations);
+
+        showTaxonAssociationButton.setSelection(Boolean.valueOf(isShowTaxonAssociation.getValue()));
+        showTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isShowTaxonAssociation = showTaxonAssociationButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS, isShowTaxonAssociation);
+              }
+         });
+
+        final Button showLifeFormButton = new Button(composite, SWT.CHECK);
+        CdmPreference  isShowLifeForm = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowLifeForm);
+        if (isShowLifeForm == null){
+            isShowLifeForm = CdmPreference.NewDatabaseInstance(PreferencePredicate.ShowLifeForm, Boolean.toString(false));
+        }
+
+        showLifeFormButton.setText(Messages.DatabasePreferncesPage_Life_Form);
+        showLifeFormButton.setSelection(Boolean.valueOf(isShowLifeForm.getValue()));
+        showLifeFormButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isShowLifeForm = showLifeFormButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_LIFE_FORM, isShowLifeForm);
+              }
+         });
+
+//        Composite useLocalComp = new Composite(composite, SWT.NONE);
+
+
+        final Button useLocalPreference = new Button(composite, SWT.CHECK);
+        boolean isUseLocalPreference = isShowTaxonAssociation.isAllowOverride();
+        useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
+        GridData gridData = new GridData(SWT.FILL, SWT.BOTTOM, false, false);
+        gridData.verticalIndent = 10;
+        useLocalPreference.setLayoutData(gridData);
+
+        useLocalPreference.setSelection(isUseLocalPreference);
+        useLocalPreference.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isUseLocalPreference = useLocalPreference.getSelection();
+               //  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_SPECIMEN_PREF, isUseLocalPreference);
+              }
+         });
+
+
+
+ }
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public boolean canFlipToNextPage() {
+    // TODO Auto-generated method stub
+    return false;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public String getName() {
+    // TODO Auto-generated method stub
+    return null;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public IWizardPage getNextPage() {
+    // TODO Auto-generated method stub
+    return null;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public IWizardPage getPreviousPage() {
+    // TODO Auto-generated method stub
+    return null;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public IWizard getWizard() {
+    // TODO Auto-generated method stub
+    return null;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public boolean isPageComplete() {
+
+    return true;
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public void setPreviousPage(IWizardPage page) {
+    // TODO Auto-generated method stub
+
+}
+
+
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public void setWizard(IWizard newWizard) {
+    // TODO Auto-generated method stub
+
+}
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public void createControl(Composite parent) {
+    createNameDetailsViewConfigurationTab(parent, config);
+    createNomenclaturalCodeTab(parent);
+
+    createSpecimenOrObservationTab(parent);
+    createBiocaseProviderTab(parent);
+    setControl(parent);
+}
+
+/**
+ * @return
+ */
+public NameDetailsConfigurator getConfig() {
+    return config;
+}
+
+/**
+ *
+ */
+public Abcd206ImportConfigurator getAbcdImportConfig() {
+    return abcdImportConfigurator;
+
+}
+
+/**
+ * @return
+ */
+public void createAbcdImportConfig() {
+    this.abcdImportConfigurator.setAddIndividualsAssociationsSuchAsSpecimenAndObservations(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_INDIVIDUALS_ASSOCIATIONS_SUCH_AS_SPECIMEN_AND_OBSERVATIONS));
+    this.abcdImportConfigurator.setAddMediaAsMediaSpecimen(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ADD_MEDIA_AS_MEDIASPECIMEN));
+    this.abcdImportConfigurator.setAllowReuseOtherClassifications(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_ALLOW_REUSE_OTHER_CLASSIFICATIONS));
+    //this.abcdImportConfigurator.setClassificationUuid(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_CLASSIFICATION_UUID));
+    this.abcdImportConfigurator.setDeduplicateClassifications(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_CLASSIFICATIONS));
+    this.abcdImportConfigurator.setDeduplicateReferences(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEDUPLICATE_REFERENCES));
+   // this.abcdImportConfigurator.setDefaultAuthor(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DEFAULT_AUTHOR));
+    this.abcdImportConfigurator.setGetSiblings(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_DO_SIBLINGS));
+    this.abcdImportConfigurator.setIgnoreAuthorship(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_AUTHORSHIP));
+    this.abcdImportConfigurator.setIgnoreImportOfExistingSpecimen(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_IGNORE_IMPORT_OF_EXISTING_SPECIMEN));
+    this.abcdImportConfigurator.setMapUnitIdToAccessionNumber(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_ACCESSION_NUMBER));
+    this.abcdImportConfigurator.setMapUnitIdToBarcode(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TO_BARCODE));
+    this.abcdImportConfigurator.setMapUnitIdToCatalogNumber(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MAP_UNIT_ID_TOCATALOG_NUMBER));
+    this.abcdImportConfigurator.setMoveNewTaxaToDefaultClassification(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_MOVE_NEW_TAXA_TO_DEFAULT_CLASSIFICATION));
+    this.abcdImportConfigurator.setReuseExistingDescriptiveGroups(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_DESCRIPTIVE_GROUPS));
+    this.abcdImportConfigurator.setReuseExistingTaxaWhenPossible(doGetPreferenceStore().getBoolean(IPreferenceKeys.ABCD_IMPORT_CONFIGURATOR_REUSE_EXISTING_TAXA_WHEN_POSSIBLE));
+
+}
+
+
+
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard.java
deleted file mode 100644
index 82e509887..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
-* Copyright (C) 2016 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-
-import eu.etaxonomy.cdm.api.application.ICdmRepository;
-import eu.etaxonomy.cdm.api.service.IPreferenceService;
-import eu.etaxonomy.cdm.model.metadata.CdmPreference;
-import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author k.luther
- * @date 18.11.2016
- *
- */
-public class DatabasePreferencesWizard extends Wizard {
-
-
-    public DatabasePreferencesPage preferencePage;
-
-
-
-    public DatabasePreferencesWizard() {
-        setWindowTitle("Database Preferences Wizard");
-
-        preferencePage = new DatabasePreferencesPage("Database Preferences");
-
-
-    }
-
-
-
-    /**
-     * @return the preferencePage
-     */
-    public DatabasePreferencesPage getPreferencePage() {
-        return preferencePage;
-    }
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean performFinish() {
-
-//       getPreferencePage().performOk();
-
-        String value =PreferencesUtil.getStringValue(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY);
-
-        boolean allowOverride =  PreferencesUtil.getBooleanValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
-        CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
-        pref.setAllowOverride(allowOverride);
-
-        ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
-        if (controller == null){
-            return false;
-        }
-        IPreferenceService service = controller.getPreferenceService();
-        service.set(pref);
-        NameDetailsConfigurator config = getPreferencePage().getNameDetailsConfig().createNameDetailsViewConfig();
-        value = config.toString();
-        allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAME_DETAILS);
-
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NameDetailsView, value);
-        pref.setAllowOverride(allowOverride);
-        service.set(pref);
-        if (!allowOverride || (allowOverride && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.OVERRIDE_NAME_DETAILS))){
-            PreferencesUtil.saveConfigToPrefernceStore(config);
-        }
-
-
-        boolean isDeterminationOnlyForFieldUnit= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS );
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.DeterminationOnlyForFieldUnits, String.valueOf(isDeterminationOnlyForFieldUnit));
-       // allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_SPECIMEN_PREF);
-        pref.setAllowOverride(allowOverride);
-        service.set(pref);
-
-        boolean isShowCollectingAreasInGeneralsecion= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION );
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowCollectingAreasInGeneralSection, String.valueOf(isShowCollectingAreasInGeneralsecion));
-        pref.setAllowOverride(allowOverride);
-        service.set(pref);
-
-        boolean isShowTaxonAssociations= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowTaxonAssociations, String.valueOf(isShowTaxonAssociations));
-        pref.setAllowOverride(allowOverride);
-        service.set(pref);
-
-        boolean isShowLifeForm= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_LIFE_FORM);
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowLifeForm, String.valueOf(isShowLifeForm));
-        pref.setAllowOverride(allowOverride);
-        service.set(pref);
-
-        String biocaseProviderList = this.getPreferencePage().getBiocaseProviderList().createAllProviderString();
-        if (biocaseProviderList == null){
-            getPreferencePage().doGetPreferenceStore().setValue(IPreferenceKeys.BIOCASE_PROVIDER_LIST,"");
-        }else{
-            getPreferencePage().doGetPreferenceStore().setValue(IPreferenceKeys.BIOCASE_PROVIDER_LIST, biocaseProviderList);
-
-        }
-        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.BioCaseProvider, String.valueOf(biocaseProviderList));
-        pref.setAllowOverride(false);
-        service.set(pref);
-//        getPreferencePage().createAbcdImportConfig();
-//        value = getPreferencePage().getAbcdImportConfig().toString();
-//        allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_ABCD_IMPORT_CONFIG);
-//        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.AbcdImportConfig, value);
-//        pref.setAllowOverride(allowOverride);
-//        service.set(pref);
-
-        return true;
-    }
-
-
-
-    @Override
-    public void addPages() {
-        addPage(preferencePage);
-
-    }
-
-    @Override
-    public IWizardPage getNextPage(IWizardPage currentPage) {
-
-       return null;
-    }
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard__.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard__.java
new file mode 100644
index 000000000..448e7e737
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard__.java
@@ -0,0 +1,130 @@
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * @author k.luther
+ * @date 18.11.2016
+ *
+ */
+public class DatabasePreferencesWizard__ extends Wizard {
+
+
+    public DatabasePreferencesPage__ preferencePage;
+
+
+
+    public DatabasePreferencesWizard__() {
+        setWindowTitle("Database Preferences Wizard");
+
+        preferencePage = new DatabasePreferencesPage__("Database Preferences");
+
+
+    }
+
+
+
+    /**
+     * @return the preferencePage
+     */
+    public DatabasePreferencesPage__ getPreferencePage() {
+        return preferencePage;
+    }
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean performFinish() {
+//
+////       getPreferencePage().performOk();
+//
+//        String value =PreferencesUtil.getStringValue(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY);
+//
+//       // boolean allowOverride =  PreferencesUtil.getBooleanValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
+//        CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
+////        pref.setAllowOverride(allowOverride);
+////
+////        ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
+////        if (controller == null){
+////            return false;
+////        }
+////        IPreferenceService service = controller.getPreferenceService();
+////        service.set(pref);
+////        NameDetailsConfigurator config = getPreferencePage().getNameDetailsConfig().createNameDetailsViewConfig();
+////        value = config.toString();
+////        allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAME_DETAILS);
+////
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NameDetailsView, value);
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+////        if (!allowOverride || (allowOverride && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.OVERRIDE_NAME_DETAILS))){
+////            PreferencesUtil.saveConfigToPrefernceStore(config);
+////        }
+////
+////
+////        boolean isDeterminationOnlyForFieldUnit= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS );
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.DeterminationOnlyForFieldUnits, String.valueOf(isDeterminationOnlyForFieldUnit));
+////       // allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_SPECIMEN_PREF);
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+////
+////        boolean isShowCollectingAreasInGeneralsecion= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION );
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowCollectingAreasInGeneralSection, String.valueOf(isShowCollectingAreasInGeneralsecion));
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+////
+////        boolean isShowTaxonAssociations= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowTaxonAssociations, String.valueOf(isShowTaxonAssociations));
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+////
+////        boolean isShowLifeForm= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_LIFE_FORM);
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowLifeForm, String.valueOf(isShowLifeForm));
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+////
+////        String biocaseProviderList = this.getPreferencePage().getBiocaseProviderList().createAllProviderString();
+////        if (biocaseProviderList == null){
+////            getPreferencePage().doGetPreferenceStore().setValue(IPreferenceKeys.BIOCASE_PROVIDER_LIST,"");
+////        }else{
+////            getPreferencePage().doGetPreferenceStore().setValue(IPreferenceKeys.BIOCASE_PROVIDER_LIST, biocaseProviderList);
+//
+//        }
+//        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.BioCaseProvider, String.valueOf(biocaseProviderList));
+//        pref.setAllowOverride(false);
+//        service.set(pref);
+////        getPreferencePage().createAbcdImportConfig();
+////        value = getPreferencePage().getAbcdImportConfig().toString();
+////        allowOverride = getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_ABCD_IMPORT_CONFIG);
+////        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.AbcdImportConfig, value);
+////        pref.setAllowOverride(allowOverride);
+////        service.set(pref);
+
+        return true;
+    }
+
+
+
+    @Override
+    public void addPages() {
+        addPage(preferencePage);
+
+    }
+
+    @Override
+    public IWizardPage getNextPage(IWizardPage currentPage) {
+
+       return null;
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDatabasePreferencesWizardHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDatabasePreferencesWizardHandler.java
deleted file mode 100644
index 9eb00c80a..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDatabasePreferencesWizardHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
-* Copyright (C) 2016 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.jface.wizard.WizardDialog;
-
-import eu.etaxonomy.taxeditor.databaseAdmin.wizard.DatabasePreferencesWizard;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-
-/**
- * @author k.luther
- * @date 18.11.2016
- *
- */
-public class OpenDatabasePreferencesWizardHandler {
-
-    @Execute
-    public Object execute(){
-        DatabasePreferencesWizard databasePreferencesWizard = new DatabasePreferencesWizard();
-        WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(),
-                databasePreferencesWizard);
-
-        dialog.open();
-
-        return null;
-    }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferenceCache.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferenceCache.java
index 5adf3814e..cff816e9b 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferenceCache.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferenceCache.java
@@ -103,7 +103,7 @@ public class CdmPreferenceCache {
         loadAndPutPreference(controller, key);
 
         if (preferenceCache.get(key) != null){
-            if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_STATUS_OVERRIDE) || !preferenceCache.get(key).isAllowOverride()){
+            if (!PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.AvailableDistributionStatus.getKey())) || !preferenceCache.get(key).isAllowOverride()){
                 //get terms for the uuids... and add them to the termManager as preferred terms
                 ITermService termService = CdmStore.getService(ITermService.class);
                 String[] uuidArray = preferenceCache.get(key).getValue().split(";");
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java
index 8fa2f6108..22eb103b3 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java
@@ -394,17 +394,17 @@ public class ChecklistEditorGeneralPreference extends CdmPreferencePage implemen
         if (isAllowOverride){
 
             PreferencesUtil.setBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey(), isEditorActivated);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE, overrideActivated);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.DistributionEditorActivated.getKey()), overrideActivated);
             PreferencesUtil.setSortNamedAreasByOrderInVocabulary(isSortByVocabularyOrder);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.DISTRIBUTION_AREAS_SORTED_BY_IDINVOC_OVERRIDE, overrideOrderAreas);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.AreasSortedByIdInVocabulary.getKey()), overrideOrderAreas);
             PreferencesUtil.setShowRankInChecklistEditor(isShowRank);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.DISTRIBUTION_SHOW_RANK_OVERRIDE, overrideRank);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowRankInDistributionEditor.getKey()), overrideRank);
             PreferencesUtil.setDisplayStatusInChecklistEditor(displayStatus);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.DISTRIBUTION_DISPLAY_STATUS_OVERRIDE, overrideStatusDisplay);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.DisplayOfStatus.getKey()), overrideStatusDisplay);
             PreferencesUtil.setAreaDisplayInChecklistEditor(displayArea);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.DISTRIBUTION_DISPLAY_AREA_OVERRIDE, overrideAreaDisplay);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.DisplayOfAreasInDistributionEditor.getKey()), overrideAreaDisplay);
             PreferencesUtil.setOwnDescriptionForChecklistEditor(ownDescriptionForDistributionEditor);
-            PreferencesUtil.setBooleanValue(IPreferenceKeys.OWN_DESCRIPTION_OVERRIDE, overrideOwnDescriptionForDistributionEditor);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.OwnDescriptionForDistributionEditor.getKey()), overrideOwnDescriptionForDistributionEditor);
 
 
 
@@ -462,8 +462,8 @@ public class ChecklistEditorGeneralPreference extends CdmPreferencePage implemen
 
         if (distributionEditorPref != null){
             isAllowOverride = distributionEditorPref.isAllowOverride();
-            boolean test = PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE);
-            if (isAllowOverride && PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE)){
+            boolean test = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey());
+            if (isAllowOverride && PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey())){
                 isEditorActivated = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey());
             }else{
                 isEditorActivated = Boolean.valueOf(distributionEditorPref.getValue());
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralPreferencePage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralPreferencePage.java
index 3c61cbbf7..33823422b 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralPreferencePage.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralPreferencePage.java
@@ -192,15 +192,18 @@ public class GeneralPreferencePage extends CdmPreferencePage {
     @Override
     public boolean performOk() {
         if (isAllowOverrideShowCheckListPerspective){
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowChecklistPerspective.getKey()), isOverrideShowCheckListPerspective);
             PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowChecklistPerspective.getKey(), isShowCheckListPerspective);
         }
         if (isAllowOverrideShowIOMenu){
             PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowImportExportMenu.getKey(), isShowIOMenu);
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowImportExportMenu.getKey()), isOverrideShowIOMenu);
         }
 //        if (isAllowOverrideShowMediaView){
 //            PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowMediaView.getKey(), isShowMediaView);
 //        }
         if (isAllowOverrideShowTaxonNodeWizard){
+            PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowTaxonNodeWizard.getKey()), isOverrideShowTaxonNodeWizard);
             PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowTaxonNodeWizard.getKey(), isShowTaxonNodeWizard);
         }
 
@@ -212,6 +215,7 @@ public class GeneralPreferencePage extends CdmPreferencePage {
 
         CdmPreferenceCache cache = CdmPreferenceCache.instance();
         isShowIOMenu = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowImportExportMenu.getKey());
+        isOverrideShowIOMenu = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowImportExportMenu.getKey()));
         CdmPreference pref = cache.get(EditorPreferencePredicate.ShowImportExportMenu.getKey());
         if (pref != null){
             isAllowOverrideShowIOMenu = pref.isAllowOverride();
@@ -226,6 +230,7 @@ public class GeneralPreferencePage extends CdmPreferencePage {
 //            isAllowOverrideShowMediaView = true;
 //        }
         isShowCheckListPerspective = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowChecklistPerspective.getKey());
+        isOverrideShowCheckListPerspective = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowChecklistPerspective.getKey()));
         pref = cache.get(EditorPreferencePredicate.ShowChecklistPerspective.getKey());
         if (pref != null){
             isAllowOverrideShowCheckListPerspective = pref.isAllowOverride();
@@ -233,6 +238,7 @@ public class GeneralPreferencePage extends CdmPreferencePage {
             isAllowOverrideShowCheckListPerspective = true;
         }
         isShowTaxonNodeWizard = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowTaxonNodeWizard.getKey());
+        isOverrideShowTaxonNodeWizard = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(EditorPreferencePredicate.ShowTaxonNodeWizard.getKey()));
         pref = cache.get(EditorPreferencePredicate.ShowTaxonNodeWizard.getKey());
         if (pref != null){
             isAllowOverrideShowTaxonNodeWizard = pref.isAllowOverride();
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
index a4fd4f8c5..b9f14da39 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
@@ -24,9 +24,7 @@ public interface IPreferenceKeys {
 	 *
 	 */
 	public static final String PREFERRED_NOMENCLATURAL_CODE_KEY = "eu.etaxonomy.taxeditor.nomenclaturalCode";
-    public static final String OVERRIDE_NOMENCLATURAL_CODE_KEY = "eu.etaxonomy.taxeditor.nomenclaturalCode.override";
-    public static final String ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY = "eu.etaxonomy.taxeditor.nomenclaturalCode.allow_override";
-   // public static final String CDM_NOMENCLATURAL_CODE_KEY = "eu.etaxonomy.taxeditor.cdm.nomenclaturalCode";
+
 	/**
 	 * TaxonSearch Configurator
 	 */
@@ -96,8 +94,7 @@ public interface IPreferenceKeys {
 	public static final String SORT_RANKS_HIERARCHICHALLY = "eu.etaxonomy.taxeditor.menus.sortRanksHierarchichally";
 	/** Constant <code>SORT_NODES_NATURALL="eu.etaxonomy.taxeditor.menus.sortNodesN"{trunked}</code> */
 	public static final String SORT_NODES = "eu.etaxonomy.taxeditor.menus.sortNodes";
-//	/** Constant <code>SORT_NODES_NATURALL="eu.etaxonomy.taxeditor.menus.sortNodesN"{trunked}</code> */
-//	public static final String SORT_NODES_ALPHABETICALLY = "eu.etaxonomy.taxeditor.menus.sortNodesAlphabetically";
+
 	/** Constant <code>RESTORE_NAVIGATOR_STATE="eu.etaxonomy.taxeditor.taxonnavigator.restoreState"{trunked}</code> */
 	public static final String RESTORE_NAVIGATOR_STATE = "eu.etaxonomy.taxeditor.taxonnavigator.restoreState";
 	/**
@@ -126,50 +123,12 @@ public interface IPreferenceKeys {
 	public static final String DISABLE_SERVICES_API_TIMESTAMP_CHECK = "eu.etaxonomy.taxeditor.cdmlib.remoting.disableServicesApiTimestampCheck";
 	public static final String ADD_TYPES_TO_ALL_NAMES = "eu.etaxonomy.taxeditor.store.addTypeToAllNames";
     public static final String DETERMINATION_ONLY_FOR_FIELD_UNITS = "eu.etaxonomy.taxeditor.specimen.determinationOnlyOnFieldUnitLevel";
-    public static final String DETERMINATION_ONLY_FOR_FIELD_UNITS_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.determinationOnlyOnFieldUnitLevel.override";
-    public static final String DETERMINATIONS_ONLY_FOR_FIELDUNITS_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.determinationOnlyOnFieldUnitLevel.allowOverride";
     public static final String SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION = "eu.etaxonomy.taxeditor.specimen.showCollectingAreasInGeneralSection";
-    public static final String SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showCollectingAreasInGeneralSection.override";
-    public static final String SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showCollectingAreasInGeneralSection.allowOverride";
     public static final String SHOW_TAXON_ASSOCIATIONS = "eu.etaxonomy.taxeditor.specimen.showTaxonAssociations";
-    public static final String SHOW_TAXON_ASSOCIATIONS_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showTaxonAssociations.override";
-    public static final String SHOW_TAXON_ASSOCIATIONS_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showTaxonAssociations.allowOverride";
     public static final String SHOW_LIFE_FORM = "eu.etaxonomy.taxeditor.specimen.showLifeForm";
-    public static final String SHOW_LIFE_FORM_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showLifeForm.override";
-    public static final String SHOW_LIFE_FORM_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showLifeForm.allowOverride";
     public static final String SHOW_SPECIMEN = "eu.etaxonomy.taxeditor.specimen.showSpecimen";
-    public static final String SHOW_SPECIMEN_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showSpecimen.allowOverride";
-    public static final String SHOW_SPECIMEN_OVERRIDE = "eu.etaxonomy.taxeditor.specimen.showSpecimen.override";
-
-    //Distribution Editor preferences
-   // public static final String DISTRIBUTION_AREA_PREFRENCES_ACTIVE = "eu.etaxonomy.taxeditor.checklist.distributionAreaPreferencesActive";
-  //  public static final String DISTRIBUTION_AREA_OCCURENCE_STATUS = "eu.etaxonomy.taxeditor.checklist.distributionAreaStatus";
-  //  public static final String DISTRIBUTION_VOCABULARIES = "eu.etaxonomy.taxeditor.checklist.distributionVocabularies";
-    public static final String DISTRIBUTION_VOCABULARIES_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.checklist.distributionVocabulariesAllowOverride";
-    public static final String DISTRIBUTION_VOCABULARIES_OVERRIDE = "eu.etaxonomy.taxeditor.checklist.distributionVocabulariesOverride";
-  //  public static final String CHECKLIST_AREA_DISPLAY = "eu.etaxonomy.taxeditor.checklist.checklistAreaDisplay";
-//    public static final String CHECKLIST_AREA_DISPLAY_ID_IN_VOCABULARY = "IdInVocabulary";
-//    public static final String CHECKLIST_AREA_DISPLAY_TITLE = "Title";
-//    public static final String CHECKLIST_AREA_DISPLAY_SYMBOL1 = "Symbol1";
-//    public static final String CHECKLIST_AREA_DISPLAY_SYMBOL2 = "Symbol2";
-  //  public static final String CHECKLIST_STATUS_DISPLAY = "eu.etaxonomy.taxeditor.checklist.checklistDisplayStatus";
-//    public static final String CHECKLIST_SHOW_RANK = "eu.etaxonomy.taxeditor.checklist.checklistShowRank";
-
-    public static final String DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE = "eu.etaxonomy.taxeditor.checklist.distributionAreaPreferencesActiveOverride";
-    public static final String DISTRIBUTION_AREA_PREFRENCES_ACTIVE_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.checklist.distributionAreaPreferencesActiveAllowOverride";
-
-    public static final String DISTRIBUTION_STATUS_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.status";
-    public static final String DISTRIBUTION_DESCRIPTION_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.ownDescriptionOverride";
-    public static final String DISTRIBUTION_DISPLAY_AREA_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.checklistAreaDisplayOverride";
-    public static final String DISTRIBUTION_DISPLAY_STATUS_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.checklistDisplayStatusOverride";
-    public static final String DISTRIBUTION_SHOW_RANK_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.checklistShowRankOverride";
-    public static final String DISTRIBUTION_AREAS_SORTED_BY_IDINVOC_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.sortByVocabularyOrderOverride";
- //   public static final String SORT_NAMED_AREA_BY_VOCABULARY_ORDER = "eu.etaxonomy.taxeditor.distribution.namedArea.sortByVocabularyOrder";
-    public static final String OWN_DESCRIPTION_OVERRIDE = "eu.etaxonomy.taxeditor.distribution.namedArea.ownDescriptionOverride";
-
     public static final String COMMON_NAME_AREA_VOCABULARIES = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies";
-    public static final String COMMON_NAME_AREA_VOCABULARIES_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies.allowOverride";
-    public static final String COMMON_NAME_AREA_VOCABULARIES_OVERRIDE = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies.override";
+
 //Taxon Details View
     public static final String SHOW_SEC_DETAILS = "eu.etaxonomy.taxeditor.taxon.showSecDetails";
     public static final String DISABLE_SEC = "eu.etaxonomy.taxeditor.taxon.disableSec";
@@ -233,8 +192,6 @@ public interface IPreferenceKeys {
     public static final String ABCD_IMPORT_CONFIGURATOR_DEFAULT_AUTHOR = "eu.etaxonomy.taxeditor.abcd_import_configurator.defaultAuthor";
     public static final String ABCD_IMPORT_CONFIGURATOR_CLASSIFICATION_UUID =  "eu.etaxonomy.taxeditor.abcd_import_configurator.classificationUuid";
     public static final String ABCD_IMPORT_CONFIGURATOR_NOMENCLATURAL_CODE = "eu.etaxonomy.taxeditor.abcd_import_configurator.nomenclaturalCode";
-    public static final String ABCD_IMPORT_OVERRIDE = "eu.etaxonomy.taxeditor.abcd_import_configurator.override";
-    public static final String ALLOW_OVERRIDE_ABCD_IMPORT_CONFIG = "eu.etaxonomy.taxeditor.abcd_import_configurator.allowOverride";
 
 
 
@@ -256,17 +213,9 @@ public interface IPreferenceKeys {
     public static final String PUBLISH = "PUBLISH";
 
     public static final String FILTER_COMMON_NAME_REFERENCES = "eu.etaxonomy.taxeditor.references.selection.filterCommonNameReferences";
-    public static final String SHOW_IO_MENU = "eu.etaxonomy.taxeditor.menu.showIO";
 
-   // public static final String SHOW_MEDIA = "eu.etaxonomy.taxeditor.view.showMedia";
-  //  public static final String SHOW_CHECKLIST_PERSPECTIVE = "eu.etaxonomy.taxeditor.perspective.showChecklist";
-  //  public static final String SHOW_TAXONNODE_WIZARD = "eu.etaxonomy.taxeditor.menu.showTaxonNodeWizard";
     public static final String IS_SEARCH_FOR_IDENTIFIER_AS_DEFAULT = "eu.etaxonomy.taxeditor.search.reference.defaultIdentifier"+ CdmStore.getActiveCdmSource().getName();
     public static final String SEARCH_FOR_IDENTIFIER_AND_TITLECACHE = "eu.etaxonomy.taxeditor.search.reference.identifierAndTitleCache" + CdmStore.getActiveCdmSource().getName();
-//    public static final String DISABLE_MULTI_CLASSIFICATION = "eu.etaxonomy.taxeditor.classification.multi";
-
-  //  public static final String SHOW_ID_IN_SOURCE = "eu.etaxonomy.taxeditor.source.detail.IdInSource";
-   // public static final String SHOW_NAMESPACE_IN_SOURCE = "eu.etaxonomy.taxeditor.source.detail.nameInSource";
 
 
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java
index 2ff522547..52643c0fa 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencePropertyTester.java
@@ -37,6 +37,7 @@ public class PreferencePropertyTester extends PropertyTester {
 	        return isChecklistEditorEnabled();
 	    }
 	    if(SHOW_IO_MENU.equals(property)){
+	        boolean test = isShowIOMenuEnabled();
             return isShowIOMenuEnabled();
         }
 	    if(SHOW_SPECIMEN_MENU.equals(property)){
@@ -56,11 +57,11 @@ public class PreferencePropertyTester extends PropertyTester {
         return PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey());
     }
 	private boolean isShowIOMenuEnabled() {
-        return PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_IO_MENU);
+        return PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowImportExportMenu.getKey());
     }
 
 	private boolean isShowSpecimenMenuEnabled() {
-        return PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SPECIMEN);
+        return PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowSpecimen.getKey());
     }
 
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
index 2c2a670cb..dcb0bcea9 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
@@ -110,7 +110,7 @@ public class PreferencesUtil implements IPreferenceKeys {
 	    return name + "_"+  ((CdmRemoteSource)CdmStore.getActiveCdmSource()).toString();
 	}
 
-	private static String prefOverrideKey(String name) {
+	static String prefOverrideKey(String name) {
         return name + "_OVERRIDE_"+ ((CdmRemoteSource)CdmStore.getActiveCdmSource()).toString();
     }
 
@@ -390,7 +390,7 @@ public class PreferencesUtil implements IPreferenceKeys {
     			} else{
     			    setStringValue(PREFERRED_NOMENCLATURAL_CODE_KEY,
     				        preference.getValue());
-    			    setBooleanValue(ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY,preference.isAllowOverride());
+
     				return preference;
     			}
     		} else{
@@ -435,7 +435,7 @@ public class PreferencesUtil implements IPreferenceKeys {
 
 
 	public static NomenclaturalCode getPreferredNomenclaturalCode(){
-	    if (getBooleanValue(OVERRIDE_NOMENCLATURAL_CODE_KEY)) {
+	    if (getBooleanValue(prefOverrideKey(PreferencePredicate.NomenclaturalCode.getKey()))) {
             return getPreferredNomenclaturalCode(true);
         } else{
             return getPreferredNomenclaturalCode(false);
@@ -487,58 +487,26 @@ public class PreferencesUtil implements IPreferenceKeys {
     }
 
 	public static boolean isShowTaxonAssociations(){
-        if (getBooleanValue(SHOW_TAXON_ASSOCIATIONS_OVERRIDE) && getBooleanValue(SHOW_TAXON_ASSOCIATIONS_ALLOW_OVERRIDE)) {
-            return getBooleanValue(SHOW_TAXON_ASSOCIATIONS);
-        } else{
-            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
-
-            return pref!=null?Boolean.valueOf(pref.getValue()):false;
-        }
+        boolean result = getBooleanValue(EditorPreferencePredicate.ShowTaxonAssociations.getKey());
+        return result;
     }
 
 	public static boolean isShowLifeForm(){
-        if (getBooleanValue(SHOW_LIFE_FORM_OVERRIDE) && getBooleanValue(SHOW_LIFE_FORM_ALLOW_OVERRIDE)) {
-            return getBooleanValue(SHOW_LIFE_FORM);
-        } else{
-            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.ShowLifeForm);
-
-            return pref!=null?Boolean.valueOf(pref.getValue()):false;
-        }
+	    boolean result =  getBooleanValue(EditorPreferencePredicate.ShowLifeForm.getKey());
+	    return result;
     }
 
 	public static boolean isDeterminationOnlyForFieldUnits(){
-        if (getBooleanValue(DETERMINATION_ONLY_FOR_FIELD_UNITS_OVERRIDE) && getBooleanValue(DETERMINATIONS_ONLY_FOR_FIELDUNITS_ALLOW_OVERRIDE)) {
-            return getBooleanValue(DETERMINATION_ONLY_FOR_FIELD_UNITS);
-        } else{
-            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.DeterminationOnlyForFieldUnits);
-
-            return pref!=null?Boolean.valueOf(pref.getValue()):false;
-        }
+	    boolean result =  getBooleanValue(EditorPreferencePredicate.DeterminationOnlyForFieldUnits.getKey());
+        return result;
     }
 
 	public static boolean isCollectingAreaInGeneralSection(){
-        if (getBooleanValue(SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION_OVERRIDE) && getBooleanValue(SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION_ALLOW_OVERRIDE)) {
-            return getBooleanValue(SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION);
-        } else{
-            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
-
-            return pref!=null?Boolean.valueOf(pref.getValue()):false;
-        }
-    }
-
-	public static boolean isShowSimpleDetailsView(){
-        if (getBooleanValue(OVERRIDE_NAME_DETAILS) && getBooleanValue(ALLOW_OVERRIDE_NAME_DETAILS)) {
-            return getBooleanValue(SHOW_SIMPLE_NAME_DETAILS_SECTION);
-        } else{
-            CdmPreference pref = getPreferenceFromDB(EditorPreferencePredicate.NameDetailsView);
-
-            return pref!=null?Boolean.valueOf(pref.getValue()):false;
-        }
-    }
-
-
+	    boolean result =  getBooleanValue(EditorPreferencePredicate.ShowCollectingAreasInGeneralSection.getKey());
+        return result;
+	}
 
-    public static CdmPreference getPreferenceFromDB(IPreferencePredicate predicate){
+	public static CdmPreference getPreferenceFromDB(IPreferencePredicate predicate){
         ICdmRepository controller;
         CdmPreference pref = null;
 
@@ -839,6 +807,10 @@ public class PreferencesUtil implements IPreferenceKeys {
 	   return prefKey(property);
 
 	}
+	public static String createOverridePreferenceString(String property){
+	       return prefOverrideKey(property);
+
+	    }
 
 	/**
 	 * Set default values for preferences
@@ -880,10 +852,10 @@ public class PreferencesUtil implements IPreferenceKeys {
 
 		getPreferenceStore().setDefault(createPreferenceString(SORT_TAXA_BY_RANK_AND_NAME), true);
 		//override db preferences
-		getPreferenceStore().setDefault(createPreferenceString(ABCD_IMPORT_OVERRIDE), false);
-		getPreferenceStore().setDefault(createPreferenceString(SHOW_SPECIMEN_OVERRIDE), false);
-		getPreferenceStore().setDefault(createPreferenceString(OVERRIDE_NAME_DETAILS), false);
-		getPreferenceStore().setDefault(createPreferenceString(DISTRIBUTION_AREA_PREFRENCES_ACTIVE_OVERRIDE), false);
+		getPreferenceStore().setDefault(createPreferenceString(prefOverrideKey(PreferencePredicate.AbcdImportConfig.getKey())), false);
+		getPreferenceStore().setDefault(createPreferenceString(prefOverrideKey(EditorPreferencePredicate.ShowSpecimen.getKey())), false);
+		getPreferenceStore().setDefault(createPreferenceString(prefOverrideKey(EditorPreferencePredicate.NameDetailsView.getKey())), false);
+		getPreferenceStore().setDefault(createPreferenceString(prefOverrideKey(EditorPreferencePredicate.DistributionEditorActivated.getKey())), false);
 
 		getPreferenceStore().setDefault(createPreferenceString(FILTER_COMMON_NAME_REFERENCES), false);
 		getPreferenceStore().setDefault(createPreferenceString(SHOW_SPECIMEN), true);
@@ -921,7 +893,7 @@ public class PreferencesUtil implements IPreferenceKeys {
         if (preference == null){
             return;
         }
-        setBooleanValue(ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, preference.isAllowOverride());
+//        setBooleanValue(ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, preference.isAllowOverride());
 
         int index = StringUtils.lastIndexOf(preference.getValue(), ".");
         UUID uuid = UUID.fromString(preference.getValue().substring(index +1, preference.getValue().length()));
@@ -1651,7 +1623,7 @@ public class PreferencesUtil implements IPreferenceKeys {
         CdmPreferenceCache cache = CdmPreferenceCache.instance();
         CdmPreference pref = cache.get(EditorPreferencePredicate.AbcdImportConfig.getKey());
 
-        if (!getBooleanValue(IPreferenceKeys.ABCD_IMPORT_OVERRIDE) || !pref.isAllowOverride()){
+        if (!getBooleanValue(prefOverrideKey(EditorPreferencePredicate.AbcdImportConfig.getKey())) || !pref.isAllowOverride()){
             resetToDBPreferenceAbcdCOnfigurator();
 
         }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java
index b469fef7e..9542f18dc 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java
@@ -34,18 +34,18 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 16.09.2008
  */
 public class NomenclaturalCodePreferences extends FieldEditorPreferencePageE4 {
-
+    CdmPreference pref;
 	@Override
 	protected void createFieldEditors() {
 	    PreferencesUtil.setPreferredNomenclaturalCode(null, false);
-	    if (PreferencesUtil.getBooleanValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY)) {
+	    if (pref.isAllowOverride()) {
 	        addField(new ComboFieldEditor(
 	                PreferencesUtil.createPreferenceString(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY),
 				"Available Codes", getLabelAndValues(),
 				getFieldEditorParent()));
 
             addField(new BooleanFieldEditor(
-                    PreferencesUtil.createPreferenceString(IPreferenceKeys.OVERRIDE_NOMENCLATURAL_CODE_KEY),
+                    PreferencesUtil.createOverridePreferenceString(PreferencePredicate.NomenclaturalCode.getKey()),
                     "Use local nomenclatural code",
                     getFieldEditorParent()));
         } else {
@@ -85,11 +85,11 @@ public class NomenclaturalCodePreferences extends FieldEditorPreferencePageE4 {
           if (controller != null){
               IPreferenceService service = controller.getPreferenceService();
               PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
-              CdmPreference pref = service.find(key);
-              getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, pref == null? true : pref.isAllowOverride());
+              pref = service.find(key);
+              //getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, pref == null? true : pref.isAllowOverride());
           }
 
-	    if (PreferencesUtil.getBooleanValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY)) {
+	    if (pref.isAllowOverride()) {
 	        setDescription("Choose which nomenclatural code you would like to use in your local application for scientific names unless otherwise specified.");
 	    }else{
 	        setDescription("The CDM settings don't allow to set the nomenclatural code locally. If you need to make local settings, please ask an administrator.");
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameNamedAreaSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameNamedAreaSelectionDialog.java
index c8e80eb3c..edd90b8c9 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameNamedAreaSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CommonNameNamedAreaSelectionDialog.java
@@ -19,6 +19,9 @@ import eu.etaxonomy.cdm.api.service.IVocabularyService;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.metadata.CdmPreference;
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.taxeditor.preference.CdmPreferenceCache;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -69,16 +72,17 @@ public class CommonNameNamedAreaSelectionDialog extends NamedAreaSelectionDialog
         List<TermVocabulary> vocabularies = new ArrayList();
 
         UUID[] preselectedVocabularyUuids = createVocabularyUuidList();
-        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.COMMON_NAME_AREA_VOCABULARIES_ALLOW_OVERRIDE)
-                && preselectedVocabularyUuids!=null){
-
-            for(int i=0;i<preselectedVocabularyUuids.length;i++){
-                TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
-                vocabularies.add(preselectedVocabulary);
-            }
+        CdmPreferenceCache cache = CdmPreferenceCache.instance();
+        CdmPreference pref = cache.get(PreferencePredicate.CommonNameAreaVocabularies.getKey());
+        if ((pref != null && !pref.isAllowOverride()) && preselectedVocabularyUuids!=null) {
+                for(int i=0;i<preselectedVocabularyUuids.length;i++){
+                    TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
+                    vocabularies.add(preselectedVocabulary);
+                }
         }else{
             vocabularies = CdmStore.getService(IVocabularyService.class).listByTermType(TermType.NamedArea, true, null, null, null, null);
         }
+
         return vocabularies;
     }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
index d74694d03..e691294e4 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
@@ -30,11 +30,12 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.metadata.CdmPreference;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.CdmPreferenceCache;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -167,7 +168,9 @@ public class NamedAreaSelectionDialog extends
 
 	private List<TermVocabulary> getAvailableVocabularies(){
 	    vocabularies = new ArrayList();
-	    if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_VOCABULARIES_ALLOW_OVERRIDE)){
+	    CdmPreferenceCache cache = CdmPreferenceCache.instance();
+        CdmPreference pref = cache.get(PreferencePredicate.AvailableDistributionAreaVocabularies.getKey());
+	    if (pref != null && !pref.isAllowOverride()){
             UUID[] preselectedVocabularyUuids = createVocabularyUuidList();
 
             for(int i=0;i<preselectedVocabularyUuids.length;i++){
