public class DatabaseMediaImporter extends MediaImporter
MediaImporter.MediaImporterWithFileChooserDialogThread, MediaImporter.OurReadTerminationStrategy
Modifier and Type | Field and Description |
---|---|
protected DatabaseInformationModel |
databaseInformationModel |
protected java.io.File |
savedInstancesFolder |
protected StoredFilePathStrategy |
storedFilePathStrategy |
logger, mediaDirectoryPath, progressBar, progressBarUpdater, terminateAfterIdentifyingGroup
Constructor and Description |
---|
DatabaseMediaImporter(java.lang.String mediaDirectoryPath,
java.io.File savedInstancesFolder,
DatabaseInformationModel databaseInformationModel,
MessageLogger logger) |
DatabaseMediaImporter(java.lang.String mediaDirectoryPath,
java.io.File savedInstancesFolder,
StoredFilePathStrategy storedFilePathStrategy,
DatabaseInformationModel databaseInformationModel,
MessageLogger logger) |
Modifier and Type | Method and Description |
---|---|
protected void |
doSomethingWithDicomFileOnMedia(java.lang.String mediaFileName)
Makes a copy of the DICOM file in the temporary folder, reads the DICOM attributes to
extract the necessary information and inserts a reference to the copied file in the database.
|
choosePathAndImportDicomFiles, choosePathAndImportDicomFiles, doSomethingWithDicomFileOnMedia, doSomethingWithUnwantedFileOnMedia, getDirectory, importDicomFiles, isOKToImport, logLn, main
protected DatabaseInformationModel databaseInformationModel
protected java.io.File savedInstancesFolder
protected StoredFilePathStrategy storedFilePathStrategy
public DatabaseMediaImporter(java.lang.String mediaDirectoryPath, java.io.File savedInstancesFolder, DatabaseInformationModel databaseInformationModel, MessageLogger logger)
public DatabaseMediaImporter(java.lang.String mediaDirectoryPath, java.io.File savedInstancesFolder, StoredFilePathStrategy storedFilePathStrategy, DatabaseInformationModel databaseInformationModel, MessageLogger logger)
protected void doSomethingWithDicomFileOnMedia(java.lang.String mediaFileName)
Makes a copy of the DICOM file in the temporary folder, reads the DICOM attributes to extract the necessary information and inserts a reference to the copied file in the database.
If any errors are encountered during this process, the exceptions are caught, logged to stderr, and no further action is taken. Copying is not performed until after the DICOM attributes are successfully extracted, but orphan temporary copies could exist if the database insertion fails.
doSomethingWithDicomFileOnMedia
in class MediaImporter
mediaFileName
- the fully qualified path name to a DICOM file