ref #7837 Add docx export to feature tree context menu
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 22 Nov 2018 08:33:35 +0000 (09:33 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 22 Nov 2018 08:33:35 +0000 (09:33 +0100)
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/lib/docx4j-3.3.5.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/FeatureTreeExportHandler.java

index e04c6ce..dedddb5 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+       <classpathentry exported="true" kind="lib" path="lib/docx4j-3.3.5.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/commons-math3-3.6.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/org.swtchart_0.10.0.v20160212.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/redmine-java-api-3.1.0.jar"/>
index 9b3bdb8..eb8c8a3 100644 (file)
@@ -75,6 +75,7 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.io.csv.redlist.demo,
  eu.etaxonomy.cdm.io.csv.redlist.out,
  eu.etaxonomy.cdm.io.descriptive.owl.out,
+ eu.etaxonomy.cdm.io.descriptive.word.out,
  eu.etaxonomy.cdm.io.distribution.excelupdate,
  eu.etaxonomy.cdm.io.dwca.in,
  eu.etaxonomy.cdm.io.dwca.jaxb,
@@ -873,5 +874,6 @@ Bundle-ClassPath: .,
  lib/lucene-suggest-5.4.1.jar,
  lib/redmine-java-api-3.1.0.jar,
  lib/org.swtchart_0.10.0.v20160212.jar,
- lib/commons-math3-3.6.1.jar
+ lib/commons-math3-3.6.1.jar,
+ lib/docx4j-3.3.5.jar
 Import-Package: eu.etaxonomy.cdm.api.application
index d81510d..9cc61fa 100644 (file)
@@ -224,7 +224,8 @@ bin.includes = META-INF/,\
                lib/cdmlib-cache-5.5.0-SNAPSHOT.jar,\
                lib/redmine-java-api-3.1.0.jar,\
                lib/org.swtchart_0.10.0.v20160212.jar,\
-               lib/commons-math3-3.6.1.jar
+               lib/commons-math3-3.6.1.jar,\
+               lib/docx4j-3.3.5.jar
 
 jars.compile.order = .
 output.. = bin/
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/docx4j-3.3.5.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/docx4j-3.3.5.jar
new file mode 100644 (file)
index 0000000..896a4a1
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/docx4j-3.3.5.jar differ
index 13f0cab..fb019b5 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.progress.IProgressConstants;
 
-import eu.etaxonomy.cdm.io.descriptive.owl.out.OwlExportConfigurator;
+import eu.etaxonomy.cdm.io.descriptive.word.out.WordExportConfigurator;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.taxeditor.featuretree.e4.FeatureNodeDropAdapter;
 import eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeEditor;
@@ -60,7 +60,7 @@ public class FeatureTreeExportHandler {
         String directoryString = dialog.open();
         if(directoryString!=null){
             // create job
-            Job job = CdmStore.getExportManager().createIOServiceJob(OwlExportConfigurator.NewInstance(null, null, selectedFeatureTree), new File(directoryString+"/owl.owl"));
+            Job job = CdmStore.getExportManager().createIOServiceJob(WordExportConfigurator.NewInstance(null, null, selectedFeatureTree), new File(directoryString+"/"+selectedFeatureTree.getTitleCache()+".docx"));
             // configure the job
             job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
             job.setUser(true);