return declaredProfiles.toArray(new String[declaredProfiles.size()]);
}
private ValidationException[] testAgainstProfile(Message message, String id) throws ProfileException, HL7Exception {
HL7Exception[] exceptions;
HapiContext context = message.getParser().getHapiContext();
Validator validator = context.getConformanceValidator();
try {
ProfileStore profileStore = context.getProfileStore();
String profileString = profileStore.getProfile(id);
if (profileString != null) {
RuntimeProfile profile = PARSER.parse(profileString);
exceptions = validator.validate(message, profile.getMessage());
} else {