// References
List<Reference> modelReferenceList = modelSignedInfo.getReference();
List<ReferenceType> apiReferenceList = apiSignedInfoType.getReference();
for (Reference modelRef : modelReferenceList) {
ReferenceType apiRef = new ReferenceType();
String refUri = modelRef.getUri();
if (refUri == null) {
refUri = "";
}
apiRef.setURI(refUri);
List<SignatureTransform> modelSigTransformList = modelRef.getTransforms();
TransformsType apiTransformsType = apiRef.getTransforms();
if (apiTransformsType == null) {
apiTransformsType = new TransformsType();
apiRef.setTransforms(apiTransformsType);
}
List<TransformType> apiTransformList = apiTransformsType.getTransform();
for (SignatureTransform modelSigTransform : modelSigTransformList) {
String modelTransformAlgStr = modelSigTransform.getTransform();
TransformType apiTransform = new TransformType();
apiTransform.setAlgorithm(modelTransformAlgStr);
List<SignatureTransformDataValue> sigTransformSDVList = modelSigTransform.getSignatureTransformDataValue();
for (SignatureTransformDataValue sigTransformSDV : sigTransformSDVList) {
String type = sigTransformSDV.getContentType();
byte[] xformBytes = sigTransformSDV.getContentBytes();
Object transformObject = convertDataToTransformContent(type, xformBytes);
apiTransform.getContent().add(transformObject);
}
apiTransformList.add(apiTransform);
}
String digestMethodStr = modelRef.getDigestMethod();
byte[] digestValBytes = modelRef.getDigestValue();
DigestMethodType apiDigestMethod = new DigestMethodType();
apiDigestMethod.setAlgorithm(digestMethodStr);
apiRef.setDigestMethod(apiDigestMethod);
apiRef.setDigestValue(digestValBytes);
apiReferenceList.add(apiRef);
}
// Signature Value