modelNode.setFactoryURLPkgs(apiNode.getFactoryURLPkgs());
}
}
private static Reference mapReference(SignedInfo modelSignedInfo, ReferenceType apiReference) {
Reference ref = new Reference();
ref.setSignedInfo(modelSignedInfo);
String refUri = apiReference.getURI();
if (refUri == null) {
refUri = "";
}
ref.setUri(refUri);
List<org.w3._2000._09.xmldsig_.TransformType> apiTransformList = apiReference.getTransforms().getTransform();
for (org.w3._2000._09.xmldsig_.TransformType apiTransform : apiTransformList) {
SignatureTransform modelTransform = new SignatureTransform();
modelTransform.setReference(ref);
modelTransform.setTransform(apiTransform.getAlgorithm());
for (Object xform : apiTransform.getContent()) {
SignatureTransformDataValue sdv = mapSignatureTransformDataValue(xform);
sdv.setSignatureTransform(modelTransform);
modelTransform.getSignatureTransformDataValue().add(sdv);
}
ref.getTransforms().add(modelTransform);
}
String digestMethodStr = apiReference.getDigestMethod().getAlgorithm();
byte[] digestValueBytes = apiReference.getDigestValue();
ref.setDigestMethod(digestMethodStr);
ref.setDigestValue(digestValueBytes);
return ref;
}