/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { CipherReference cr = (CipherReference) xmlObject; if (cr.getURI() != null) { domElement.setAttributeNS(null, CipherReference.URI_ATTRIB_NAME, cr.getURI()); } else { super.marshallAttributes(xmlObject, domElement); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { CipherReference cr = (CipherReference) parentXMLObject; if (childXMLObject instanceof Transforms) { cr.setTransforms((Transforms) childXMLObject); } else { super.processChildElement(parentXMLObject, childXMLObject); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { CipherReference cr = (CipherReference) xmlObject; if (attribute.getLocalName().equals(CipherReference.URI_ATTRIB_NAME)) { cr.setURI(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { CipherReference cr = (CipherReference) xmlObject; if (cr.getURI() != null) { domElement.setAttributeNS(null, CipherReference.URI_ATTRIB_NAME, cr.getURI()); } else { super.marshallAttributes(xmlObject, domElement); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { CipherReference cr = (CipherReference) parentXMLObject; if (childXMLObject instanceof Transforms) { cr.setTransforms((Transforms) childXMLObject); } else { super.processChildElement(parentXMLObject, childXMLObject); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { CipherReference cr = (CipherReference) xmlObject; if (attribute.getLocalName().equals(CipherReference.URI_ATTRIB_NAME)) { cr.setURI(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** * Validate the URI. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateURI(CipherReference xmlObject) throws ValidationException { if (DatatypeHelper.isEmpty(xmlObject.getURI())) { throw new ValidationException("CipherReference URI was empty"); } }
/** * Validate the URI. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateURI(CipherReference xmlObject) throws ValidationException { if (DatatypeHelper.isEmpty(xmlObject.getURI())) { throw new ValidationException("CipherReference URI was empty"); } }