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.StringNO_PUBLISHERprivate java.lang.StringpublisherThe 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 intcompareTo(FileDicomKey dicomKey)FileDicomKeyconvertToFileDicomKey()booleanequals(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.StringgetPublisher()inthashCode()Returns the unique identifier's hash code.voidsetPublisher(java.lang.String publisher)java.lang.StringtoString()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:
toStringin classFileDicomKey- Returns:
- The unique identifier.
-
convertToFileDicomKey
public FileDicomKey convertToFileDicomKey()
-
compareTo
public int compareTo(FileDicomKey dicomKey)
- Specified by:
compareToin interfacejava.lang.Comparable<FileDicomKey>- Overrides:
compareToin classFileDicomKey
-
hashCode
public int hashCode()
Description copied from class:FileDicomKeyReturns the unique identifier's hash code.- Overrides:
hashCodein 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:
equalsin classFileDicomKey- Parameters:
obj- Object to compare to.- Returns:
trueif equal.
-
-