/**
* Create a RequestClaimCollection from a DOM Element
*/
private RequestClaimCollection parseClaims(Element claimsElement, List<ClaimsParser> claimsParsers) {
String dialectAttr = null;
RequestClaimCollection requestedClaims = new RequestClaimCollection();
try {
dialectAttr = claimsElement.getAttributeNS(null, "Dialect");
if (dialectAttr != null && !"".equals(dialectAttr)) {
requestedClaims.setDialect(new URI(dialectAttr));
}
} catch (URISyntaxException e1) {
LOG.log(
Level.WARNING,
"Cannot create URI from the given Dialect attribute value " + dialectAttr,
e1
);
}
Element childClaimType = DOMUtils.getFirstElement(claimsElement);
while (childClaimType != null) {
RequestClaim requestClaim = parseChildClaimType(childClaimType, dialectAttr, claimsParsers);
if (requestClaim != null) {
requestedClaims.add(requestClaim);
}
childClaimType = DOMUtils.getNextElement(childClaimType);
}
return requestedClaims;