changeset 5913:37a0f4f7c54f

Added output mode and generator to config and create facet for export.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 07 May 2013 12:47:05 +0200
parents 81bdb5c4414d
children 1058b3436dad
files artifacts/doc/conf/artifacts/winfo.xml artifacts/doc/conf/conf.xml artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java
diffstat 4 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/winfo.xml	Tue May 07 12:45:57 2013 +0200
+++ b/artifacts/doc/conf/artifacts/winfo.xml	Tue May 07 12:47:05 2013 +0200
@@ -570,6 +570,11 @@
                         <facet name="floodmap.jetties"/>
                     </facets>
                 </outputmode>
+		<outputmode name="wsplgen" description="output.wsplgen_export" mime-type="application/zip" type="export">
+                    <facets>
+                        <facet name="zip" description="facet.wsplgen_export.zip"/>
+                    </facets>
+                </outputmode>
                 <outputmode name="wsplgen_report" description="output.wsplgen_report" mime-type="text/xml" type="report">
                     <facets>
                         <facet name="report" description="facet.wsplgen_export.report"/>
--- a/artifacts/doc/conf/conf.xml	Tue May 07 12:45:57 2013 +0200
+++ b/artifacts/doc/conf/conf.xml	Tue May 07 12:47:05 2013 +0200
@@ -374,6 +374,7 @@
         <output-generator name="computed_dischargecurve_at_export">org.dive4elements.river.exports.ATExporter</output-generator>
         <output-generator name="gauge_discharge_curve_at_export">org.dive4elements.river.exports.ATExporter</output-generator>
         <output-generator name="fix_wq_curve_at_export">org.dive4elements.river.exports.fixings.FixATExport</output-generator>
+        <output-generator name="wsplgen">org.dive4elements.river.exports.ShapeExporter</output-generator>
     </output-generators>
 
     <!-- Path to the template file of the meta data. -->
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Tue May 07 12:45:57 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Tue May 07 12:47:05 2013 +0200
@@ -360,6 +360,7 @@
         // TODO
         // setWspTag(artifact, job);
 
+        facetCreator.createExportFacet("zip");
         try {
             job.toFile(paraFile);
 
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java	Tue May 07 12:45:57 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java	Tue May 07 12:47:05 2013 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.artifacts.access.RangeAccess;
 import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.model.map.ShapeFacet;
 import org.dive4elements.river.artifacts.model.map.WMSLayerFacet;
 import org.dive4elements.river.artifacts.model.map.WSPLGENLayerFacet;
 import org.dive4elements.river.artifacts.resources.Resources;
@@ -208,5 +209,10 @@
     public void finish() {
         facets.addAll(getFacets());
     }
+
+    public void createExportFacet(String type) {
+        ShapeFacet facet = new ShapeFacet(type, type);
+        tmpFacets.add(facet);
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org