Class URLProfileStore

java.lang.Object
ca.uhn.hl7v2.conf.store.ReadOnlyProfileStore
ca.uhn.hl7v2.conf.store.URLProfileStore
All Implemented Interfaces:
ProfileStore
Direct Known Subclasses:
ClasspathProfileStore

public abstract class URLProfileStore extends ReadOnlyProfileStore
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 Details

    • URLProfileStore

      public URLProfileStore()
      Creates a new instance of URLProfileStore
  • Method Details

    • getProfile

      public String getProfile(String id) throws IOException
      Retrieves profile from persistent storage (by ID).
      Parameters:
      id - profile id
      Returns:
      profile content or null if profile could not be found
      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