String claimLocalName = childClaimType.getLocalName();
String claimNS = childClaimType.getNamespaceURI();
if ("ClaimType".equals(claimLocalName)) {
String claimTypeUri = childClaimType.getAttribute("Uri");
String claimTypeOptional = childClaimType.getAttribute("Optional");
RequestClaim requestClaim = new RequestClaim();
try {
requestClaim.setClaimType(new URI(claimTypeUri));
} catch (URISyntaxException e) {
LOG.log(
Level.WARNING,
"Cannot create URI from the given ClaimType attribute value " + claimTypeUri,
e
);
}
requestClaim.setOptional(Boolean.parseBoolean(claimTypeOptional));
return requestClaim;
}
LOG.fine("Found unknown element: " + claimLocalName + " " + claimNS);
return null;