|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.InfoObj | +--gov.nist.nlpir.irf.de.DePersonName
Instances of this class represent a person name. As with all other DataElems, comparison, exact matching and presentation features are provided.
Field Summary | |
private java.lang.String |
firstName
First name of the person name represented |
(package private) static long |
serialVersionUID
serial version universal id - put here so Java does not insert one which may change due to revisions and make it impossible to deserialize earlier versions of serialized objects |
private java.lang.String |
surname
Last name of the person name represented |
Constructor Summary | |
DePersonName(char[] sur)
Builds a DePersonName considering the only array of characters given as the String representing the person's surname. |
|
DePersonName(char[] first,
char[] sur)
Treats the two arrays of characters as Strings and creates the DePersonName associated. |
|
DePersonName(java.lang.String sur)
Builds a DePersonName assuming the only string given is the person's surname. |
|
DePersonName(java.lang.String first,
java.lang.String sur)
Assigns first and last name. |
Method Summary | |
void |
addHTML(java.lang.StringBuffer baseString,
int maxNrOfChar,
boolean form)
Adds the name and surname to the HTML text given. |
int |
compareTo(DataElem o)
Scores the comparison between this and the given DePersonName |
boolean |
equals(java.lang.Object o)
Does the same comparison as compareTo(), but gives a boolean result. |
boolean |
exactMatch(DataElem de)
Compares this DePersonName to another. |
java.lang.String |
getFirstName()
Retrieves the first name as a string. |
java.util.Vector |
getIndexingFeatures(ProxyDocument source,
IndexingModalities im,
DataElem field)
Extract indexing features from this person name |
java.lang.String |
getSurname()
Retrieves the surname as a string. |
java.lang.String |
getValueAsString()
Gives the same result as toString(). |
int |
hashCode()
Overrides Object.hashCode(), based on the hashCoding of the surname. |
void |
HTML_ShowDoc(java.lang.StringBuffer baseString)
Adds the name and surname of the person to the HTML string given (in this order). |
float |
match(DataElem de)
Scores the match of this DePersonName with another Object. |
void |
present()
Prints a presentation of the DePersonName like this: Name: myname FirstName: myfirstName |
void |
presentBrief()
Here, the presentation is briefer than with present(): myfirstName myname, |
void |
setValue(java.lang.String first,
java.lang.String sur)
Sets the two main variables of the DePersonName. |
java.lang.String |
toString()
Returns a string representation of the person name. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private java.lang.String firstName
private java.lang.String surname
Constructor Detail |
public DePersonName(java.lang.String sur)
sur
- the surname of the person.public DePersonName(char[] sur)
sur
- considered as a string, will be the last name of the person.public DePersonName(java.lang.String first, java.lang.String sur)
first
- person's first name.sur
- person's surname.public DePersonName(char[] first, char[] sur)
Method Detail |
public final java.lang.String getFirstName()
public final java.lang.String getSurname()
public final void setValue(java.lang.String first, java.lang.String sur)
public void present()
Name: myname FirstName: myfirstName
public void presentBrief()
myfirstName myname,
public boolean exactMatch(DataElem de)
de
- the DePersonName this is compared with.public float match(DataElem de)
de
- the DePersonName this is compared with.public int hashCode()
Hashtable
,
Object
public int compareTo(DataElem o)
o
- the DePersonName this is compared to.String.compareTo(java.lang.Object)
public boolean equals(java.lang.Object o)
o
- the DePersonName this is compared with.public java.util.Vector getIndexingFeatures(ProxyDocument source, IndexingModalities im, DataElem field)
source
- source document of data element .im
- indexing modalities of index in which data element will be
stored.field
- the document field from which this DE camepublic final java.lang.String getValueAsString()
public final java.lang.String toString()
surname, firstname
public void addHTML(java.lang.StringBuffer baseString, int maxNrOfChar, boolean form)
baseString
- the HTML text the value will be appended to.maxNrOfChar
- maximum number of characters added, used only
if form is false.form
- true if the HTML code must be used in a form.public void HTML_ShowDoc(java.lang.StringBuffer baseString)
baseString
- the String the two names will be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |