org.greenstone.gs3client.data
Class QueryResponseData.TermData
java.lang.Object
org.greenstone.gs3client.data.QueryResponseData.TermData
- Enclosing class:
- QueryResponseData
public static class QueryResponseData.TermData
- extends java.lang.Object
Static inner class Term represents a <term> XML element
(these are nested in a <termList>) - see manual p. 45:
<term name="str" numDocsMatched="int" freq="int" field="int" stem="int"/>
<equivTermList>
<term name="str" numDocsMatched="int" freq="int" />
<term name="str" numDocsMatched="int" freq="int" />
...
</equivTermList>
</term>
Can import this class as import gs3client.QueryResponseData.TermData
and can then use it just as "TermData" (don't need fully qualified name).
Constructor Summary |
QueryResponseData.TermData(org.w3c.dom.Element termTag)
Constructs a Term object to represent the <term> element passed
in here as an argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
public final java.lang.String name
numDocsMatch
public final java.lang.String numDocsMatch
freq
public final java.lang.String freq
field
public final java.lang.String field
stem
public final java.lang.String stem
equivTermList
protected QueryResponseData.TermData[] equivTermList
- The terms nested inside an <equivTermList>
QueryResponseData.TermData
public QueryResponseData.TermData(org.w3c.dom.Element termTag)
- Constructs a Term object to represent the <term> element passed
in here as an argument. Given a <term></term> element, it
sets this object's members.
- Parameters:
termTag
- is a <term></term> element
setEquivTermList
public void setEquivTermList(org.w3c.dom.Element termTag)
- Uses the <equivTermList>...</equivTermList> tag,
which may cotnain more TermData.
- Parameters:
termTag
- is a <term></term> element that may
contain a <equivTermList>...</equivTermList> element
getEquivTermList
public QueryResponseData.TermData[] getEquivTermList()
- Returns:
- any list of <equivTermList>...</equivTermList>
TermData maintained by this TermData object. Null if there are none.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- a String representation of this TermData: the name
and frequency
show
public java.lang.String show()
- Returns:
- a String displaying the member contents of this TermData.
Useful for debugging purposes.