}
}
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
EntityDescriptor entityDescriptor = (EntityDescriptor) samlObject;
if (attribute.getLocalName().equals(EntityDescriptor.ENTITY_ID_ATTRIB_NAME)) {
entityDescriptor.setEntityID(attribute.getValue());
} else if (attribute.getLocalName().equals(EntityDescriptor.ID_ATTRIB_NAME)) {
entityDescriptor.setID(attribute.getValue());
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
} else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
entityDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
entityDescriptor.setCacheDuration(XMLHelper.durationToLong(attribute.getValue()));
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
entityDescriptor.getUnknownAttributes().registerID(attribQName);
}
entityDescriptor.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}