Examples of RuntimeProfile


Examples of ca.uhn.hl7v2.conf.spec.RuntimeProfile

        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);
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.RuntimeProfile

      Parser parser = new GenericParser();
      Message message = parser.parse(msgString);

      String profileString = loadFile(args[1]);
      ProfileParser profParser = new ProfileParser(true);
      RuntimeProfile profile = profParser.parse(profileString);

      HL7Exception[] exceptions = val.validate(message, profile.getMessage());

      System.out.println("Exceptions: ");
      for (int i = 0; i < exceptions.length; i++) {
        System.out.println((i + 1) + ". " + exceptions[i].getMessage());
      }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.RuntimeProfile

        }
        return declaredProfiles.toArray(new String[declaredProfiles.size()]);
    }

    private synchronized RuntimeProfile getProfile(String profileString) throws ProfileException {
        RuntimeProfile profile = PROFILE_CACHE.get(profileString);
        if (profile == null) {
            profile = PARSER.parse(profileString);
            if (enableCaching) PROFILE_CACHE.put(profileString, profile);
        }
        return profile;
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.RuntimeProfile

        Validator validator = context.getConformanceValidator();
        try {
            ProfileStore profileStore = context.getProfileStore();
            String profileString = profileStore.getProfile(id);
            if (profileString != null) {
                RuntimeProfile profile = getProfile(profileString);
                exceptions = validator.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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.