(SignaturePolicy.FeatureBinding)sigPol.getFeatureBinding();
ArrayList targets = featureBinding.getTargetBindings();
buffer.append("\tCanonicalizationAlgorithm" + featureBinding.getCanonicalizationAlgorithm() + "\n");
buffer.append("\t Targets\n");
for(int j = 0; j < targets.size(); j++){
SignatureTarget target = (SignatureTarget)targets.get(j);
buffer.append("\t " + j + ":Type:" + target.getType() + "\n");
buffer.append("\t Value:" + target.getValue() + "\n");
buffer.append("\t DigestAlgorithm:" + target.getDigestAlgorithm() + "\n");
ArrayList transforms = target.getTransforms();
if(transforms != null){
buffer.append("\t " + "Transforms::\n");
for(int k = 0; k < transforms.size(); k++){
buffer.append("\t " + " " + ((SignatureTarget.Transform)transforms.get(k)).getTransform() + "\n");
}
}
}
MLSPolicy keyBinding = sigPol.getKeyBinding();
if(keyBinding != null){
buffer.append("\tKeyBinding\n");
printKeyBinding(keyBinding, buffer);
}
} else if(PolicyTypeUtil.encryptionPolicy(pol)){
buffer.append("Encryption Policy\n");
EncryptionPolicy encPol = (EncryptionPolicy)pol;
EncryptionPolicy.FeatureBinding featureBinding =
(EncryptionPolicy.FeatureBinding)encPol.getFeatureBinding();
ArrayList targets = featureBinding.getTargetBindings();
buffer.append("\t Targets\n");
for(int j = 0; j < targets.size(); j++){
EncryptionTarget target = (EncryptionTarget)targets.get(j);
buffer.append("\t " + j + ":"+ "Type:" + target.getType() + "\n");
buffer.append("\t Value:" + target.getValue() + "\n");
buffer.append("\t ContentOnly:" + target.getContentOnly() + "\n");
buffer.append("\t DataEncryptionAlgorithm:" + target.getDataEncryptionAlgorithm() + "\n");
}
MLSPolicy keyBinding = encPol.getKeyBinding();
if(keyBinding != null){
buffer.append("\tKeyBinding\n");
printKeyBinding(keyBinding, buffer);