summaryrefslogtreecommitdiff
path: root/utils/src/main/java/at/gv/egiz/marshal
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-02-26 19:39:00 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-02-26 19:39:00 +0000
commit6576428966f1e3d688269a407b072fb01f9f7647 (patch)
treef79a9c3c70c27477133c9283dd4b0440b7559d05 /utils/src/main/java/at/gv/egiz/marshal
parentbd18d9084fd139aaae40ad8d525c1d0e626f2e5e (diff)
downloadmocca-6576428966f1e3d688269a407b072fb01f9f7647.tar.gz
mocca-6576428966f1e3d688269a407b072fb01f9f7647.tar.bz2
mocca-6576428966f1e3d688269a407b072fb01f9f7647.zip
1.1 candidate (activation)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@309 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'utils/src/main/java/at/gv/egiz/marshal')
-rw-r--r--utils/src/main/java/at/gv/egiz/marshal/NamespacePrefix.java34
-rw-r--r--utils/src/main/java/at/gv/egiz/marshal/NamespacePrefixMapperImpl.java16
2 files changed, 42 insertions, 8 deletions
diff --git a/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefix.java b/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefix.java
new file mode 100644
index 00000000..c03f17cd
--- /dev/null
+++ b/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefix.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 Federal Chancellery Austria and
+ * Graz University of Technology
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package at.gv.egiz.marshal;
+
+/**
+ *
+ * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
+ */
+public interface NamespacePrefix {
+ String CARDCHANNEL_PREFIX = "cc";
+ String ECDSA_PREFIX = "ecdsa";
+ String PERSONDATA_PREFIX = "pr";
+ String SAML10_PREFIX = "saml";
+ String SL_PREFIX = "sl";
+ String XADES_PREFIX = "xades";
+ String XMLDSIG_PREFIX = "xmldsig";
+ String XSI_PREFIX = "xsi";
+
+}
diff --git a/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefixMapperImpl.java b/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefixMapperImpl.java
index a08c1188..519f6b1f 100644
--- a/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefixMapperImpl.java
+++ b/utils/src/main/java/at/gv/egiz/marshal/NamespacePrefixMapperImpl.java
@@ -36,35 +36,35 @@ public class NamespacePrefixMapperImpl extends NamespacePrefixMapper {
log.trace("prefix for namespace " + namespaceUri + " requested");
}
if ("http://www.w3.org/2001/XMLSchema-instance".equals(namespaceUri)) {
- return "xsi";
+ return NamespacePrefix.XSI_PREFIX;
}
if ("http://www.w3.org/2000/09/xmldsig#".equals(namespaceUri)) {
- return "dsig";
+ return NamespacePrefix.XMLDSIG_PREFIX;
}
if ("http://www.buergerkarte.at/namespaces/securitylayer/1.2#".equals(namespaceUri)) {
- return "sl";
+ return NamespacePrefix.SL_PREFIX;
}
if ("http://www.buergerkarte.at/cardchannel".equals(namespaceUri)) {
- return "cc";
+ return NamespacePrefix.CARDCHANNEL_PREFIX;
}
if ("http://www.w3.org/2001/04/xmldsig-more#".equals(namespaceUri)) {
- return "ecdsa";
+ return NamespacePrefix.ECDSA_PREFIX;
}
if ("http://reference.e-government.gv.at/namespace/persondata/20020228#".equals(namespaceUri)) {
- return "pr";
+ return NamespacePrefix.PERSONDATA_PREFIX;
}
if ("urn:oasis:names:tc:SAML:1.0:assertion".equals(namespaceUri)) {
- return "saml";
+ return NamespacePrefix.SAML10_PREFIX;
}
if ("http://uri.etsi.org/01903/v1.1.1#".equals(namespaceUri)) {
- return "xades";
+ return NamespacePrefix.XADES_PREFIX;
}
return suggestion;