Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 2038:f73036b991e2
Bugfix: repaired broken named values in exports - the last solution had bad side effects.
flys-artifacts/trunk@3515 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 21 Dec 2011 15:44:41 +0000 |
parents | 9d5f339d83a3 |
children | ebc2aa64c1be |
comparison
equal
deleted
inserted
replaced
2037:986820795c3b | 2038:f73036b991e2 |
---|---|
569 if (value != null && value.length() > 0) { | 569 if (value != null && value.length() > 0) { |
570 return Integer.parseInt(value); | 570 return Integer.parseInt(value); |
571 } | 571 } |
572 | 572 |
573 return null; | 573 return null; |
574 } | |
575 | |
576 | |
577 /** | |
578 * This method returns the value of a StateData object stored in the data | |
579 * pool of this Artifact is Boolean using Boolean.valueOf(). | |
580 * | |
581 * @param name The name of the StateData object. | |
582 * | |
583 * @return a Boolean representing the value of the data object or null if no | |
584 * such object is existing. | |
585 */ | |
586 public Boolean getDataAsBoolean(String name) { | |
587 String value = getDataAsString(name); | |
588 | |
589 if (value == null || value.length() == 0) { | |
590 return null; | |
591 } | |
592 | |
593 return Boolean.valueOf(value); | |
574 } | 594 } |
575 | 595 |
576 | 596 |
577 /** | 597 /** |
578 * Add StateData containing a given string. | 598 * Add StateData containing a given string. |