From 43e57a42832ea8b4ceb0317f3c9028a4174ffa7b Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 8 Aug 2007 07:25:32 +0000 Subject: Adapted project directory structure to suit the new maven based build process. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@909 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../java/at/gv/egovernment/moa/util/BoolUtils.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java (limited to 'common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java new file mode 100644 index 000000000..fcd39b4dd --- /dev/null +++ b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java @@ -0,0 +1,24 @@ +package at.gv.egovernment.moa.util; + +/** + * Utility class for parsing XML schema boolean values. + * + * @author Patrick Peck + * @version $Id$ + */ +public class BoolUtils { + + /** + * Return the boolean value of an xsd:boolean type of DOM + * element/attribute. + * + * @param boolStr The value of the xsd:boolean element/attribute. + * @return true, if boolStr equals + * "true" or "1;". Otherwise, + * false is returned. + */ + public static boolean valueOf(String boolStr) { + return "true".equals(boolStr) || "1".equals(boolStr); + } + +} -- cgit v1.2.3