wizard.name.22 = CDM light (csv)\r
wizard.name.122 = Col DP\r
wizard.name.123 = WFO Backbone\r
+wizard.name.124 = WFO Content\r
wizard.name.14 = Specimen\r
wizard.name.23 = Excel Distribution Data Update\r
wizard.name.24 = RIS\r
wizard.name.22 = CDM light (csv)\r
wizard.name.122 = Col DP\r
wizard.name.123 = WFO Backbone\r
+wizard.name.124 = WFO Content\r
wizard.name.14 = Beleg\r
wizard.name.23 = Excel Verbreitungsdaten Update\r
wizard.name.24 = RIS\r
<imports xsi:type="commands:Command" xmi:id="_aN3BsL2gEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.workbench.command.collapse"/>
<imports xsi:type="commands:Command" xmi:id="_Ih5dAEjAEe6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.store.command.exportColDP"/>
<imports xsi:type="commands:Command" xmi:id="_lMkLQLnKEe6hy6A4KTNM1w" elementId="eu.etaxonomy.taxeditor.store.command.exportWfoBackbone"/>
+ <imports xsi:type="commands:Command" xmi:id="_Z5nmgOdgEe6sR-_5b7z3Wg" elementId="eu.etaxonomy.taxeditor.store.command.exportWfoContent"/>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_oDvMsCTfEeeiN5lBIuqN3g" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.trimcontribution.mainToolbar">
<elements xsi:type="menu:ToolControl" xmi:id="_7kZI4CTfEeeiN5lBIuqN3g" elementId="eu.etaxonomy.taxeditor.navigation.toolcontrol.search_bar" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.search.SearchBar"/>
</fragments>
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_3qJaEMuuEeiGO4eKaXkw0w" coreExpressionId="isShowIOMenuEnabled"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_zDuJwKqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.eu.etaxonomy.taxeditor.navigation.handledmenuitem.exportDwca" label="%wizard.name.9" command="_juMxQKqhEeeXcJGhyhlrKA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_IfCk8LnMEe6hy6A4KTNM1w" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.wizardname123" label="%wizard.name.123" command="_lMkLQLnKEe6hy6A4KTNM1w"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_lQeKAOdgEe6sR-_5b7z3Wg" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.wizardname124" label="%wizard.name.124" command="_Z5nmgOdgEe6sR-_5b7z3Wg"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_kVpisEi-Ee6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.eu.etaxonomy.taxeditor.navigation.handledmenuitem.exportColDP" label="%wizard.name.122" command="_Ih5dAEjAEe6gZ65AByRHxQ"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_44XB4KqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.eu.etaxonomy.taxeditor.navigation.handledmenuitem.exportCdmLight" label="%wizard.name.22" command="_n1FHEKqhEeeXcJGhyhlrKA"/>
<children xsi:type="menu:MenuSeparator" xmi:id="_8AZ3kEx-Ee6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.9"/>
wizard.name.16 = Taxon\r
wizard.name.17 = Classification\r
wizard.name.123 = WFO Backbone\r
+wizard.name.124 = WFO Content\r
themeElementCategory.label = Taxonomic Editor\r
themeElementCategory.description = Color and font definitions for the EDIT Taxonomic Editor\r
colorDefinition.label = List Background\r
wizard.name.16 = Taxon
wizard.name.17 = Klassifikation
wizard.name.123 = WFO Backbone
+wizard.name.124 = WFO Content
themeElementCategory.label = Taxonomischer Editor
themeElementCategory.description = Farb- und Schriftdefinitionen f\u00fcr den EDIT Taxonomischen Editor
colorDefinition.label = Liste Hintergrund
<elements xsi:type="commands:Command" xmi:id="_-iLDQNkbEe231IdeAjpAvg" elementId="eu.etaxonomy.taxeditor.local.command.moveDownRemoteServer" commandName="Move down"/>
<elements xsi:type="commands:Command" xmi:id="_lbmBoEi_Ee6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.store.command.exportColDP" commandName="%wizard.name.122"/>
<elements xsi:type="commands:Command" xmi:id="_1BzvkLU-Ee6JFM-mIdEBFA" elementId="eu.etaxonomy.taxeditor.store.command.exportWfoBackbone" commandName="%wizard.name.123"/>
+ <elements xsi:type="commands:Command" xmi:id="_AngCAOdgEe6sR-_5b7z3Wg" elementId="eu.etaxonomy.taxeditor.store.command.exportWfoContent" commandName="%wizard.name.124"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_swGH0GhvEee3K4uKJljEYg" featurename="handlers" parentElementId="xpath:/">
<elements xsi:type="commands:Handler" xmi:id="_rVEdIGcjEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.RemoveFeatureHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.termtree.e4.handler.RemoveTermHandler" command="_fNBtQGcjEee0qLTtA2ZpVQ"/>
<elements xsi:type="commands:Handler" xmi:id="_4GeBAD4fEeuM4JU-Ch98ZA" elementId="eu.etaxonomy.taxeditor.store.OpenTermTreeHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.termtree.e4.handler.OpenTermTreeEditorHandler" command="_8aaicD4fEeuM4JU-Ch98ZA"/>
<elements xsi:type="commands:Handler" xmi:id="_oEReoEjAEe6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.io.e4.out.cdmlight.OpenColDPExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.col.OpenColExportWizard" command="_lbmBoEi_Ee6gZ65AByRHxQ"/>
<elements xsi:type="commands:Handler" xmi:id="_rng_YLU-Ee6JFM-mIdEBFA" elementId="eu.etaxonomy.taxeditor.io.e4.out.dwca.OpenWfoBackboneExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.wfo.OpenWfoBackboneExportWizard" command="_1BzvkLU-Ee6JFM-mIdEBFA"/>
+ <elements xsi:type="commands:Handler" xmi:id="_JrOFQOdgEe6sR-_5b7z3Wg" elementId="eu.etaxonomy.taxeditor.store.handler.WfoContentExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.wfoContent.OpenWfoContentExportWizard" command="_AngCAOdgEe6sR-_5b7z3Wg"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_qT4hgIfTEeecZ4F2Y9Z0Og" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.menu.window" positionInList="before:eu.etaxonomy.taxeditor.application.windowMenu.last">
<elements xsi:type="menu:Menu" xmi:id="_LT3P8IfcEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.store.menu.termeditor" label="%menu.label.1">
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_3eyLYKqXEeeXcJGhyhlrKA" coreExpressionId="isCdmStoreConnectedAndShowIOMenuEnabled"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_nf4z0KqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportDwca" label="%wizard.name.9" command="_y69I8KqZEeeXcJGhyhlrKA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_WVBa4Ex_Ee6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportColDP" label="%wizard.name.122" command="_lbmBoEi_Ee6gZ65AByRHxQ"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_LoPoEOdfEe6sR-_5b7z3Wg" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.wizardname124" label="%wizard.name.124"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_eE6dALnTEe6hy6A4KTNM1w" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.wizardname123" label="%wizard.name.123" command="_1BzvkLU-Ee6JFM-mIdEBFA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_uruvcKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCdmLight" label="%wizard.name.22" command="_zLKvMKqZEeeXcJGhyhlrKA"/>
<children xsi:type="menu:MenuSeparator" xmi:id="_l9Oe0Ex_Ee6gZ65AByRHxQ" elementId="eu.etaxonomy.taxeditor.store.menuseparator.17"/>
--- /dev/null
+/**
+* Copyright (C) 2017 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.io.e4.out.wfoContent;
+
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.taxeditor.io.e4.out.AbstractExportWizard;
+import eu.etaxonomy.taxeditor.io.e4.out.AbstractOpenExportWizard;
+
+/**
+ * @author k.luther
+ * @since Jan 2024
+ */
+public class OpenWfoContentExportWizard extends AbstractOpenExportWizard {
+
+ @Override
+ protected Class<? extends AbstractExportWizard> getExportWizardClass() {
+ return WfoContentExportWizard.class;
+ }
+
+ @Override
+ @Execute
+ public void execute(IEclipseContext ctx, Shell s){
+
+ AbstractExportWizard<?> wizard = ContextInjectionFactory.make(getExportWizardClass(), ctx);
+ wizard.init();
+ WizardDialog dialog = new WizardDialog(s, wizard);
+ dialog.open();
+ }
+}
\ No newline at end of file
--- /dev/null
+/**
+ * Copyright (C) 2007 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.io.e4.out.wfoContent;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+
+import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
+import eu.etaxonomy.cdm.io.wfo.out.WfoContentExportConfigurator;
+import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
+import eu.etaxonomy.taxeditor.io.e4.in.GenericConfiguratorWizardPageE4;
+import eu.etaxonomy.taxeditor.io.e4.out.AbstractExportWizard;
+import eu.etaxonomy.taxeditor.io.wizard.ExportToFileDestinationWizardPage;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @since Jan 23, 2024
+ */
+public class WfoContentExportWizard extends
+ AbstractExportWizard<WfoContentExportConfigurator> {
+
+ private WfoContentExportConfigurator configurator;
+ private ExportToFileDestinationWizardPage page;
+
+ @Inject
+ public WfoContentExportWizard(IEclipseContext context,
+ @Optional@Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection) {
+ super(context, selection);
+ }
+
+ @Override
+ public void init() {
+ configurator = WfoContentExportConfigurator.NewInstance();
+ if (selection instanceof TreeSelection && !selection.isEmpty()){
+ Iterator<?> it = selection.iterator();
+
+ while(it.hasNext()){
+ Object obj = it.next();
+ if (obj instanceof TaxonNodeDto){
+ TaxonNodeDto node = (TaxonNodeDto) obj;
+ if (node.getParentUUID() == null){
+ //configurator = null;
+ }else{
+ if (configurator.getTaxonNodeFilter() == null){
+ configurator.setTaxonNodeFilter(TaxonNodeFilter.NewSubtreeInstance(node.getUuid()));
+ }else{
+ configurator.getTaxonNodeFilter().orSubtree(node.getUuid());
+ }
+
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public WfoContentExportConfigurator getConfigurator() {
+ return configurator;
+ }
+
+ @Override
+ public boolean performFinish() {
+ String urlString = page.getFolderText();// + File.separator
+ //+ page.getExportFileName();
+
+
+ if (StringUtils.isNotBlank(page.getFamilyString())) {
+ configurator.setFamilyStr(page.getFamilyString());
+ }
+
+ CdmStore.getExportManager().runMoniteredOperation(configurator, urlString);
+
+ return true;
+ }
+
+ @Override
+ public void addPages() {
+ if (configurator == null) {
+ //don't call the export on classifications
+ this.setWindowTitle("Please select a subtree for WFO Backbone export, not a classification");
+ }
+ page = ExportToFileDestinationWizardPage.WFO_Content(configurator);
+ addPage(page);
+ pageConfiguration = ContextInjectionFactory.make(GenericConfiguratorWizardPageE4.class, context);
+ List<String> ignoreMethods = new ArrayList<>();
+ ignoreMethods.add("setDoFactualData");
+ pageConfiguration.initExport(getConfigurator(), ignoreMethods);
+ this.addPage(pageConfiguration);
+ }
+ @Override
+ public boolean canFinish() {
+ boolean canFinish = super.canFinish();
+ if (configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()) {
+ return false;
+ }
+ return canFinish;
+ }
+}
\ No newline at end of file
import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator;
import eu.etaxonomy.cdm.io.tcsxml.out.TcsXmlExportConfigurator;
import eu.etaxonomy.cdm.io.wfo.out.WfoBackboneExportConfigurator;
+import eu.etaxonomy.cdm.io.wfo.out.WfoContentExportConfigurator;
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.cdm.model.taxon.Classification;
public static final String DWCA_EXPORT = "DWCA_EXPORT";
public static final String WFO_BACKBONE_EXPORT = "WFO_BACKBONE_EXPORT";
+ public static final String WFO_CONTENT_EXPORT = "WFO_CONTENT_EXPORT";
public static final String CDM_LIGHT_EXPORT = "CDM_LIGHT(CSV)";
public static final String COL_DP_EXPORT = "COL DP";
public static final String CSV_EXPORT = "CSV_EXPORT";
private boolean colDPExport = false;
private boolean dwcaExport = false;
private boolean wfoBackboneExport = false;
+ private boolean wfoContentExport = false;
private DirectoryDialog folderDialog;
private Text text_exportFileName;
case WFO_BACKBONE_EXPORT:
wfoBackboneExport = true;
break;
+ case WFO_CONTENT_EXPORT:
+ wfoContentExport = true;
+ break;
default:
throw new RuntimeException("Export type not yet handeled: " + type);
}
return new ExportToFileDestinationWizardPage(DWCA_EXPORT, DWCA_EXPORT, "DwC-Archive Export",
"Export the content of the currently selected database into Darwin Core Archive format.", ZIP, config);
}
-
+
public static ExportToFileDestinationWizardPage WFO(WfoBackboneExportConfigurator config) {
return new ExportToFileDestinationWizardPage(WFO_BACKBONE_EXPORT, WFO_BACKBONE_EXPORT, "WFO Backbone Export",
"Export the content of the currently selected database into WFO Backbone format."
, CSV, config);
}
+ public static ExportToFileDestinationWizardPage WFO_Content(WfoContentExportConfigurator config) {
+ return new ExportToFileDestinationWizardPage(WFO_CONTENT_EXPORT, WFO_CONTENT_EXPORT, "WFO Content Export",
+ "Export the content of the currently selected database into WFO Content format."
+ , CSV, config);
+ }
public static ExportToFileDestinationWizardPage CdmLight(CdmLightExportConfigurator config) {
return new ExportToFileDestinationWizardPage(CDM_LIGHT_EXPORT, CDM_LIGHT_EXPORT, "CDM Light Export (csv)",
- "Export the content of the currently selected database into the CDM light (csv) format.",
+ "Export the content of the currently selected database into the CDM light (csv) format.",
CSV, config);
}
public static ExportToFileDestinationWizardPage ColDp(ColDpExportConfigurator config) {
return new ExportToFileDestinationWizardPage(COL_DP_EXPORT, COL_DP_EXPORT, "Col DP Export (zip)",
- "Export the content of the currently selected database into the Catalogue of Life Data Package (Col DP) format.",
+ "Export the content of the currently selected database into the Catalogue of Life Data Package (Col DP) format.",
ZIP, config);
}
public static ExportToFileDestinationWizardPage Csv(CsvDemoExportConfigurator config) {
return new ExportToFileDestinationWizardPage(CSV_EXPORT, CSV_EXPORT, "CSV Export",
- "Export the content of the currently selected database into Comma Separated Value format.",
+ "Export the content of the currently selected database into Comma Separated Value format.",
CSV, config);
}
public static ExportToFileDestinationWizardPage CsvNames(CsvNameExportConfigurator config) {
return new ExportToFileDestinationWizardPage(CSV_NAME_EXPORT, CSV_NAME_EXPORT, "CSV Name Export",
- "Export the names of the currently selected database into Semicolon Separated Value format.",
+ "Export the names of the currently selected database into Semicolon Separated Value format.",
CSV, config);
}
public static ExportToFileDestinationWizardPage CsvPrint(CsvNameExportConfigurator config) {
return new ExportToFileDestinationWizardPage(CSV_PRINT_EXPORT, CSV_NAME_EXPORT, "CSV Print Export",
- "Export the content of the currently selected database into Semicolon Separated Value format.",
+ "Export the content of the currently selected database into Semicolon Separated Value format.",
CSV, config);
}
gridDataSep.horizontalSpan = 2;
separator.setLayoutData(gridDataSep);
}
- if (classifications == null && !wfoBackboneExport) {
+ if (classifications == null && !wfoBackboneExport && !wfoContentExport) {
classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
Collections.sort(classifications, (o1, o2) -> {
if (o1.equals(o2)) {
}
}
- if (csvExport || csvPrintExport || cdmLightExport || csvNameExport || dwcaExport || colDPExport || wfoBackboneExport) {
+ if (csvExport || csvPrintExport || cdmLightExport || csvNameExport || dwcaExport || colDPExport || wfoBackboneExport || wfoContentExport) {
// Label comboBoxLabel = new Label(composite, SWT.NONE);
// comboBoxLabel.setText("Classification");
selectNodeOrClassification.setLayout(grid);
selectNodeOrClassification.setLayoutData(gridDataNode);
- if ((cdmLightExport || dwcaExport || colDPExport || wfoBackboneExport) && !configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()) {
- if (!wfoBackboneExport) {
+ if ((cdmLightExport || dwcaExport || colDPExport || wfoBackboneExport || wfoContentExport) && !configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()) {
+ if (!(wfoBackboneExport || wfoContentExport)) {
checkUseSelectedTaxonNode = new Button(selectNodeOrClassification, SWT.RADIO);
}
String taxonStr = "";
}
}
}
- if (!wfoBackboneExport) {
+ if (!wfoBackboneExport && !wfoContentExport) {
checkUseSelectedTaxonNode.setText("Export all selected subtree(s) (" + taxonStr + ")");
checkUseSelectedTaxonNode.addListener(SWT.Selection, e -> {
Button b = (Button) e.widget;
text_familyString.setLayoutData(gridFamily);
+ if (!wfoContentExport) {
+ Label baseUrlString = new Label(wfoComp, SWT.NONE);
+ baseUrlString.setText("Base url");
+ text_baseUrl = new Text(wfoComp, SWT.BORDER);
- Label baseUrlString = new Label(wfoComp, SWT.NONE);
- baseUrlString.setText("Base url");
- text_baseUrl = new Text(wfoComp, SWT.BORDER);
-
- GridData gridDataBaseUrl = new GridData(SWT.FILL, SWT.FILL, true, false);
+ GridData gridDataBaseUrl = new GridData(SWT.FILL, SWT.FILL, true, false);
- text_baseUrl.setLayoutData(gridDataBaseUrl);
- text_baseUrl.setToolTipText("The base url without /cdm_dataportal/taxon/{uuid} e.g. https://portal.cybertaxonomy.org/salvador");
+ text_baseUrl.setLayoutData(gridDataBaseUrl);
+ text_baseUrl.setToolTipText("The base url without /cdm_dataportal/taxon/{uuid} e.g. https://portal.cybertaxonomy.org/salvador");
+ }
}
- }else if (wfoBackboneExport) {
+ }else if (wfoBackboneExport || wfoContentExport) {
Label label = new Label(composite, SWT.NONE);
label.setText("WFO Backbone export is only available for subtrees, not for classifications");
if (node != null && !wfoBackboneExport) {
selectedClassification = node.getClassification();
}
- if (!wfoBackboneExport) {
+ if (!(wfoBackboneExport || wfoContentExport)) {
createClassificationSelectionCombo(selectNodeOrClassification);
}
if (cdmLightExport) {
}
}
});
- if (!cdmLightExport && !wfoBackboneExport) {
+ if (!cdmLightExport && !(wfoBackboneExport || wfoContentExport)) {
Label fileLabel = new Label(composite, SWT.NONE);
fileLabel.setText("Filename");