Package gov.nih.mipav.model.file
Class PrivateFileDicomKey
- java.lang.Object
-
- gov.nih.mipav.model.structures.ModelSerialCloneable
-
- gov.nih.mipav.model.file.FileDicomKey
-
- gov.nih.mipav.model.file.PrivateFileDicomKey
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<FileDicomKey>
public class PrivateFileDicomKey extends FileDicomKey implements java.lang.Comparable<FileDicomKey>
Associates a FileDicomKey with a particular publisher to denote the source of the FileDicomKey. This publisher is often printed in the (x, 0010) tag for any group. When no publisher exists uses publisher NO_PUBLISHER- Author:
- justinsenseney
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NO_PUBLISHER
private java.lang.String
publisher
The publisher for this tag.-
Fields inherited from class gov.nih.mipav.model.file.FileDicomKey
key
-
-
Constructor Summary
Constructors Constructor Description PrivateFileDicomKey(int group, int element)
PrivateFileDicomKey(java.lang.String keyStr)
PrivateFileDicomKey(java.lang.String publisher, int group, int element)
PrivateFileDicomKey(java.lang.String publisher, java.lang.String keyStr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FileDicomKey dicomKey)
FileDicomKey
convertToFileDicomKey()
boolean
equals(java.lang.Object obj)
Objects are equal if both are of type FileDicomKey, and both refer to the same value; if the input type is a String and the String representation of the key matches.java.lang.String
getPublisher()
int
hashCode()
Returns the unique identifier's hash code.void
setPublisher(java.lang.String publisher)
java.lang.String
toString()
Returns the unique identifier.-
Methods inherited from class gov.nih.mipav.model.file.FileDicomKey
finalize, getElement, getElementNumber, getGroup, getGroupNumber, getKey, setKey, verify
-
Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
-
-
-
Field Detail
-
NO_PUBLISHER
public static final java.lang.String NO_PUBLISHER
- See Also:
- Constant Field Values
-
publisher
private java.lang.String publisher
The publisher for this tag.
-
-
Constructor Detail
-
PrivateFileDicomKey
public PrivateFileDicomKey(java.lang.String keyStr)
-
PrivateFileDicomKey
public PrivateFileDicomKey(java.lang.String publisher, java.lang.String keyStr)
-
PrivateFileDicomKey
public PrivateFileDicomKey(int group, int element) throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
PrivateFileDicomKey
public PrivateFileDicomKey(java.lang.String publisher, int group, int element) throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
-
Method Detail
-
getPublisher
public java.lang.String getPublisher()
-
setPublisher
public void setPublisher(java.lang.String publisher)
-
toString
public java.lang.String toString()
Returns the unique identifier.- Overrides:
toString
in classFileDicomKey
- Returns:
- The unique identifier.
-
convertToFileDicomKey
public FileDicomKey convertToFileDicomKey()
-
compareTo
public int compareTo(FileDicomKey dicomKey)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FileDicomKey>
- Overrides:
compareTo
in classFileDicomKey
-
hashCode
public int hashCode()
Description copied from class:FileDicomKey
Returns the unique identifier's hash code.- Overrides:
hashCode
in classFileDicomKey
- Returns:
- The hash code.
-
equals
public boolean equals(java.lang.Object obj)
Objects are equal if both are of type FileDicomKey, and both refer to the same value; if the input type is a String and the String representation of the key matches. This equals method will check that the keys are exactly are equal or they are equal except for place-holding "x" characters.- Overrides:
equals
in classFileDicomKey
- Parameters:
obj
- Object to compare to.- Returns:
true
if equal.
-
-