/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { AgreementMethod am = (AgreementMethod) xmlObject; if (am.getAlgorithm() != null) { domElement.setAttributeNS(null, AgreementMethod.ALGORITHM_ATTRIBUTE_NAME, am.getAlgorithm()); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { AgreementMethod am = (AgreementMethod) parentXMLObject; if (childXMLObject instanceof KANonce) { am.setKANonce((KANonce) childXMLObject); } else if (childXMLObject instanceof OriginatorKeyInfo) { am.setOriginatorKeyInfo((OriginatorKeyInfo) childXMLObject); } else if (childXMLObject instanceof RecipientKeyInfo) { am.setRecipientKeyInfo((RecipientKeyInfo) childXMLObject); } else { am.getUnknownXMLObjects().add(childXMLObject); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AgreementMethod am = (AgreementMethod) xmlObject; if (attribute.getLocalName().equals(AgreementMethod.ALGORITHM_ATTRIBUTE_NAME)) { am.setAlgorithm(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AgreementMethod am = (AgreementMethod) xmlObject; if (attribute.getLocalName().equals(AgreementMethod.ALGORITHM_ATTRIBUTE_NAME)) { am.setAlgorithm(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { AgreementMethod am = (AgreementMethod) parentXMLObject; if (childXMLObject instanceof KANonce) { am.setKANonce((KANonce) childXMLObject); } else if (childXMLObject instanceof OriginatorKeyInfo) { am.setOriginatorKeyInfo((OriginatorKeyInfo) childXMLObject); } else if (childXMLObject instanceof RecipientKeyInfo) { am.setRecipientKeyInfo((RecipientKeyInfo) childXMLObject); } else { am.getUnknownXMLObjects().add(childXMLObject); } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { AgreementMethod am = (AgreementMethod) xmlObject; if (am.getAlgorithm() != null) { domElement.setAttributeNS(null, AgreementMethod.ALGORITHM_ATTRIBUTE_NAME, am.getAlgorithm()); } }
/** * Validate the algorithm URI. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateAlgorithm(AgreementMethod xmlObject) throws ValidationException { if (DatatypeHelper.isEmpty(xmlObject.getAlgorithm())) { throw new ValidationException("AgreementMethod algorithm URI was empty"); } }
/** * Validate the algorithm URI. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateAlgorithm(AgreementMethod xmlObject) throws ValidationException { if (DatatypeHelper.isEmpty(xmlObject.getAlgorithm())) { throw new ValidationException("AgreementMethod algorithm URI was empty"); } }