/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { ReferenceList rl = (ReferenceList) parentXMLObject; if (childXMLObject instanceof DataReference) { rl.getReferences().add((DataReference) childXMLObject); } else if (childXMLObject instanceof KeyReference) { rl.getReferences().add((KeyReference) childXMLObject); } else { super.processChildElement(parentXMLObject, childXMLObject); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { ReferenceList rl = (ReferenceList) parentXMLObject; if (childXMLObject instanceof DataReference) { rl.getReferences().add((DataReference) childXMLObject); } else if (childXMLObject instanceof KeyReference) { rl.getReferences().add((KeyReference) childXMLObject); } else { super.processChildElement(parentXMLObject, childXMLObject); } }
/** * Validate the list of references. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateReferences(ReferenceList xmlObject) throws ValidationException { if (xmlObject.getReferences().isEmpty()) { throw new ValidationException("No DataReference or KeyReference children were present in the ReferenceList object"); } }
/** * Validate the list of references. * * @param xmlObject the object to validate * @throws ValidationException thrown if the object is invalid */ protected void validateReferences(ReferenceList xmlObject) throws ValidationException { if (xmlObject.getReferences().isEmpty()) { throw new ValidationException("No DataReference or KeyReference children were present in the ReferenceList object"); } }