public class MCpnComponentGroup
extends java.lang.Object
This class provides the functionality to parse and compose a component group of a person name value according to the definition of PN value representation.
See MCpersonName
for more details.
Instances of this class can be used by multiple threads concurrently.
Constructor and Description |
---|
MCpnComponentGroup(java.lang.String groupString)
Initializes a new instance of this class using a formated person name.
|
MCpnComponentGroup(java.lang.String familyName,
java.lang.String givenName,
java.lang.String middleName,
java.lang.String namePrefix,
java.lang.String nameSuffix)
Initializes a new instance of this class using separate values for each component.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getFamilyName()
Gets the family name component of this person name.
|
java.lang.String |
getGivenName()
Gets the given name component of this person name.
|
java.lang.String |
getMiddleName()
Gets the middle name component of this person name.
|
java.lang.String |
getNamePrefix()
Gets the name prefix component of this person name.
|
java.lang.String |
getNameSuffix()
Gets the name suffix component of this person name.
|
java.lang.String |
toString()
Gets the encoded representation of this person name component group.
|
public MCpnComponentGroup(java.lang.String groupString)
The person name must be formated according to the rules defined by the PN value representation for component groups
groupString
- A String
containing the name components, each separated by the
'^' character as specified in the DICOM standard. It may be null
, indicating
an empty component group.MCexception
- if the argument is invalid.public MCpnComponentGroup(java.lang.String familyName, java.lang.String givenName, java.lang.String middleName, java.lang.String namePrefix, java.lang.String nameSuffix)
familyName
- The family name complex.givenName
- The given name complex.middleName
- The middle name.namePrefix
- The name prefix.nameSuffix
- The name suffix.MCexception
- If one of the component contains '=' or '^' characters.public java.lang.String getFamilyName()
String
containing the family name.public java.lang.String getGivenName()
String
containing the given name.public java.lang.String getMiddleName()
String
containing the middle name.public java.lang.String getNamePrefix()
String
containing the name prefix.public java.lang.String getNameSuffix()
String
containing the name suffix.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object