for (StatementAbstractType statement : statements) {
if (statement instanceof AttributeStatementType) {
AttributeStatementType attrStat = (AttributeStatementType) statement;
List<ASTChoiceType> attrs = attrStat.getAttributes();
for (ASTChoiceType attrChoice : attrs) {
AttributeType attr = attrChoice.getAttribute();
Map<String, List<Object>> attrMap = (Map<String, List<Object>>) session
.getAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP);
if (attrMap == null) {
attrMap = new HashMap<String, List<Object>>();
session.setAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP, attrMap);
}
if (chooseFriendlyName) {
attrMap.put(attr.getFriendlyName(), attr.getAttributeValue());
} else {
attrMap.put(attr.getName(), attr.getAttributeValue());
}
}
}
}
}