private void incorporateReference(final DSSReference dssReference){
  final Element referenceDom=DSSXMLUtils.addElement(documentDom,signedInfoDom,XMLNS,DS_REFERENCE);
  referenceDom.setAttribute(ID,dssReference.getId());
  final String uri=dssReference.getUri();
  referenceDom.setAttribute(URI,uri);
  referenceDom.setAttribute(TYPE,dssReference.getType());
  final List<DSSTransform> dssTransforms=dssReference.getTransforms();
  if (dssTransforms != null) {
    final Element transformsDom=DSSXMLUtils.addElement(documentDom,referenceDom,XMLNS,DS_TRANSFORMS);
    for (    final DSSTransform dssTransform : dssTransforms) {
      final Element transformDom=DSSXMLUtils.addElement(documentDom,transformsDom,XMLNS,DS_TRANSFORM);
      createTransform(documentDom,dssTransform,transformDom);
    }
  }
  final DigestAlgorithm digestAlgorithm=dssReference.getDigestMethodAlgorithm();
  incorporateDigestMethod(referenceDom,digestAlgorithm);
  final DSSDocument canonicalizedDocument=transformReference(dssReference);
  if (LOG.isTraceEnabled()) {
    LOG.trace("Reference canonicalization method  -->" + signedInfoCanonicalizationMethod);
  }
  incorporateDigestValue(referenceDom,digestAlgorithm,canonicalizedDocument);
}

private void incorporateReference ( final DSSReference dssReference ) { final Element referenceDom = DSSXMLUtils . addElement ( documentDom , signedInfoDom , XMLNS , DS_REFERENCE ) ; referenceDom . setAttribute ( ID , dssReference . getId ( ) ) ; final String uri = dssReference . getUri ( ) ; referenceDom . setAttribute ( URI , uri ) ; referenceDom . setAttribute ( TYPE , dssReference . getType ( ) ) ; final List < DSSTransform > dssTransforms = dssReference . getTransforms ( ) ; if ( dssTransforms != null ) { final Element transformsDom = DSSXMLUtils . addElement ( documentDom , referenceDom , XMLNS , DS_TRANSFORMS ) ; for ( final DSSTransform dssTransform : dssTransforms ) { final Element transformDom = DSSXMLUtils . addElement ( documentDom , transformsDom , XMLNS , DS_TRANSFORM ) ; createTransform ( documentDom , dssTransform , transformDom ) ; } } final DigestAlgorithm digestAlgorithm = dssReference . getDigestMethodAlgorithm ( ) ; incorporateDigestMethod ( referenceDom , digestAlgorithm ) ; final DSSDocument canonicalizedDocument = transformReference ( dssReference ) ; if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "Reference canonicalization method  -->" + signedInfoCanonicalizationMethod ) ; } incorporateDigestValue ( referenceDom , digestAlgorithm , canonicalizedDocument ) ; }
this method incorporates a reference within the signedinfodom
