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 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
 String getProfile(String ID)
          Retrieves profile from persistent storage (by ID).
abstract  URL getURL(String ID)
          Returns the URL from which to read a profile given the profile ID.
 void persistProfile(String ID, 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 String getProfile(String ID)
                  throws IOException
Retrieves profile from persistent storage (by ID).

Specified by:
getProfile in interface ProfileStore
Throws:
IOException

persistProfile

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

Specified by:
persistProfile in interface ProfileStore
Throws:
IOException

getURL

public abstract URL getURL(String ID)
                    throws 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:
MalformedURLException


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