Package com.pixelmed.network

# Class NetworkApplicationProperties

java.lang.Object
com.pixelmed.network.NetworkApplicationProperties

public class NetworkApplicationProperties extends Object

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

Also contains a main method that can be used, for example, to convert information previously statically configured by properties on each device, to assemble LDIF files to be loaded into an LDAP server for use via the DICOM Network Configuration Management service.

The following properties are supported:

`Dicom.ListeningPort` - the port that an association acceptor will listen on for incoming connections

`Dicom.CalledAETitle` - what the AE expects to be called when accepting an association

`Dicom.CallingAETitle` - what the AE will call itself when initiating an association

`Dicom.PrimaryDeviceType` - what our own primary device type is

`Dicom.StorageSCUCompressionLevel` - determines what types of compressed Transfer Syntaxes are proposed by a Storage SCU; 0 = uncompressed transfer syntaxes only; 1 = propose deflate as well; 2 = propose deflate and bzip2 (if bzip2 codec is available)

`Dicom.AcceptorMaximumLengthReceived` - the maximum PDU length that an association acceptor will offer to receive (0 for no maximum)

`Dicom.AcceptorSocketReceiveBufferSize` - the TCP socket receive buffer size to set for incoming connections (or 0 to leave unchanged and use platform default)

`Dicom.AcceptorSocketSendBufferSize` - the TCP socket send buffer size to set for incoming connections (or 0 to leave unchanged and use platform default)

`Dicom.InitiatorMaximumLengthReceived` - the maximum PDU length that an association initiator will offer to receive (0 for no maximum)

`Dicom.InitiatorSocketReceiveBufferSize` - the TCP socket receive buffer size to set for incoming connections (or 0 to leave unchanged and use platform default)

`Dicom.InitiatorSocketSendBufferSize` - the TCP socket send buffer size to set for incoming connections (or 0 to leave unchanged and use platform default)

`Dicom.RemoteAEs` - a space or comma separated list of the local names all the available remote AEs; each local name may be anything unique (in this file) without a space or comma; the local name does not need to be the same as the remote AE's called AE title

`Dicom.XXXX.CalledAETitle` - for the remote AE with local name XXXX, what that AE expects to be called when accepting an association

`Dicom.XXXX.HostNameOrIPAddress` - for the remote AE with local name XXXX, what hostname or IP addess that AE will listen on for incoming connections

`Dicom.XXXX.Port` - for the remote AE with local name XXXX, what port that AE will listen on for incoming connections

`Dicom.XXXX.QueryModel` - for the remote AE with local name XXXX, what query model is supported; values are STUDYROOT or PATIENTROOT; leave absent if query/retrieve not supported by the remote AE

`Dicom.XXXX.PrimaryDeviceType` - for the remote AE with local name XXXX, what the primary device type is (see DICOM PS 3.15 and PS 3.16)

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`NetworkApplicationProperties.OurNetworkConfigurationSource`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected NetworkConfigurationSource`
`networkConfigurationSource`
`static final String`
`PatientRootQueryModel`
`static final String`
`PatientStudyOnlyQueryModel`
`static final String`
`propertyName_DicomAcceptorMaximumLengthReceived`
`static final String`
`propertyName_DicomAcceptorSocketReceiveBufferSize`
`static final String`
`propertyName_DicomAcceptorSocketSendBufferSize`
`static final String`
`propertyName_DicomCalledAETitle`
`static final String`
`propertyName_DicomCallingAETitle`
`static final String`
`propertyName_DicomInitiatorMaximumLengthReceived`
`static final String`
`propertyName_DicomInitiatorSocketReceiveBufferSize`
`static final String`
`propertyName_DicomInitiatorSocketSendBufferSize`
`static final String`
`propertyName_DicomListeningPort`
`static final String`
`propertyName_PrimaryDeviceType`
`static final String`
`propertyName_StorageSCUCompressionLevel`
`static final String`
`StudyRootQueryModel`

## Constructor Summary

Constructors
Constructor
Description
`NetworkApplicationProperties()`
Create default properties.
`NetworkApplicationProperties(Properties properties)`
Extract the DICOM network properties from the supplied properties.
`NetworkApplicationProperties(Properties properties, boolean addPublicStorageSCPsIfNoRemoteAEsConfigured)`
Extract the DICOM network properties from the supplied properties.

## Method Summary

Modifier and Type
Method
Description
`int`
`getAcceptorMaximumLengthReceived()`
Return the Maximum Length Received for the Association Acceptor.
`int`
`getAcceptorSocketReceiveBufferSize()`
Return the TCP socket receive buffer size for the Association Acceptor.
`int`
`getAcceptorSocketSendBufferSize()`
Return the TCP socket send buffer size for the Association Acceptor.
`String`
`getCalledAETitle()`
Return the called AET.
`String`
`getCallingAETitle()`
Return the calling AET.
`int`
`getInitiatorMaximumLengthReceived()`
Return the Maximum Length Received for the Association Initiator.
`int`
`getInitiatorSocketReceiveBufferSize()`
Return the TCP socket receive buffer size for the Association Initiator.
`int`
`getInitiatorSocketSendBufferSize()`
Return the TCP socket send buffer size for the Association Initiator.
`int`
`getListeningPort()`
Return the listening port.
`NetworkApplicationInformation`
`getNetworkApplicationInformation()`
Return the network application information.
`NetworkConfigurationSource`
`getNetworkConfigurationSource()`
Return a network configuration source that will supply the network application information.
`String`
`getPrimaryDeviceType()`
Return the primary device type.
`Properties`
`getProperties(Properties properties)`
Retrieve the DICOM network properties.
`int`
`getStorageSCUCompressionLevel()`
Return the storage SCU compression level.
`static final boolean`
`isPatientRootQueryModel(String model)`
Is the model Patient Root ?
`static final boolean`
`isPatientStudyOnlyQueryModel(String model)`
Is the model Patient/Study Only ?
`static final boolean`
`isStudyRootQueryModel(String model)`
Is the model Study Root ?
`static void`
`main(String[] arg)`
Test the parsing of network properties from the specified file, by reading them and converting into LDIF format.
`void`
`setAcceptorMaximumLengthReceived(int acceptorMaximumLengthReceived)`
Set the PDU Maximum Length Received for the Association Acceptor.
`void`
`setAcceptorSocketReceiveBufferSize(int acceptorSocketReceiveBufferSize)`
Set the TCP socket receive buffer size for the Association Acceptor.
`void`
`setAcceptorSocketSendBufferSize(int acceptorSocketSendBufferSize)`
Set the TCP socket send buffer size for the Association Acceptor.
`void`
`setCalledAETitle(String calledAETitle)`
Set the called AET.
`void`
`setCallingAETitle(String callingAETitle)`
Set the calling AET.
`void`
`setInitiatorMaximumLengthReceived(int initiatorMaximumLengthReceived)`
Set the PDU Maximum Length Received for the Association Initiator.
`void`
`setInitiatorSocketReceiveBufferSize(int initiatorSocketReceiveBufferSize)`
Set the TCP socket receive buffer size for the Association Initiator.
`void`
`setInitiatorSocketSendBufferSize(int initiatorSocketSendBufferSize)`
Set the TCP socket send buffer size for the Association Initiator.
`void`
`setListeningPort(int port)`
Set the listening port.
`void`
`setPrimaryDeviceType(String primaryDeviceType)`
Set the primary device type.
`String`
`toString()`

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

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

## Field Details

### propertyName_DicomListeningPort

public static final String propertyName_DicomListeningPort

See Also:
  - Constant Field Values

### propertyName_DicomCalledAETitle

public static final String propertyName_DicomCalledAETitle

See Also:
  - Constant Field Values

### propertyName_DicomCallingAETitle

public static final String propertyName_DicomCallingAETitle

See Also:
  - Constant Field Values

### propertyName_PrimaryDeviceType

public static final String propertyName_PrimaryDeviceType

See Also:
  - Constant Field Values

### propertyName_DicomAcceptorMaximumLengthReceived

public static final String propertyName_DicomAcceptorMaximumLengthReceived

See Also:
  - Constant Field Values

### propertyName_DicomAcceptorSocketReceiveBufferSize

public static final String propertyName_DicomAcceptorSocketReceiveBufferSize

See Also:
  - Constant Field Values

### propertyName_DicomAcceptorSocketSendBufferSize

public static final String propertyName_DicomAcceptorSocketSendBufferSize

See Also:
  - Constant Field Values

### propertyName_DicomInitiatorMaximumLengthReceived

public static final String propertyName_DicomInitiatorMaximumLengthReceived

See Also:
  - Constant Field Values

### propertyName_DicomInitiatorSocketReceiveBufferSize

public static final String propertyName_DicomInitiatorSocketReceiveBufferSize

See Also:
  - Constant Field Values

### propertyName_DicomInitiatorSocketSendBufferSize

public static final String propertyName_DicomInitiatorSocketSendBufferSize

See Also:
  - Constant Field Values

### StudyRootQueryModel

public static final String StudyRootQueryModel

See Also:
  - Constant Field Values

### PatientRootQueryModel

public static final String PatientRootQueryModel

See Also:
  - Constant Field Values

### PatientStudyOnlyQueryModel

public static final String PatientStudyOnlyQueryModel

See Also:
  - Constant Field Values

### propertyName_StorageSCUCompressionLevel

public static final String propertyName_StorageSCUCompressionLevel

See Also:
  - Constant Field Values

### networkConfigurationSource

protected NetworkConfigurationSource networkConfigurationSource

## Constructor Details

### NetworkApplicationProperties

public NetworkApplicationProperties() throws DicomNetworkException

Create default properties.

Throws:
  `DicomNetworkException`

### NetworkApplicationProperties

public NetworkApplicationProperties(Properties properties) throws DicomNetworkException, IOException

Extract the DICOM network properties from the supplied properties.

Parameters:
  `properties` -
Throws:
  `DicomNetworkException`
  `IOException`

### NetworkApplicationProperties

public NetworkApplicationProperties(Properties properties, boolean addPublicStorageSCPsIfNoRemoteAEsConfigured) throws DicomNetworkException, IOException

Extract the DICOM network properties from the supplied properties.

Parameters:
  `properties` -
  `addPublicStorageSCPsIfNoRemoteAEsConfigured` -
Throws:
  `DicomNetworkException`
  `IOException`

## Method Details

### isStudyRootQueryModel

public static final boolean isStudyRootQueryModel(String model)

Is the model Study Root ?

Parameters:
  `model` - the string value describing the model, as used in the query model remote AE property
Returns:
  true if Study Root

### isPatientRootQueryModel

public static final boolean isPatientRootQueryModel(String model)

Is the model Patient Root ?

Parameters:
  `model` - the string value describing the model, as used in the query model remote AE property
Returns:
  true if Patient Root

### isPatientStudyOnlyQueryModel

public static final boolean isPatientStudyOnlyQueryModel(String model)

Is the model Patient/Study Only ?

Parameters:
  `model` - the string value describing the model, as used in the query model remote AE property
Returns:
  true if Patient/Study Only

### getProperties

public Properties getProperties(Properties properties)

Retrieve the DICOM network properties.

param properties the existing properties to add to (replacing corresponding properties already there), or null if none

Returns:
  the updated properties or a new set of properties if none supplied

### getListeningPort

public int getListeningPort()

Return the listening port.

Returns:
  the listening port

### setListeningPort

public void setListeningPort(int port)

Set the listening port.

param port the listening port

### getCalledAETitle

public String getCalledAETitle()

Return the called AET.

Returns:
  the called AET

### setCalledAETitle

public void setCalledAETitle(String calledAETitle)

Set the called AET.

param calledAETitle the called AET

### getCallingAETitle

public String getCallingAETitle()

Return the calling AET.

Returns:
  the calling AET

### setCallingAETitle

public void setCallingAETitle(String callingAETitle)

Set the calling AET.

param callingAETitle the calling AET

### getPrimaryDeviceType

public String getPrimaryDeviceType()

Return the primary device type.

Returns:
  the primary device type

### setPrimaryDeviceType

public void setPrimaryDeviceType(String primaryDeviceType)

Set the primary device type.

param primaryDeviceType the primary device type

### getStorageSCUCompressionLevel

public int getStorageSCUCompressionLevel()

Return the storage SCU compression level.

Returns:
  the storage SCU compression level

### getAcceptorMaximumLengthReceived

public int getAcceptorMaximumLengthReceived()

Return the Maximum Length Received for the Association Acceptor.

Returns:
  the Maximum Length Received or the Association Acceptor (0 if unlimited)

### setAcceptorMaximumLengthReceived

public void setAcceptorMaximumLengthReceived(int acceptorMaximumLengthReceived)

Set the PDU Maximum Length Received for the Association Acceptor.

param acceptorMaximumLengthReceived the PDU Maximum Length Received for the Association Acceptor (0 if unlimited)

### getAcceptorSocketReceiveBufferSize

public int getAcceptorSocketReceiveBufferSize()

Return the TCP socket receive buffer size for the Association Acceptor.

Returns:
  the TCP socket receive buffer size for the Association Acceptor (0 to leave unchanged and use platform default)

### setAcceptorSocketReceiveBufferSize

public void setAcceptorSocketReceiveBufferSize(int acceptorSocketReceiveBufferSize)

Set the TCP socket receive buffer size for the Association Acceptor.

param acceptorSocketReceiveBufferSize the TCP socket receive buffer size for the Association Acceptor (0 to leave unchanged and use platform default)

### getAcceptorSocketSendBufferSize

public int getAcceptorSocketSendBufferSize()

Return the TCP socket send buffer size for the Association Acceptor.

Returns:
  the TCP socket send buffer size for the Association Acceptor (0 to leave unchanged and use platform default)

### setAcceptorSocketSendBufferSize

public void setAcceptorSocketSendBufferSize(int acceptorSocketSendBufferSize)

Set the TCP socket send buffer size for the Association Acceptor.

param acceptorSocketSendBufferSize the TCP socket send buffer size for the Association Acceptor (0 to leave unchanged and use platform default)

### getInitiatorMaximumLengthReceived

public int getInitiatorMaximumLengthReceived()

Return the Maximum Length Received for the Association Initiator.

Returns:
  the Maximum Length Received or the Association Initiator (0 if unlimited)

### setInitiatorMaximumLengthReceived

public void setInitiatorMaximumLengthReceived(int initiatorMaximumLengthReceived)

Set the PDU Maximum Length Received for the Association Initiator.

param initiatorMaximumLengthReceived the PDU Maximum Length Received for the Association Initiator (0 if unlimited)

### getInitiatorSocketReceiveBufferSize

public int getInitiatorSocketReceiveBufferSize()

Return the TCP socket receive buffer size for the Association Initiator.

Returns:
  the TCP socket receive buffer size for the Association Initiator (0 to leave unchanged and use platform default)

### setInitiatorSocketReceiveBufferSize

public void setInitiatorSocketReceiveBufferSize(int initiatorSocketReceiveBufferSize)

Set the TCP socket receive buffer size for the Association Initiator.

param initiatorSocketReceiveBufferSize the TCP socket receive buffer size for the Association Initiator (0 to leave unchanged and use platform default)

### getInitiatorSocketSendBufferSize

public int getInitiatorSocketSendBufferSize()

Return the TCP socket send buffer size for the Association Initiator.

Returns:
  the TCP socket send buffer size for the Association Initiator (0 to leave unchanged and use platform default)

### setInitiatorSocketSendBufferSize

public void setInitiatorSocketSendBufferSize(int initiatorSocketSendBufferSize)

Set the TCP socket send buffer size for the Association Initiator.

param initiatorSocketSendBufferSize the TCP socket send buffer size for the Association Initiator (0 to leave unchanged and use platform default)

### getNetworkApplicationInformation

public NetworkApplicationInformation getNetworkApplicationInformation()

Return the network application information.

Returns:
  the network application information

### getNetworkConfigurationSource

public NetworkConfigurationSource getNetworkConfigurationSource()

Return a network configuration source that will supply the network application information.

Returns:
  the network configuration source

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### main

public static void main(String[] arg)

Test the parsing of network properties from the specified file, by reading them and converting into LDIF format.

Can be used, for example, to convert information previously statically configured by properties on each device, to assemble LDIF files to be loaded into an LDAP server for use via the DICOM Network Configuration Management service.

Parameters:
  `arg` - two arguments, a single file name that is the properties file, then the root distinguished name for LDAP