comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 325:7a0907742cc0

Changed the error key that is written to the result document of the feed operation. flys-artifacts/trunk@1719 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 18 Apr 2011 13:23:12 +0000
parents 448d0dc64357
children d97982627596
comparison
equal deleted inserted replaced
324:cd9e397cc2a8 325:7a0907742cc0
325 */ 325 */
326 public void saveData(Document feed, String xpath, CallContext context) 326 public void saveData(Document feed, String xpath, CallContext context)
327 throws IllegalArgumentException 327 throws IllegalArgumentException
328 { 328 {
329 if (feed == null || xpath == null || xpath.length() == 0) { 329 if (feed == null || xpath == null || xpath.length() == 0) {
330 throw new IllegalArgumentException("feed.no.input.data"); 330 throw new IllegalArgumentException("error_feed_no_data");
331 } 331 }
332 332
333 NodeList nodes = (NodeList) XMLUtils.xpath( 333 NodeList nodes = (NodeList) XMLUtils.xpath(
334 feed, 334 feed,
335 xpath, 335 xpath,
336 XPathConstants.NODESET, 336 XPathConstants.NODESET,
337 ArtifactNamespaceContext.INSTANCE); 337 ArtifactNamespaceContext.INSTANCE);
338 338
339 if (nodes == null || nodes.getLength() == 0) { 339 if (nodes == null || nodes.getLength() == 0) {
340 throw new IllegalArgumentException("feed.no.input.data"); 340 throw new IllegalArgumentException("error_feed_no_data");
341 } 341 }
342 342
343 int count = nodes.getLength(); 343 int count = nodes.getLength();
344 logger.debug("Try to save " + count + " data items."); 344 logger.debug("Try to save " + count + " data items.");
345 345

http://dive4elements.wald.intevation.org