org.greenstone.gs3client.data
Class QueryResponseData.TermData

java.lang.Object
  extended by 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).


Field Summary
protected  QueryResponseData.TermData[] equivTermList
          The terms nested inside an <equivTermList>
 java.lang.String field
           
 java.lang.String freq
           
 java.lang.String name
           
 java.lang.String numDocsMatch
           
 java.lang.String stem
           
 
Constructor Summary
QueryResponseData.TermData(org.w3c.dom.Element termTag)
          Constructs a Term object to represent the <term> element passed in here as an argument.
 
Method Summary
 QueryResponseData.TermData[] getEquivTermList()
           
 void setEquivTermList(org.w3c.dom.Element termTag)
          Uses the <equivTermList>...</equivTermList> tag, which may cotnain more TermData.
 java.lang.String show()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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>

Constructor Detail

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
Method Detail

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.