aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java b/id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
index 85ec1cb7f..819ed79bb 100644
--- a/id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
+++ b/id.server/src/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
@@ -26,24 +26,25 @@ public class PersonDataBuilder {
/**
* Builds the <code>&lt;pr:Person&gt;</code> element.<br/>
* Utilizes the parsed <code>&lt;prPerson&gt;</code> from the identity link
- * and the information regarding inclusion of <code>"ZMR-Zahl"</code> in the
+ * and the information regarding inclusion of <code>"Stammzahl"</code> in the
* <code>&lt;pr:Person&gt;</code> data.
*
* @param identityLink <code>IdentityLink</code> containing the
* attribute <code>prPerson</code>
- * @param provideZMRZahl true if <code>"ZMR-Zahl"</code> is to be included;
+ * @param provideStammzahl true if <code>"Stammzahl"</code> is to be included;
* false otherwise
* @return the <code>&lt;pr:Person&gt;</code> element as a String
* @throws BuildException on any error
*/
- public String build(IdentityLink identityLink, boolean provideZMRZahl)
+ public String build(IdentityLink identityLink, boolean provideStammzahl)
throws BuildException {
try {
Element prPerson = (Element)identityLink.getPrPerson().cloneNode(true);
- if (! provideZMRZahl) {
- Node prIdentification = XPathUtils.selectSingleNode(prPerson, "pr:Identification");
- prPerson.removeChild(prIdentification);
+ if (! provideStammzahl) {
+ Node prIdentification = XPathUtils.selectSingleNode(prPerson, "pr:Identification/pr:Value");
+ //remove IdentificationValue
+ prIdentification.getFirstChild().setNodeValue("");
}
String xmlString = DOMUtils.serializeNode(prPerson);
return xmlString;