|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.greenstone.gs3client.data.ResponseData org.greenstone.gs3client.data.QueryResponseData
public class QueryResponseData
Represents the data fields that may be present in a response to a Query-process request. Specifically, this class keeps track of all the DocumentNodes returned in response to a query request. It inherits Map nodeIDsToNodes of (nodeID, NodeData ref) pairs which maintains the NodeData object refs in order of their insertion into the Map (LinkedHashMap). !!! QueryResponseData will only store DocumentNodeData object refs in the nodeIDsToNodes Map. An object of this class can be reused after instatiation by calling setResponseData() with a new query response XML message. This will first call clear() to clear/release its references to all the old data.
Nested Class Summary | |
---|---|
static class |
QueryResponseData.TermData
Static inner class Term represents a <term> XML element (these are nested in a <termList>) - see manual p. |
Field Summary | |
---|---|
protected java.util.HashMap |
metadataList
Metadata of the query's response - not a documentNode's metadata! |
protected java.lang.String |
numDocsMatched
|
protected java.lang.String |
numDocsReturned
|
protected java.lang.String |
queryField
|
protected QueryResponseData.TermData[] |
termList
|
Fields inherited from class org.greenstone.gs3client.data.ResponseData |
---|
nodeIDsToNodes |
Constructor Summary | |
---|---|
QueryResponseData()
Default constructor |
Method Summary | |
---|---|
void |
clear()
Resets the internal data members of this QueryResponseData object of their values so that this QueryResponseData can be reused for the next Query response message. |
DocumentNodeData |
getDocNodeForID(java.lang.String ID)
Given an nodeID, returns the DocumentNodeData object with that nodeID if any. |
java.lang.String[] |
getDocumentNodeIDs()
|
DocumentNodeData[] |
getDocumentNodeList()
|
java.lang.String |
getMetaValueForName(java.lang.String name)
|
java.lang.String |
getNumDocsMatched()
|
java.lang.String |
getNumDocsReturned()
|
java.lang.String |
getQueryField()
|
QueryResponseData.TermData[] |
getTermList()
|
void |
setResponseData(org.w3c.dom.Element responseMessageTag)
Given the response to a query message (XML with root <message> or <response> tag), a QueryResponseData object is created to store all the document Identifiers and document data returned as well as information about the terms that were searched on. |
java.util.Vector |
setStructureForDocs(org.w3c.dom.Element messageTag)
This method can be called after a DocumentStructureRetrieve request (for the entire structure of all/many of its documents) has returned a response. |
java.lang.String |
toString()
|
Methods inherited from class org.greenstone.gs3client.data.ResponseData |
---|
getIDToNodeMapping, getNodeForID, setContentForDocs, setMetadataForDocuments, setMetadataForNodes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String numDocsMatched
protected java.lang.String numDocsReturned
protected java.lang.String queryField
protected QueryResponseData.TermData[] termList
protected java.util.HashMap metadataList
Constructor Detail |
---|
public QueryResponseData()
Method Detail |
---|
public void clear()
clear
in class ResponseData
public void setResponseData(org.w3c.dom.Element responseMessageTag)
setResponseData
in class ResponseData
responseMessageTag
- is the XML DOM Element representing a query
response XML message.public java.lang.String getNumDocsMatched()
public java.lang.String getNumDocsReturned()
public java.lang.String getQueryField()
public QueryResponseData.TermData[] getTermList()
public DocumentNodeData getDocNodeForID(java.lang.String ID)
ID
- is the nodeID of the DocumentNodeData to be returned.
public DocumentNodeData[] getDocumentNodeList()
public java.lang.String[] getDocumentNodeIDs()
public java.lang.String getMetaValueForName(java.lang.String name)
public java.util.Vector setStructureForDocs(org.w3c.dom.Element messageTag)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |