|
||||||||||
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.DeString
Representation of a string as a DataElem.
This class will allow the use of strings as data elements and indexing
them so that queries can take them into account. As this class is concrete,
all abstract methods of DataElem are implemented here.
This class is mainly composed of a String. It is the string that
a DeString object will refer to.
Field Summary | |
protected static java.lang.String |
DELIMITERS
Working constant for use in tokenizing strings |
protected static Stemmer |
stemmer
Working local alias for global stemmer to avoid repeated method calls |
protected static StopWordTable |
stopWordTable
Working local alias for global stop word table to avoid repeated method calls |
protected java.lang.String |
value
The string which this class models |
Constructor Summary | |
DeString(char[] v)
Creates a DeString that refers to the given array of characters considered as a String. |
|
DeString(java.lang.String v)
Creates a DeString that refers to the given String. |
Method Summary | |
void |
addHTML(java.lang.StringBuffer baseString,
int maxNumberOfChar,
boolean form)
Adds the string to the HTML text given. |
int |
compareTo(DataElem o)
Scores the comparison between this and the given DeString |
boolean |
equals(java.lang.Object o)
Does the same comparison as compareTo(), but gives a boolean result. |
boolean |
exactMatch(DataElem de)
Compares this DeString to another. |
java.util.Vector |
getIndexingFeatures(ProxyDocument source,
IndexingModalities im,
DataElem field)
Extracts Indexing Features from DeString. |
java.lang.String |
getValue()
Retrieves the value of the represented String. |
java.lang.String |
getValueAsString()
Returns the value of the represented string |
int |
hashCode()
Computes a hash code for the DE_string based on the hashCode of the represented String. |
void |
HTML_ShowDoc(java.lang.StringBuffer baseString)
Adds the value of the string between H1 tags to the given string. |
float |
match(DataElem de)
Scores the match of this DeString with another Object. |
void |
present()
Prints the represented String with a space before and a comma after. |
void |
presentBrief()
Prints the value of the String. |
void |
setValue(char[] v)
Sets the value of the represented String with the given array of chars. |
void |
setValue(java.lang.String v)
Sets the value of the represented String. |
java.lang.String |
toString()
Same as getValueAsString(). |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String value
protected static final Stemmer stemmer
protected static final java.lang.String DELIMITERS
protected static final StopWordTable stopWordTable
Constructor Detail |
public DeString(java.lang.String v)
public DeString(char[] v)
Method Detail |
public final java.lang.String getValue()
public final void setValue(java.lang.String v)
v
- the new value of the String.public final void setValue(char[] v)
v
- the new value of the String.public final java.lang.String getValueAsString()
public final java.lang.String toString()
public void present()
public void presentBrief()
public boolean exactMatch(DataElem de)
de
- the DeString this is compared with.public float match(DataElem de)
de
- the DeString this is compared with.public int compareTo(DataElem o)
o
- the DeString this is compared to.String.compareTo(java.lang.Object)
public boolean equals(java.lang.Object o)
o
- the DeString this is compared with.public final int hashCode()
public java.util.Vector getIndexingFeatures(ProxyDocument source, IndexingModalities im, DataElem field)
source
- object reference of source document.im
- indexing modalities to be used with this DeString.field
- the document field from which this DE camepublic void addHTML(java.lang.StringBuffer baseString, int maxNumberOfChar, boolean form)
baseString
- the HTML text the value will be appended to.maxNumberOfChar
- maximum number of characters added,
used only if form is false.form
- true if the HTML code must be used in a form,
false otherwise.public void HTML_ShowDoc(java.lang.StringBuffer baseString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |