Tabnine Logo
Validator
Code IndexAdd Tabnine to your IDE (free)

How to use
Validator
in
ca.uhn.hl7v2.conf.check

Best Java code snippets using ca.uhn.hl7v2.conf.check.Validator (Showing top 2 results out of 315)

origin: ca.uhn.hapi/hapi-base

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 = 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);
  }
  
  ValidationException[] result = new ValidationException[exceptions.length];
  for (int i = 0; i < exceptions.length; i++) {
    result[i] = ValidationException.fromHL7Exception(exceptions[i]);
  }
  return result;
}

origin: ca.uhn.hapi/hapi-osgi-base

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 = 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);
  }
  
  ValidationException[] result = new ValidationException[exceptions.length];
  for (int i = 0; i < exceptions.length; i++) {
    result[i] = ValidationException.fromHL7Exception(exceptions[i]);
  }
  return result;
}

ca.uhn.hl7v2.conf.checkValidator

Javadoc

Validates messages against message profiles. In general you use this by formulating a ConformanceProfileRule and validating a message using this rule.

Most used methods

  • validate
    Validates the given message against the given static definition from a conformance profile. Conforma

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • JList (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now