com.pixelmed.database

## Class DatabaseApplicationProperties

- java.lang.Object
- - com.pixelmed.database.DatabaseApplicationProperties

    public class DatabaseApplicationProperties
    extends java.lang.Object

This class provides common support to applications requiring properties related to database services.

The following properties are supported:

`Application.DatabaseFileName` - where to save the database files

`Application.SavedImagesFolderName` - where to save incoming images referenced by the database

`Application.DatabaseServerName` - name to use for external TCP access to database (such a server will not be started if this property is absent)

### Field Summary

Fields
`static java.lang.String` `propertyName_DatabaseFileName`
`static java.lang.String` `propertyName_DatabaseServerName`
`static java.lang.String` `propertyName_SavedImagesFolderName`

### Constructor Summary

Constructors
Constructor and Description
`DatabaseApplicationProperties(java.util.Properties properties)` Extract the DICOM network properties from the supplied properties.

### Method Summary

Methods
`java.lang.String` `getDatabaseFileName()` Return the database file name.
`java.lang.String` `getDatabaseServerName()` Return the database server name for external access.
`java.io.File` `getSavedImagesFolderCreatingItIfNecessary()` Return the saved images folder, creating it if necessary.
`java.lang.String` `getSavedImagesFolderName()` Return the saved images folder name.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### propertyName_DatabaseFileName

    public static final java.lang.String propertyName_DatabaseFileName

See Also:
  Constant Field Values

#### propertyName_SavedImagesFolderName

    public static final java.lang.String propertyName_SavedImagesFolderName

See Also:
  Constant Field Values

#### propertyName_DatabaseServerName

    public static final java.lang.String propertyName_DatabaseServerName

See Also:
  Constant Field Values

### Constructor Detail

#### DatabaseApplicationProperties

    public DatabaseApplicationProperties(java.util.Properties properties)

Extract the DICOM network properties from the supplied properties.

Parameters:
  `properties` -

### Method Detail

#### getDatabaseFileName

    public java.lang.String getDatabaseFileName()

Return the database file name.

Returns:
  the database file name

#### getSavedImagesFolderName

    public java.lang.String getSavedImagesFolderName()

Return the saved images folder name.

Returns:
  the saved images folder name

#### getSavedImagesFolderCreatingItIfNecessary

    public java.io.File getSavedImagesFolderCreatingItIfNecessary()
                                                           throws java.io.IOException

Return the saved images folder, creating it if necessary.

If not an absolute path, will be sought or created relative to the current user's home directory.

Returns:
  the saved images folder
Throws:
  `java.io.IOException`

#### getDatabaseServerName

    public java.lang.String getDatabaseServerName()

Return the database server name for external access.

Returns:
  the database server name