org.dicom4j.network.dimse.messages.support
Class DimseResponseMessage

java.lang.Object
  extended by org.dicom4j.network.dimse.messages.support.AbstractDimseMessage
      extended by org.dicom4j.network.dimse.messages.support.DimseMessageWithAffectedSOPClass
          extended by org.dicom4j.network.dimse.messages.support.DimseResponseMessage
All Implemented Interfaces:
DimseMessage
Direct Known Subclasses:
CEchoResponseMessage, CFindResponseMessage, CMoveResponseMessage, CStoreResponseMessage, NActionResponse, NCreateResponse

public abstract class DimseResponseMessage
extends DimseMessageWithAffectedSOPClass

Base class for Response messages

Since:
0.0.2
Author:
Laurent Lecomte

Constructor Summary
DimseResponseMessage(CommandSet commandSet)
          create a new message from a CommandSet
DimseResponseMessage(int aMessageID, String aAffectedSOPClassUID)
           
DimseResponseMessage(int messageID, String aAffectedSOPClassUID, int aHasDataset, int status)
           
 
Method Summary
 String getAffectedSOPClassUID()
           
 UniqueIdentifier getAffectedSOPInstanceUIDElement()
           
 String getErrorComment()
           
 LongString getErrorCommentElement()
           
 int getStatus()
          Return the status's value as an integer
 UnsignedShort getStatusElement()
           
 boolean hasErrorCommentElement()
          Return true if the message contains ErrorComment tag
 boolean hasStatusElement()
          Return true if the message contains Status tag
 boolean hasSucces()
           
 boolean isCanceled()
          Return true if the message indicates a cancel status
 boolean isFailure()
          Return true if the message indicates a failure
 boolean isPending()
          Return true if the message indicates a pending status
 boolean isPendingWithWarning()
          Return true if the message indicates a pending with warning status
 boolean isSuccess()
          Return true if the message indicates a success status
 void setAffectedSOPClassUID(String AffectedSOPClassUID)
           
 void setErrorComment(String errorComment)
           
 void setStatus(int status)
          set value for the status element. if success statu is provided, the ErrorComments value will be removed
 String statusToString()
          return the status a a string
 
Methods inherited from class org.dicom4j.network.dimse.messages.support.DimseMessageWithAffectedSOPClass
hasAffectedSOPClassUID
 
Methods inherited from class org.dicom4j.network.dimse.messages.support.AbstractDimseMessage
getCommandField, getCommandSet, getDataSet, getMessageID, getName, getSopClassRegistry, isCEchoRequest, isCEchoResponse, isCFindRequest, removeDataSet, setCommandField, setDataSet, setSopClassRegistry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimseResponseMessage

public DimseResponseMessage(CommandSet commandSet)
create a new message from a CommandSet

Parameters:
commandSet -

DimseResponseMessage

public DimseResponseMessage(int aMessageID,
                            String aAffectedSOPClassUID)
                     throws DicomException
Throws:
DicomException

DimseResponseMessage

public DimseResponseMessage(int messageID,
                            String aAffectedSOPClassUID,
                            int aHasDataset,
                            int status)
                     throws DicomException
Throws:
DicomException
Method Detail

getAffectedSOPClassUID

public String getAffectedSOPClassUID()
Overrides:
getAffectedSOPClassUID in class DimseMessageWithAffectedSOPClass

getAffectedSOPInstanceUIDElement

public UniqueIdentifier getAffectedSOPInstanceUIDElement()
                                                  throws DicomException
Throws:
DicomException

getErrorComment

public String getErrorComment()

getErrorCommentElement

public LongString getErrorCommentElement()

getStatus

public int getStatus()
Return the status's value as an integer

Returns:
the status(s value

getStatusElement

public UnsignedShort getStatusElement()

hasSucces

public boolean hasSucces()

hasStatusElement

public boolean hasStatusElement()
Return true if the message contains Status tag

Returns:
true if element is present

hasErrorCommentElement

public boolean hasErrorCommentElement()
Return true if the message contains ErrorComment tag

Returns:
true if element is present

isCanceled

public boolean isCanceled()
Return true if the message indicates a cancel status

Returns:
true if success

isFailure

public boolean isFailure()
Return true if the message indicates a failure

Returns:
true if success

isPending

public boolean isPending()
Return true if the message indicates a pending status

Returns:
true if success

isPendingWithWarning

public boolean isPendingWithWarning()
Return true if the message indicates a pending with warning status

Returns:
true if success

isSuccess

public boolean isSuccess()
Return true if the message indicates a success status

Returns:
true if success

setAffectedSOPClassUID

public void setAffectedSOPClassUID(String AffectedSOPClassUID)
                            throws DicomException,
                                   DimseException
Throws:
DicomException
DimseException

setErrorComment

public void setErrorComment(String errorComment)
                     throws DimseException
Throws:
DimseException

setStatus

public void setStatus(int status)
               throws DicomException
set value for the status element. if success statu is provided, the ErrorComments value will be removed

Parameters:
the - value to set
Throws:
DicomException

statusToString

public String statusToString()
return the status a a string

Returns:
the status as string


Copyright © 2009 dicom4j. All Rights Reserved.