ca.uhn.hl7v2.conf.store
Class URLProfileStore

java.lang.Object
  extended by ca.uhn.hl7v2.conf.store.URLProfileStore
All Implemented Interfaces:
ProfileStore

public abstract class URLProfileStore
extends java.lang.Object
implements ProfileStore

A read-only profile store that loads profiles from URLs. The URL for a profile is determined by the method getURL(). An attempt is also made to write

Author:
Bryan Tripp

Constructor Summary
URLProfileStore()
          Creates a new instance of URLProfileStore
 
Method Summary
 java.lang.String getProfile(java.lang.String ID)
          Retrieves profile from persistent storage (by ID).
abstract  java.net.URL getURL(java.lang.String ID)
          Returns the URL from which to read a profile given the profile ID.
 void persistProfile(java.lang.String ID, java.lang.String profile)
          Stores profile in persistent storage with given ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLProfileStore

public URLProfileStore()
Creates a new instance of URLProfileStore

Method Detail

getProfile

public java.lang.String getProfile(java.lang.String ID)
                            throws java.io.IOException
Retrieves profile from persistent storage (by ID).

Specified by:
getProfile in interface ProfileStore
Throws:
java.io.IOException

persistProfile

public void persistProfile(java.lang.String ID,
                           java.lang.String profile)
                    throws java.io.IOException
Stores profile in persistent storage with given ID.

Specified by:
persistProfile in interface ProfileStore
Throws:
java.io.IOException

getURL

public abstract java.net.URL getURL(java.lang.String ID)
                             throws java.net.MalformedURLException
Returns the URL from which to read a profile given the profile ID. For example given "123" it could return ftp://hospital_x.org/hl7/123.xml, or http://hl7_conformance_service.com?profile=123.

Throws:
java.net.MalformedURLException


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