[Dive4elements-commits] [PATCH 2 of 2] Added output mode and generator to config and create facet for export
Wald Commits
scm-commit at wald.intevation.org
Tue May 7 12:47:41 CEST 2013
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1367923625 -7200
# Node ID 37a0f4f7c54f63f55e8fa23ea31c8c3db6ef14ad
# Parent 81bdb5c4414d4932c2ca0c22ae671409f61d5117
Added output mode and generator to config and create facet for export.
diff -r 81bdb5c4414d -r 37a0f4f7c54f artifacts/doc/conf/artifacts/winfo.xml
--- 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"/>
diff -r 81bdb5c4414d -r 37a0f4f7c54f artifacts/doc/conf/conf.xml
--- 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. -->
diff -r 81bdb5c4414d -r 37a0f4f7c54f artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java
--- 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);
diff -r 81bdb5c4414d -r 37a0f4f7c54f artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java
--- 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 :
More information about the Dive4elements-commits
mailing list