comparison artifact-database/src/main/java/de/intevation/artifactdatabase/ProtocolUtils.java @ 211:435631e07da2

Enhanced the ProtocolUtils and ClientProtocolUtils to append and retrieve output modes. artifacts/trunk@1543 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 23 Mar 2011 10:47:48 +0000
parents ab646e0f5569
children 4bb6bfaca393
comparison
equal deleted inserted replaced
210:b75fca1ac215 211:435631e07da2
11 11
12 import org.w3c.dom.Element; 12 import org.w3c.dom.Element;
13 13
14 import de.intevation.artifacts.common.utils.XMLUtils; 14 import de.intevation.artifacts.common.utils.XMLUtils;
15 15
16 import de.intevation.artifactdatabase.state.Output;
16 import de.intevation.artifactdatabase.state.State; 17 import de.intevation.artifactdatabase.state.State;
17 18
18 19
19 /** 20 /**
20 * This class provides methods that help creating the artifact protocol 21 * This class provides methods that help creating the artifact protocol
142 appendState(creator, reachable, s); 143 appendState(creator, reachable, s);
143 } 144 }
144 145
145 root.appendChild(reachable); 146 root.appendChild(reachable);
146 } 147 }
148
149
150 public static void appendOutputModes(
151 XMLUtils.ElementCreator creator,
152 Element out,
153 List<Output> outputs)
154 {
155 for (Output o: outputs) {
156 out.appendChild(createArtNode(
157 creator,
158 "output",
159 new String[] {"name", "description", "mime-type"},
160 new String[] {o.getName(),o.getDescription(),o.getMimeType()}));
161 }
162 }
147 } 163 }
148 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: 164 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org