/** {@inheritDoc} */ protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException { AttributeStatement attributeStatement = (AttributeStatement) parentObject; if (childObject instanceof Attribute) { attributeStatement.getAttributes().add((Attribute) childObject); } else if (childObject instanceof EncryptedAttribute) { attributeStatement.getEncryptedAttributes().add((EncryptedAttribute) childObject); } else { super.processChildElement(parentObject, childObject); } }
/** * Process child element. * * @param parentSAMLObject parent SAMLObject * @param childSAMLObject child SAMLObject * @throws UnmarshallingException error at unmarshall XML object */ protected final void processChildElement( final XMLObject parentSAMLObject, final XMLObject childSAMLObject) throws UnmarshallingException { final RequestedAttribute requestedAttr = (RequestedAttribute) parentSAMLObject; final QName childQName = childSAMLObject.getElementQName(); if ("AttributeValue".equals(childQName.getLocalPart()) && childQName.getNamespaceURI().equals(SAMLCore.STORK10_NS.getValue())) { requestedAttr.getAttributeValues().add(childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject; if (childSAMLObject instanceof Extensions) { entityDescriptor.setExtensions((Extensions) childSAMLObject); } else if (childSAMLObject instanceof Signature) { entityDescriptor.setSignature((Signature) childSAMLObject); } else if (childSAMLObject instanceof RoleDescriptor) { entityDescriptor.getRoleDescriptors().add((RoleDescriptor) childSAMLObject); } else if (childSAMLObject instanceof AffiliationDescriptor) { entityDescriptor.setAffiliationDescriptor((AffiliationDescriptor) childSAMLObject); } else if (childSAMLObject instanceof Organization) { entityDescriptor.setOrganization((Organization) childSAMLObject); } else if (childSAMLObject instanceof ContactPerson) { entityDescriptor.getContactPersons().add((ContactPerson) childSAMLObject); } else if (childSAMLObject instanceof AdditionalMetadataLocation) { entityDescriptor .getAdditionalMetadataLocations() .add((AdditionalMetadataLocation) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }