Package org.projecthusky.valueset.api
Class ValueSetPackageManager
java.lang.Object
org.projecthusky.valueset.api.ValueSetPackageManager
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a value set package config. Fügt eine Wertesatz-Paket-Konfiguration hinzu.void
Clears the value set package config list. Löscht die Konfigurationsliste des Wertesatzpakets.downloadValueSetPackage
(ValueSetPackageConfig valueSetPackageConfig) Downloads a value set package. Lädt ein Wertesatzpaket herunter.downloadValueSetPackageConfig
(String sourceUrl) Downloads a value set package configuration from the given URL. Lädt eine Value-Set-Paketkonfiguration von der angegebenen URL herunter.downloadValueSetPackageConfig
(URL sourceUrl) Downloads a value set package configuration from the given URL. Lädt eine Value-Set-Paketkonfiguration von der angegebenen URL herunter.Gets the latest value set package config.Gets the latest value set package config by status.getValueSetPackageConfigByStatusAndDate
(ValueSetPackageStatus status, Date date) Gets the value set package config by status and date.Gets the value set package config list. Ruft die Liste der Wertesatzpaket-Konfigurationen ab.loadValueSetPackage
(File valueSetPackage) Loads a value set package from the given file. Lädt ein Wertesatz-Paket aus der angegebenen Datei.loadValueSetPackage
(InputStream inputStream) Loads a value set package from the given stream. Lädt ein Wertesatz-Paket aus dem angegebenen Stream.loadValueSetPackage
(String fileName) 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).loadValueSetPackageConfig
(File config) Loads a value set package configuration from the given file. Lädt eine Wertesatz-Paket-Konfigurationaus der angegebenen Datei.loadValueSetPackageConfig
(InputStream inputStream) Loads a value set package configuration from the given stream. Lädt eine Wertesatz-Paket-Konfigurationaus dem angegebenen Stream.loadValueSetPackageConfig
(String fileName) 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).void
saveValueSetPackage
(ValueSetPackage valueSetPackage, File file) Saves a value set package in YAML format into the given File. Speichert ein Wertesatz-Paket im YAML-Format in der angegebenen Datei.void
saveValueSetPackage
(ValueSetPackage valueSetPackage, OutputStream outputStream) Saves a value set package in YAML format into the given output stream. Speichert ein Wertesatz-Paket im YAML-Format in der angegebenen Datei.void
saveValueSetPackage
(ValueSetPackage valueSetPackage, String fileName) 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).void
saveValueSetPackageConfig
(ValueSetPackageConfig config, File file) 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.void
saveValueSetPackageConfig
(ValueSetPackageConfig config, OutputStream outputStream) 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.void
saveValueSetPackageConfig
(ValueSetPackageConfig config, String fileName) 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).
-
Constructor Details
-
ValueSetPackageManager
public ValueSetPackageManager()
-
-
Method Details
-
addValueSetPackageConfig
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
public ValueSetPackage downloadValueSetPackage(ValueSetPackageConfig valueSetPackageConfig) throws IOException, ParserConfigurationException, SAXException, InitializationException 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 exceptionIOException
- Signals that an I/O exception has occurred.ParserConfigurationException
- the parser configuration exceptionSAXException
- the SAX exceptionInitializationException
- 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 exceptionIOException
- 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
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
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 statusdate
- the date- Returns:
- the value set package config by status and date
-
listValueSetPackageConfigs
Gets the value set package config list.Ruft die Liste der Wertesatzpaket-Konfigurationen ab.- Returns:
- the list
-
loadValueSetPackage
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
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 exceptionIOException
-
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 exceptionIOException
-
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 exceptionIOException
-
saveValueSetPackage
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 packagefile
- 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 packageoutputStream
- 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 packagefileName
- the file name- Throws:
IOException
- Signals that an I/O exception has occurred.
-
saveValueSetPackageConfig
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 configfile
- 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 configoutputStream
- 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 configfileName
- the file name- Throws:
IOException
- Signals that an I/O exception has occurred.
-