return (String[]) declaredProfiles.toArray(new String[0]);
}
private ValidationException[] testAgainstProfile(Message message, String id) throws ProfileException, HL7Exception {
HL7Exception[] exceptions = null;
DefaultValidator val = new DefaultValidator();
try {
String profileString = ProfileStoreFactory.getProfileStore().getProfile(id);
if (profileString != null) {
ProfileParser profParser = new ProfileParser(true);
RuntimeProfile profile = profParser.parse(profileString);
exceptions = val.validate(message, profile.getMessage());
} else {
throw new ProfileException("Unable to find the profile " + id);
}
} catch (IOException e) {
throw new ProfileException("Error retreiving profile " + id, e);