aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/java/at')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Constants.java7
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java6
2 files changed, 8 insertions, 5 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
index 5c1314296..d1edbc38d 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
@@ -23,13 +23,16 @@ public interface Constants {
public static final String STB_NS_URI =
"http://reference.e-government.gv.at/namespace/standardtextblock/20041105#";
- /** Prefix used for the Mandate XML namespace */
+ /** Prefix used for the standard text block XML namespace */
public static final String STB_PREFIX = "stb";
/** URI of the MOA XML namespace. */
public static final String MOA_NS_URI =
"http://reference.e-government.gv.at/namespace/moa/20020822#";
+ /** Name of the mandates infobox */
+ public static final String INFOBOXIDENTIFIER_MANDATES = "Mandates";
+
/** Prefix used for the Mandate XML namespace */
public static final String MD_PREFIX = "md";
@@ -78,7 +81,7 @@ public interface Constants {
/** Local location of the MOA ID configuration XML schema definition. */
public static final String MOA_ID_CONFIG_SCHEMA_LOCATION =
- SCHEMA_ROOT + "MOA-ID-Configuration-1.4.xsd";
+ SCHEMA_ROOT + "MOA-ID-Configuration-1.4.2.xsd";
/** URI of the Security Layer 1.0 namespace. */
public static final String SL10_NS_URI =
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
index 61b1a18ea..82c10d90f 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
@@ -87,11 +87,11 @@ public class StringUtils {
* Replaces each substring of string <code>s</code> that matches the given
* <code>search</code> string by the given <code>replace</code> string.
*
- * @param s The string where the replacment should take place.
+ * @param s The string where the replacement should take place.
* @param search The pattern that should be replaced.
* @param replace The string that should replace all each <code>search</code>
* string within <code>s</code>.
- * @return A string whrer all occurrence of <code>search</code> are
+ * @return A string where all occurrence of <code>search</code> are
* replaced with <code>replace</code>.
*/
public static String replaceAll (String s, String search, String replace)
@@ -153,7 +153,7 @@ public class StringUtils {
* @return XML expression, XML declaration removed
*/
public static String removeXMLDeclaration(String xmlString) {
- if (xmlString.startsWith("<?xml")) {
+ if (xmlString!=null && xmlString.startsWith("<?xml")) {
int firstElement = xmlString.indexOf("<", 1);
return xmlString.substring(firstElement);
} else {