Mercurial > dive4elements > gnv-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
625:40ead2d2a08d | 626:61f688a69a55 |
---|---|
34 import de.intevation.gnv.artifacts.cache.CacheFactory; | 34 import de.intevation.gnv.artifacts.cache.CacheFactory; |
35 import de.intevation.gnv.artifacts.context.GNVArtifactContext; | 35 import de.intevation.gnv.artifacts.context.GNVArtifactContext; |
36 import de.intevation.gnv.artifacts.fis.product.Product; | 36 import de.intevation.gnv.artifacts.fis.product.Product; |
37 import de.intevation.gnv.artifacts.ressource.RessourceFactory; | 37 import de.intevation.gnv.artifacts.ressource.RessourceFactory; |
38 import de.intevation.gnv.state.DefaultInputData; | 38 import de.intevation.gnv.state.DefaultInputData; |
39 import de.intevation.gnv.state.ExportMode; | |
39 import de.intevation.gnv.state.InputData; | 40 import de.intevation.gnv.state.InputData; |
40 import de.intevation.gnv.state.InputValue; | 41 import de.intevation.gnv.state.InputValue; |
41 import de.intevation.gnv.state.OutputMode; | 42 import de.intevation.gnv.state.OutputMode; |
42 import de.intevation.gnv.state.OutputState; | 43 import de.intevation.gnv.state.OutputState; |
43 import de.intevation.gnv.state.State; | 44 import de.intevation.gnv.state.State; |
440 XMLUtils.ElementCreator artCreator = new XMLUtils.ElementCreator( | 441 XMLUtils.ElementCreator artCreator = new XMLUtils.ElementCreator( |
441 document, | 442 document, |
442 ArtifactNamespaceContext.NAMESPACE_URI, | 443 ArtifactNamespaceContext.NAMESPACE_URI, |
443 ArtifactNamespaceContext.NAMESPACE_PREFIX | 444 ArtifactNamespaceContext.NAMESPACE_PREFIX |
444 ); | 445 ); |
445 | 446 |
446 return document; | 447 return document; |
447 } | 448 } |
448 | 449 |
449 /** | 450 /** |
450 * @see de.intevation.artifactdatabase.DefaultArtifact#setup(java.lang.String, de.intevation.artifacts.ArtifactFactory, java.lang.Object, org.w3c.dom.Document) | 451 * @see de.intevation.artifactdatabase.DefaultArtifact#setup(java.lang.String, de.intevation.artifacts.ArtifactFactory, java.lang.Object, org.w3c.dom.Document) |
772 creator.addAttr( | 773 creator.addAttr( |
773 inputParameterNode, "value", inputValue.getDefaultValue()); | 774 inputParameterNode, "value", inputValue.getDefaultValue()); |
774 inputParametersNode.appendChild(inputParameterNode); | 775 inputParametersNode.appendChild(inputParameterNode); |
775 } | 776 } |
776 } | 777 } |
778 | |
779 // append export modes | |
780 List<ExportMode> exportModes = outputMode.getExportModes(); | |
781 if (exportModes != null) { | |
782 Element exports = creator.create("exports"); | |
783 outputModeNode.appendChild(exports); | |
784 | |
785 for (ExportMode exp: exportModes) { | |
786 Element export = creator.create("export"); | |
787 creator.addAttr( | |
788 export, "name", exp.getName()); | |
789 creator.addAttr( | |
790 export, "description", exp.getDescription()); | |
791 creator.addAttr( | |
792 export, "mime-type", exp.getMimeType()); | |
793 | |
794 exports.appendChild(export); | |
795 } | |
796 } | |
777 } | 797 } |
778 } else { | 798 } else { |
779 log.warn("No Outputmodes given."); | 799 log.warn("No Outputmodes given."); |
780 } | 800 } |
781 } | 801 } |