Java Code Examples for org.opensaml.xml.util.XMLHelper#unmarshallToAttributeMap()
The following examples show how to use
org.opensaml.xml.util.XMLHelper#unmarshallToAttributeMap() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PolicyReferenceUnmarshaller.java From lams with GNU General Public License v2.0 | 6 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { PolicyReference pr = (PolicyReference) xmlObject; QName uriName = new QName(PolicyReference.URI_ATTRIB_NAME); QName digestName = new QName(PolicyReference.DIGEST_ATTRIB_NAME); QName digestAlgorithmName = new QName(PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME); QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (uriName.equals(attribQName)) { pr.setURI(attribute.getValue()); } else if (digestName.equals(attribQName)) { pr.setDigest(attribute.getValue()); } else if (digestAlgorithmName.equals(attribQName)) { pr.setDigestAlgorithm(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(pr.getUnknownAttributes(), attribute); } }
Example 2
Source File: PolicyUnmarshaller.java From lams with GNU General Public License v2.0 | 6 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Policy policy = (Policy) xmlObject; QName nameQName = new QName(Policy.NAME_ATTRIB_NAME); QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (nameQName.equals(attribQName)) { policy.setName(attribute.getValue()); } else if (Policy.WSU_ID_ATTR_NAME.equals(attribQName)) { policy.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(policy.getUnknownAttributes(), attribute); } }
Example 3
Source File: AttributedDateTimeUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedDateTime dateTime = (AttributedDateTime) xmlObject; QName attrName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedDateTime.WSU_ID_ATTR_NAME.equals(attrName)) { dateTime.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(dateTime.getUnknownAttributes(), attribute); } }
Example 4
Source File: AttributedStringUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedString attributedString = (AttributedString) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedString.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedString.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(attributedString.getUnknownAttributes(), attribute); } }
Example 5
Source File: EmbeddedUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Embedded embedded = (Embedded) xmlObject; String attrName = attribute.getLocalName(); if (Embedded.VALUE_TYPE_ATTRIB_NAME.equals(attrName)) { embedded.setValueType(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(embedded.getUnknownAttributes(), attribute); } }
Example 6
Source File: RequestSecurityTokenResponseUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { RequestSecurityTokenResponse rstr = (RequestSecurityTokenResponse) xmlObject; if (RequestSecurityTokenResponse.CONTEXT_ATTRIB_NAME.equals(attribute.getLocalName())) { rstr.setContext(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(rstr.getUnknownAttributes(), attribute); } }
Example 7
Source File: BinaryExchangeUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { BinaryExchange binaryExchange = (BinaryExchange) xmlObject; String attrName = attribute.getLocalName(); if (BinaryExchange.VALUE_TYPE_ATTRIB_NAME.equals(attrName)) { binaryExchange.setValueType(attribute.getValue()); } else if (BinaryExchange.ENCODING_TYPE_ATTRIB_NAME.equals(attrName)) { binaryExchange.setEncodingType(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(binaryExchange.getUnknownAttributes(), attribute); } }
Example 8
Source File: TimestampUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Timestamp timestamp = (Timestamp) xmlObject; QName attrName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (Timestamp.WSU_ID_ATTR_NAME.equals(attrName)) { timestamp.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(timestamp.getUnknownAttributes(), attribute); } }
Example 9
Source File: ClaimsUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Claims claims = (Claims) xmlObject; if (Claims.DIALECT_ATTRIB_NAME.equals(attribute.getLocalName())) { claims.setDialect(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(claims.getUnknownAttributes(), attribute); } }
Example 10
Source File: UsernameTokenUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { UsernameToken token = (UsernameToken) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (UsernameToken.WSU_ID_ATTR_NAME.equals(attribQName)) { token.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(token.getUnknownAttributes(), attribute); } }
Example 11
Source File: SecurityTokenReferenceUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { SecurityTokenReference str = (SecurityTokenReference) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (SecurityTokenReference.WSU_ID_ATTR_NAME.equals(attribQName)) { str.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else if (SecurityTokenReference.WSSE_USAGE_ATTR_NAME.equals(attribQName)) { str.setWSSEUsages(XMLHelper.getAttributeValueAsList(attribute)); } else { XMLHelper.unmarshallToAttributeMap(str.getUnknownAttributes(), attribute); } }
Example 12
Source File: AttributedURIUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedURI attributedURI = (AttributedURI) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedURI.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedURI.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(attributedURI.getUnknownAttributes(), attribute); } }
Example 13
Source File: RequestSecurityTokenUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { RequestSecurityToken rst = (RequestSecurityToken) xmlObject; if (RequestSecurityToken.CONTEXT_ATTRIB_NAME.equals(attribute.getLocalName())) { rst.setContext(attribute.getValue()); } else { XMLHelper.unmarshallToAttributeMap(rst.getUnknownAttributes(), attribute); } }
Example 14
Source File: ProblemActionUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ProblemAction pa = (ProblemAction) xmlObject; XMLHelper.unmarshallToAttributeMap(pa.getUnknownAttributes(), attribute); }
Example 15
Source File: AttributedUnsignedLongUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedUnsignedLong aul = (AttributedUnsignedLong) xmlObject; XMLHelper.unmarshallToAttributeMap(aul.getUnknownAttributes(), attribute); }
Example 16
Source File: RequestSecurityTokenResponseCollectionUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { RequestSecurityTokenResponseCollection rstrc = (RequestSecurityTokenResponseCollection) xmlObject; XMLHelper.unmarshallToAttributeMap(rstrc.getUnknownAttributes(), attribute); }
Example 17
Source File: SecurityUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Security security = (Security) xmlObject; XMLHelper.unmarshallToAttributeMap(security.getUnknownAttributes(), attribute); }
Example 18
Source File: TransformationParametersUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { TransformationParameters tp = (TransformationParameters) xmlObject; XMLHelper.unmarshallToAttributeMap(tp.getUnknownAttributes(), attribute); }
Example 19
Source File: ReferenceParametersUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ReferenceParameters rp = (ReferenceParameters) xmlObject; XMLHelper.unmarshallToAttributeMap(rp.getUnknownAttributes(), attribute); }
Example 20
Source File: AttributedURIUnmarshaller.java From lams with GNU General Public License v2.0 | 4 votes |
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedURI attributedURI = (AttributedURI) xmlObject; XMLHelper.unmarshallToAttributeMap(attributedURI.getUnknownAttributes(), attribute); }