Added export method to XML file
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71300 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4f258ce4ec
commit
52db4b45b4
|
@ -1,8 +1,7 @@
|
||||||
#Wed Mar 13 11:54:06 CET 2013
|
|
||||||
=\=\=\=\=\=\=
|
=\=\=\=\=\=\=
|
||||||
<<<<<<<=.mine
|
<<<<<<<=.mine
|
||||||
>>>>>>>=.r71295
|
>>>>>>>=.r71295
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.0.5-SNAPSHOT
|
lastWarOutDir=/home/gioia/workspace/reports/target/reports-4.0.5-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -5,6 +5,12 @@
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
|
<dependent-module archiveName="gcube-docx-generator-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-docx-generator/gcube-docx-generator">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="report-exporter-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/report-exporter-widget/report-exporter-widget">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="reports"/>
|
<property name="context-root" value="reports"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class Headerbar extends Composite{
|
||||||
private static final String EXPORT_OPENXML = "Export to OpenXML (docx)";
|
private static final String EXPORT_OPENXML = "Export to OpenXML (docx)";
|
||||||
private static final String EXPORT_HTML = "Export to HTML";
|
private static final String EXPORT_HTML = "Export to HTML";
|
||||||
private static final String EXPORT_FIMES = "Export to FiMES XML";
|
private static final String EXPORT_FIMES = "Export to FiMES XML";
|
||||||
|
private static final String EXPORT_XML = "Export to XML";
|
||||||
private static final String EXPORT_ENCRYPTED_REPORT = "Save Encrypted Version to Desktop";
|
private static final String EXPORT_ENCRYPTED_REPORT = "Save Encrypted Version to Desktop";
|
||||||
|
|
||||||
private static final String VIEW_USER_COMMENTS = "View user comments";
|
private static final String VIEW_USER_COMMENTS = "View user comments";
|
||||||
|
@ -90,6 +91,8 @@ public class Headerbar extends Composite{
|
||||||
|
|
||||||
private MenuItem optionFimes;
|
private MenuItem optionFimes;
|
||||||
|
|
||||||
|
private MenuItem optionXML;
|
||||||
|
|
||||||
private MenuItem optionEncryptedModel;
|
private MenuItem optionEncryptedModel;
|
||||||
|
|
||||||
private MenuItem viewMetadata;
|
private MenuItem viewMetadata;
|
||||||
|
@ -349,12 +352,14 @@ public class Headerbar extends Composite{
|
||||||
optionPDF = new MenuItem("<font color=\"gray\">Export to PDF</font>", true, getDisabledExportMenuItemCmd());
|
optionPDF = new MenuItem("<font color=\"gray\">Export to PDF</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionHTML = new MenuItem("<font color=\"gray\">"+ EXPORT_HTML +"</font>", true, getDisabledExportMenuItemCmd());
|
optionHTML = new MenuItem("<font color=\"gray\">"+ EXPORT_HTML +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionFimes = new MenuItem("<font color=\"gray\">"+ EXPORT_FIMES +"</font>", true, getDisabledExportMenuItemCmd());
|
optionFimes = new MenuItem("<font color=\"gray\">"+ EXPORT_FIMES +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
|
optionXML = new MenuItem("<font color=\"gray\">"+ EXPORT_XML +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionEncryptedModel = new MenuItem("<font color=\"gray\">"+ EXPORT_ENCRYPTED_REPORT +"</font>", true, getDisabledExportMenuItemCmd());
|
optionEncryptedModel = new MenuItem("<font color=\"gray\">"+ EXPORT_ENCRYPTED_REPORT +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
|
|
||||||
|
|
||||||
exportsMenu.addItem(optionDOCX);
|
exportsMenu.addItem(optionDOCX);
|
||||||
exportsMenu.addItem(optionHTML);
|
exportsMenu.addItem(optionHTML);
|
||||||
exportsMenu.addItem(optionPDF);
|
exportsMenu.addItem(optionPDF);
|
||||||
|
exportsMenu.addItem(optionXML);
|
||||||
exportsMenu.addItem(optionEncryptedModel);
|
exportsMenu.addItem(optionEncryptedModel);
|
||||||
//optionsMenu.addItem(optionPDF);
|
//optionsMenu.addItem(optionPDF);
|
||||||
//exportsMenu.addItem(optionFimes);
|
//exportsMenu.addItem(optionFimes);
|
||||||
|
@ -410,6 +415,9 @@ public class Headerbar extends Composite{
|
||||||
optionFimes.setHTML(EXPORT_FIMES);
|
optionFimes.setHTML(EXPORT_FIMES);
|
||||||
optionFimes.setCommand(generateFimes);
|
optionFimes.setCommand(generateFimes);
|
||||||
|
|
||||||
|
optionXML.setHTML(EXPORT_XML);
|
||||||
|
optionXML.setCommand(generatedXML);
|
||||||
|
|
||||||
optionEncryptedModel.setHTML(EXPORT_ENCRYPTED_REPORT);
|
optionEncryptedModel.setHTML(EXPORT_ENCRYPTED_REPORT);
|
||||||
optionEncryptedModel.setCommand(generateEncryptedModel);
|
optionEncryptedModel.setCommand(generateEncryptedModel);
|
||||||
//
|
//
|
||||||
|
@ -631,6 +639,12 @@ public class Headerbar extends Composite{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Command generatedXML = new Command() {
|
||||||
|
public void execute() {
|
||||||
|
presenter.generateManifestation(templateModel, ExportManifestationType.XML);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Command generateEncryptedModel = new Command() {
|
Command generateEncryptedModel = new Command() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -680,7 +680,9 @@ public class Presenter {
|
||||||
case PDF:
|
case PDF:
|
||||||
popup.export(reportModel, TypeExporter.PDF);
|
popup.export(reportModel, TypeExporter.PDF);
|
||||||
break;
|
break;
|
||||||
|
case XML:
|
||||||
|
popup.export(reportModel, TypeExporter.XML);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue