* @param ref Reference
*/
public void setReference(Reference ref) {
JAXBElement refElem = null;
String type = ref.getType();
ObjectFactory objFac = new ObjectFactory();
if (KEYIDENTIFIER.equals(type)){
refElem = objFac.createKeyIdentifier((KeyIdentifier)ref);
} else if (REFERENCE.equals(type) || DIRECT_REFERENCE.equals(type)){
refElem = objFac.createReference((DirectReference)ref);
} else if(X509DATA_ISSUERSERIAL.equals(type)){
refElem = new com.sun.xml.security.core.dsig.ObjectFactory().createX509Data((X509Data)ref);
}
if(refElem != null){