Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 626:61f688a69a55
Split up export modes from output modes.
gnv-artifacts/trunk@700 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 23 Feb 2010 11:47:08 +0000 |
parents | e80e37b78302 |
children | 87f05cec1632 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Mon Feb 22 11:29:34 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Tue Feb 23 11:47:08 2010 +0000 @@ -36,6 +36,7 @@ import de.intevation.gnv.artifacts.fis.product.Product; import de.intevation.gnv.artifacts.ressource.RessourceFactory; import de.intevation.gnv.state.DefaultInputData; +import de.intevation.gnv.state.ExportMode; import de.intevation.gnv.state.InputData; import de.intevation.gnv.state.InputValue; import de.intevation.gnv.state.OutputMode; @@ -442,7 +443,7 @@ ArtifactNamespaceContext.NAMESPACE_URI, ArtifactNamespaceContext.NAMESPACE_PREFIX ); - + return document; } @@ -774,6 +775,25 @@ inputParametersNode.appendChild(inputParameterNode); } } + + // append export modes + List<ExportMode> exportModes = outputMode.getExportModes(); + if (exportModes != null) { + Element exports = creator.create("exports"); + outputModeNode.appendChild(exports); + + for (ExportMode exp: exportModes) { + Element export = creator.create("export"); + creator.addAttr( + export, "name", exp.getName()); + creator.addAttr( + export, "description", exp.getDescription()); + creator.addAttr( + export, "mime-type", exp.getMimeType()); + + exports.appendChild(export); + } + } } } else { log.warn("No Outputmodes given.");