Class ValueSetPackageManager

java.lang.Object
org.projecthusky.valueset.api.ValueSetPackageManager

public class ValueSetPackageManager extends Object
The Class ValueSetPackageManager is intended to provide all necessary functions to fill, use, download and save value set packages.
Der Class ValueSetPackageManager dient dazu alle notwendigen Funktionen zum Befüllen, Verwenden, Herunterladen und Speichern von ValueSet-Paketen bereitzustellen.
  • Constructor Details

    • ValueSetPackageManager

      public ValueSetPackageManager()
  • Method Details

    • addValueSetPackageConfig

      public void addValueSetPackageConfig(ValueSetPackageConfig value)
      Adds a value set package config.
      Fügt eine Wertesatz-Paket-Konfiguration hinzu.
      Parameters:
      value - the value
    • clearValueSetPackageConfigList

      public void clearValueSetPackageConfigList()
      Clears the value set package config list.
      Löscht die Konfigurationsliste des Wertesatzpakets.
    • downloadValueSetPackage

      Downloads a value set package.
      Lädt ein Wertesatzpaket herunter.
      Parameters:
      valueSetPackageConfig - the value set package config
      Returns:
      the value set package
      Throws:
      MalformedURLException - the malformed URL exception
      IOException - Signals that an I/O exception has occurred.
      ParserConfigurationException - the parser configuration exception
      SAXException - the SAX exception
      InitializationException - the initialization exception
    • downloadValueSetPackageConfig

      public ValueSetPackageConfig downloadValueSetPackageConfig(String sourceUrl) throws IOException, ConfigurationException
      Downloads a value set package configuration from the given URL.
      Lädt eine Value-Set-Paketkonfiguration von der angegebenen URL herunter.
      Parameters:
      sourceUrl - the source url
      Returns:
      the value set package config
      Throws:
      MalformedURLException - the malformed URL exception
      IOException - Signals that an I/O exception has occurred.
      ConfigurationException - the configuration exception
    • downloadValueSetPackageConfig

      public ValueSetPackageConfig downloadValueSetPackageConfig(URL sourceUrl) throws IOException, ConfigurationException
      Downloads a value set package configuration from the given URL.
      Lädt eine Value-Set-Paketkonfiguration von der angegebenen URL herunter.
      Parameters:
      sourceUrl - the source url
      Returns:
      the value set package config
      Throws:
      IOException - Signals that an I/O exception has occurred.
      ConfigurationException - the configuration exception
    • getLatestValueSetPackageConfig

      public ValueSetPackageConfig getLatestValueSetPackageConfig()
      Gets the latest value set package config. The timestamps validFrom and validTo are taken in charge for the selection. If multiple entries have the same conditions, one of them will be returned without further checks.
      Ruft die Konfiguration des neuesten Wertesatzpakets ab. Für die Auswahl werden die Zeitstempel validFrom und validTo verwendet. Wenn mehrere Einträge dieselben Bedingungen haben, wird einer von ihnen ohne weitere Prüfung zurückgegeben.
      Returns:
      the latest value set package config
    • getLatestValueSetPackageConfigByStatus

      public ValueSetPackageConfig getLatestValueSetPackageConfigByStatus(ValueSetPackageStatus status)
      Gets the latest value set package config by status. The timestamps validFrom and validTo are taken in charge for the selection and elements not having the given status will be ignored. If multiple entries have the same conditions, one of them will be returned without further checks.
      Ruft die Konfiguration des neuesten Wertesatzpakets nach Status ab. Die Zeitstempel validFrom und validTo werden für die Auswahl verwendet und Elemente, die nicht den angegebenen Status haben, werden ignoriert. Wenn mehrere Einträge dieselben Bedingungen haben, wird einer von ihnen ohne weitere Prüfung zurückgegeben.
      Parameters:
      status - the status to be verified
      Returns:
      the latest value set package config by status
    • getValueSetPackageConfigByStatusAndDate

      public ValueSetPackageConfig getValueSetPackageConfigByStatusAndDate(ValueSetPackageStatus status, Date date)
      Gets the value set package config by status and date. Elements not having the given status and elements that are not valid at the given time will be ignored. From the remaining elements, the latest one will be returned. If multiple entries have the same conditions, one of them will be returned without further checks.
      Ruft die Wertesatz-Paketkonfiguration nach Status und Datum ab. Elemente, die nicht den angegebenen Status haben, und Elemente, die zum angegebenen Zeitpunkt nicht gültig sind, werden ignoriert. Von den übrigen Elementen wird das letzte zurückgegeben. Wenn mehrere Einträge dieselben Bedingungen haben, wird einer von ihnen ohne weitere Prüfung zurückgegeben.
      Parameters:
      status - the status
      date - the date
      Returns:
      the value set package config by status and date
    • listValueSetPackageConfigs

      public List<ValueSetPackageConfig> listValueSetPackageConfigs()
      Gets the value set package config list.
      Ruft die Liste der Wertesatzpaket-Konfigurationen ab.
      Returns:
      the list
    • loadValueSetPackage

      public ValueSetPackage loadValueSetPackage(File valueSetPackage) throws IOException
      Loads a value set package from the given file.
      Lädt ein Wertesatz-Paket aus der angegebenen Datei.
      Parameters:
      valueSetPackage - the value set package
      Returns:
      the value set package
      Throws:
      IOException
    • loadValueSetPackage

      public ValueSetPackage loadValueSetPackage(InputStream inputStream)
      Loads a value set package from the given stream.
      Lädt ein Wertesatz-Paket aus dem angegebenen Stream.
      Parameters:
      inputStream - the value set package
      Returns:
      the value set package
    • loadValueSetPackage

      public ValueSetPackage loadValueSetPackage(String fileName) throws ConfigurationException, IOException
      Loads a value set package from the given file (the given filename must contain the relative or full path to access the file).
      Lädt ein Wertesatz-Paket aus der angegebenen Datei (der angegebene Dateiname muss den relativen oder vollständigen Pfad enthalten, um auf die Datei zuzugreifen).
      Parameters:
      fileName - the file name
      Returns:
      the value set package
      Throws:
      ConfigurationException - the configuration exception
      IOException
    • loadValueSetPackageConfig

      public ValueSetPackageConfig loadValueSetPackageConfig(File config) throws ConfigurationException, IOException
      Loads a value set package configuration from the given file.
      Lädt eine Wertesatz-Paket-Konfigurationaus der angegebenen Datei.
      Parameters:
      config - the config
      Returns:
      the value set package config
      Throws:
      ConfigurationException - the configuration exception
      IOException
    • loadValueSetPackageConfig

      public ValueSetPackageConfig loadValueSetPackageConfig(InputStream inputStream) throws ConfigurationException
      Loads a value set package configuration from the given stream.
      Lädt eine Wertesatz-Paket-Konfigurationaus dem angegebenen Stream.
      Parameters:
      inputStream - the config
      Returns:
      the value set package config
      Throws:
      ConfigurationException - the configuration exception
    • loadValueSetPackageConfig

      public ValueSetPackageConfig loadValueSetPackageConfig(String fileName) throws ConfigurationException, IOException
      Loads a value set package configuration from the given file (the given filename must contain the relative or full path to access the file).
      Lädt eine Wertesatz-Paket-Konfigurationaus der angegebenen Datei (der angegebene Dateiname muss den relativen oder vollständigen Pfad enthalten, um auf die Datei zuzugreifen).
      Parameters:
      fileName - the file name
      Returns:
      the value set package config
      Throws:
      ConfigurationException - the configuration exception
      IOException
    • saveValueSetPackage

      public void saveValueSetPackage(ValueSetPackage valueSetPackage, File file) throws IOException
      Saves a value set package in YAML format into the given File.
      Speichert ein Wertesatz-Paket im YAML-Format in der angegebenen Datei.
      Parameters:
      valueSetPackage - the value set package
      file - the file
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveValueSetPackage

      public void saveValueSetPackage(ValueSetPackage valueSetPackage, OutputStream outputStream) throws IOException
      Saves a value set package in YAML format into the given output stream.
      Speichert ein Wertesatz-Paket im YAML-Format in der angegebenen Datei.
      Parameters:
      valueSetPackage - the value set package
      outputStream - the output stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveValueSetPackage

      public void saveValueSetPackage(ValueSetPackage valueSetPackage, String fileName) throws IOException
      Saves a value set package in YAML format into the given File (the given filename must contain the relative or full path to access the file).
      Speichert ein Wertesatz-Paket im YAML-Format in der angegebenen Datei (der angegebene Dateiname muss den relativen oder vollständigen Pfad enthalten, um auf die Datei zuzugreifen).
      Parameters:
      valueSetPackage - the value set package
      fileName - the file name
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveValueSetPackageConfig

      public void saveValueSetPackageConfig(ValueSetPackageConfig config, File file) throws IOException
      Saves a value set package configuration in YAML format into the given File.
      Speichert eine Wertesatz-Paket Konfiguration im YAML-Format in der angegebenen Datei.
      Parameters:
      config - the config
      file - the file
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveValueSetPackageConfig

      public void saveValueSetPackageConfig(ValueSetPackageConfig config, OutputStream outputStream) throws IOException
      Saves a value set package configuration in YAML format into the given output stream.
      Speichert eine Wertesatz-Paket Konfiguration im YAML-Format in der angegebenen Datei.
      Parameters:
      config - the config
      outputStream - the output stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveValueSetPackageConfig

      public void saveValueSetPackageConfig(ValueSetPackageConfig config, String fileName) throws IOException
      Saves a value set package configuration in YAML format into the given File (the given filename must contain the relative or full path to access the file).
      Speichert eine Wertesatz-Paket Konfiguration im YAML-Format in der angegebenen Datei (der angegebene Dateiname muss den relativen oder vollständigen Pfad enthalten, um auf die Datei zuzugreifen).
      Parameters:
      config - the config
      fileName - the file name
      Throws:
      IOException - Signals that an I/O exception has occurred.