ca.uhn.hl7v2.conf.parser
Class ProfileParser

java.lang.Object
  extended by ca.uhn.hl7v2.conf.parser.ProfileParser

public class ProfileParser
extends java.lang.Object

Parses a Message Profile XML document into a RuntimeProfile object. A Message Profile is a formal description of additional constraints on a message (beyond what is specified in the HL7 specification), usually for a particular system, region, etc. Message profiles are introduced in HL7 version 2.5 section 2.12. The RuntimeProfile object is simply an object representation of the profile, which may be used for validating messages or editing the profile.

Author:
Bryan Tripp

Constructor Summary
ProfileParser(boolean alwaysValidateAgainstDTD)
          Creates a new instance of ProfileParser
 
Method Summary
static void main(java.lang.String[] args)
           
 RuntimeProfile parse(java.lang.String profileString)
          Parses an XML profile string into a RuntimeProfile object.
 RuntimeProfile parseClasspath(java.lang.String classPath)
          Parses an XML profile string into a RuntimeProfile object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileParser

public ProfileParser(boolean alwaysValidateAgainstDTD)
Creates a new instance of ProfileParser

Parameters:
alwaysValidateAgainstDTD - if true, validates all profiles against a local copy of the profile DTD; if false, validates against declared grammar (if any)
Method Detail

parseClasspath

public RuntimeProfile parseClasspath(java.lang.String classPath)
                              throws ProfileException,
                                     java.io.IOException
Parses an XML profile string into a RuntimeProfile object. Input is a path pointing to a textual file on the classpath. Note that the file will be read using the thread context class loader. For example, if you had a file called PROFILE.TXT in package com.foo.stuff, you would pass in "com/foo/stuff/PROFILE.TXT"

Throws:
java.io.IOException - If the resource can't be read
ProfileException

parse

public RuntimeProfile parse(java.lang.String profileString)
                     throws ProfileException
Parses an XML profile string into a RuntimeProfile object.

Throws:
ProfileException

main

public static void main(java.lang.String[] args)


Copyright © 2001-2011 University Health Network. All Rights Reserved.