com.primus.searchstudio
Class Response

java.lang.Object
  extended by com.primus.searchstudio.Response
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CategoryDocument, Result

public abstract class Response
extends java.lang.Object
implements java.io.Serializable

Created by IntelliJ IDEA. User: mevans Date: Sep 22, 2003 Time: 5:39:01 PM To change this template use Options | File Templates.

See Also:
Serialized Form

Field Summary
protected  int answerGroup
           
protected  boolean bAnswer
           
protected  boolean bExcerptIsTruncated
           
protected  java.lang.String contentId
           
protected  java.lang.String contextId
           
static int DOC_TYPE_HTML
           
static int DOC_TYPE_IFILTER
           
static int DOC_TYPE_MAX
           
static int DOC_TYPE_MIN
           
static int DOC_TYPE_NONE
           
static int DOC_TYPE_PDF
           
static int DOC_TYPE_TEXT
           
static int DOC_TYPE_UNKNOWN
           
static int DOC_TYPE_XHTML
           
protected  java.lang.String docset
           
protected  int docType
           
protected  java.lang.String docTypeAsString
           
protected  int elapsedTime
           
protected  java.lang.String excerpt
           
protected  java.lang.String excerptOriginal
           
protected  java.lang.String excerptRaw
           
protected  java.lang.String excerptTruncated
           
protected  java.lang.String gotoLink
           
protected  boolean instantPA
           
static int INVALID_ANSWER_SCORE
          Identifies the invalid answer's score for CategoryPrefAnswer, CategoryDocument and etc.
protected  java.lang.String language
           
protected  int maxExcerptChars
           
protected static java.util.HashMap nameMap
           
protected  java.util.HashMap properties
          Be very careful accessing this directly in your impl.
protected  java.lang.String queryMode
           
protected  java.lang.String question
           
protected  com.primus.frameworks.UniqueID responseId
           
static int RESULT_TYPE_BROWSE
           
static int RESULT_TYPE_DOCUMENT
           
static int RESULT_TYPE_MAX
           
static int RESULT_TYPE_MIN
           
static int RESULT_TYPE_PREFANSWER
           
static int RESULT_TYPE_SENTENCE
           
static int RESULT_TYPE_SOLUTION
           
static int RESULT_TYPE_STRUCT
           
protected  int resultCount
           
protected  int resultType
           
protected  int score
           
static int SERVER_TYPE_AE
           
static int SERVER_TYPE_MAX
           
static int SERVER_TYPE_MIN
           
protected  int serverType
           
protected  java.lang.String size
           
static int SOLUTION_TYPE_MAX
           
static int SOLUTION_TYPE_MIN
           
static int SOLUTION_TYPE_ROLE_CAUSE
           
static int SOLUTION_TYPE_ROLE_CHANGE
           
static int SOLUTION_TYPE_ROLE_FACT
           
static int SOLUTION_TYPE_ROLE_FIX
           
static int SOLUTION_TYPE_ROLE_GOAL
           
static int SOLUTION_TYPE_ROLE_ID
           
static int SOLUTION_TYPE_ROLE_SYMPTOM
           
static int SOLUTION_TYPE_ROLE_TITLE
           
protected  java.lang.String solutionId
           
protected  int solutionType
           
protected  int source
           
static int SOURCE_ANSWERKB
           
static int SOURCE_ESERVER
           
static int SOURCE_MAX
           
static int SOURCE_MIN
           
protected  java.lang.String summary
           
protected  long timestamp
           
protected  java.lang.String title
           
protected  java.lang.String url
           
protected  boolean viewable
           
 
Constructor Summary
Response()
           
 
Method Summary
protected  void computeExcerpt()
          Sets the excerpt property and also uses maxAnswerChars to compute the excerptTruncated, minding AELINK sentinels
 int getAnswerGroup()
           
 int getAnswerOffset()
          Gets the answerOffset property.
 java.lang.String getClusterName()
          Deprecated.  
 java.lang.String getContentId()
           
 java.lang.String getContextId()
           
 java.lang.String getDocset()
           
 int getDocType()
           
 java.lang.String getDocTypeAsString()
          Gets the string representation of the doc type of this result.
static java.lang.String getDocTypeAsString(int docType)
          Gets the string representation of the doc type.
 int getElapsedTime()
           
 java.lang.String getExcerpt()
          Gets the excerpt property.
 java.lang.String getExcerptIsTruncated()
          Deprecated.  
 java.lang.String getExcerptRaw()
          Gets the excerpt property.
 java.lang.String getExcerptTruncated()
          Gets the truncated excerpt property.
 java.lang.String getGotoLink()
           
 java.lang.String getGroupId()
          Deprecated.  
 int getHDoc()
          Gets the hDoc property.
 boolean getIsInstantPA()
          Deprecated.  
 java.lang.String getLanguage()
           
 java.lang.String getPaTimestampString()
          Gets the prefanswer modify timestamp as a String.
 java.lang.String getPhysicalPartitionId()
           
 java.util.HashMap getProperties()
           
 java.lang.String getQueryMode()
           
 java.lang.String getQuestion()
          Deprecated.  
 com.primus.frameworks.UniqueID getResponseId()
           
 com.primus.searchstudio.ResponseSummary getResponseSummary(ConstantQueryID queryId)
          Generates a response summary suitable for use in VIC calls.
 int getResultCount()
           
 int getResultType()
          Gets the result type of this result.
 java.lang.String getResultTypeAsString()
          Gets the string representation of the result type of this result.
 int getScore()
          Gets the score property.
 int getServerType()
          Gets the server type of this response.
 java.lang.String getServerTypeAsString()
          Gets the string representation of the server type of this response.
 java.lang.String getSize()
           
 java.lang.String getSizeAsKB()
          Deprecated.  
 java.lang.String getSolutionId()
           
 java.lang.String getSolutionIdViewedAnswer()
           
 int getSolutionType()
          Get and set the solution type
 int getSource()
          Get and Set the answer source (AnswerKB, Solutions, Lotus Notes, etc.)
 java.lang.String getSourceAsString()
           
 long getTimestamp()
           
 java.lang.String getTimestampString()
          Gets the timestamp as a String.
 java.lang.String getTitle()
           
 java.lang.String getUrl()
           
 java.util.HashMap getVicQueryMap()
          Deprecated.  
 java.util.HashMap getVicQueryMapLinkToSource()
          Deprecated.  
 boolean isbAnswer()
           
 boolean isExcerptTruncated()
           
 boolean isSolution()
           
 boolean isViewable()
           
 void setAnswerGroup(int group)
           
 void setContentId(java.lang.String contentId)
           
 void setDocset(java.lang.String docset)
           
 void setElapsedTime(int elapsedTime)
           
 void setExcerpt(java.lang.String s)
           
 void setGotoLink(java.lang.String gotoLink)
           
 void setLanguage(java.lang.String language)
           
 void setMaxExcerptChars(int mec)
           
 void setPhysicalPartitionId(java.lang.String physicalPartitionId)
           
 void setProperties(java.util.HashMap properties)
           
 void setQueryMode(java.lang.String queryMode)
           
 void setQuestion(java.lang.String question)
          Deprecated.  
 void setResultCount(int count)
           
 void setResultType(int resultType)
           
 void setScore(int score)
           
 void setSolutionId(java.lang.String solutionId)
           
 void setSolutionType(int solutionType)
           
 void setSource(int source)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOC_TYPE_MIN

public static final int DOC_TYPE_MIN
See Also:
Constant Field Values

DOC_TYPE_HTML

public static final int DOC_TYPE_HTML
See Also:
Constant Field Values

DOC_TYPE_TEXT

public static final int DOC_TYPE_TEXT
See Also:
Constant Field Values

DOC_TYPE_PDF

public static final int DOC_TYPE_PDF
See Also:
Constant Field Values

DOC_TYPE_IFILTER

public static final int DOC_TYPE_IFILTER
See Also:
Constant Field Values

DOC_TYPE_NONE

public static final int DOC_TYPE_NONE
See Also:
Constant Field Values

DOC_TYPE_UNKNOWN

public static final int DOC_TYPE_UNKNOWN
See Also:
Constant Field Values

DOC_TYPE_XHTML

public static final int DOC_TYPE_XHTML
See Also:
Constant Field Values

DOC_TYPE_MAX

public static final int DOC_TYPE_MAX
See Also:
Constant Field Values

SERVER_TYPE_MIN

public static final int SERVER_TYPE_MIN
See Also:
Constant Field Values

SERVER_TYPE_AE

public static final int SERVER_TYPE_AE
See Also:
Constant Field Values

SERVER_TYPE_MAX

public static final int SERVER_TYPE_MAX
See Also:
Constant Field Values

RESULT_TYPE_MIN

public static final int RESULT_TYPE_MIN
See Also:
Constant Field Values

RESULT_TYPE_SENTENCE

public static final int RESULT_TYPE_SENTENCE
See Also:
Constant Field Values

RESULT_TYPE_PREFANSWER

public static final int RESULT_TYPE_PREFANSWER
See Also:
Constant Field Values

RESULT_TYPE_SOLUTION

public static final int RESULT_TYPE_SOLUTION
See Also:
Constant Field Values

RESULT_TYPE_BROWSE

public static final int RESULT_TYPE_BROWSE
See Also:
Constant Field Values

RESULT_TYPE_DOCUMENT

public static final int RESULT_TYPE_DOCUMENT
See Also:
Constant Field Values

RESULT_TYPE_STRUCT

public static final int RESULT_TYPE_STRUCT
See Also:
Constant Field Values

RESULT_TYPE_MAX

public static final int RESULT_TYPE_MAX
See Also:
Constant Field Values

SOLUTION_TYPE_MIN

public static final int SOLUTION_TYPE_MIN
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_GOAL

public static final int SOLUTION_TYPE_ROLE_GOAL
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_FACT

public static final int SOLUTION_TYPE_ROLE_FACT
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_SYMPTOM

public static final int SOLUTION_TYPE_ROLE_SYMPTOM
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_CHANGE

public static final int SOLUTION_TYPE_ROLE_CHANGE
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_CAUSE

public static final int SOLUTION_TYPE_ROLE_CAUSE
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_FIX

public static final int SOLUTION_TYPE_ROLE_FIX
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_TITLE

public static final int SOLUTION_TYPE_ROLE_TITLE
See Also:
Constant Field Values

SOLUTION_TYPE_ROLE_ID

public static final int SOLUTION_TYPE_ROLE_ID
See Also:
Constant Field Values

SOLUTION_TYPE_MAX

public static final int SOLUTION_TYPE_MAX
See Also:
Constant Field Values

SOURCE_MIN

public static final int SOURCE_MIN
See Also:
Constant Field Values

SOURCE_ANSWERKB

public static final int SOURCE_ANSWERKB
See Also:
Constant Field Values

SOURCE_ESERVER

public static final int SOURCE_ESERVER
See Also:
Constant Field Values

SOURCE_MAX

public static final int SOURCE_MAX
See Also:
Constant Field Values

INVALID_ANSWER_SCORE

public static final int INVALID_ANSWER_SCORE
Identifies the invalid answer's score for CategoryPrefAnswer, CategoryDocument and etc. types of query results.

See Also:
Constant Field Values

instantPA

protected boolean instantPA

contextId

protected java.lang.String contextId

contentId

protected java.lang.String contentId

solutionId

protected java.lang.String solutionId

docType

protected int docType

url

protected java.lang.String url

title

protected java.lang.String title

summary

protected java.lang.String summary

timestamp

protected long timestamp

resultCount

protected int resultCount

docset

protected java.lang.String docset

responseId

protected com.primus.frameworks.UniqueID responseId

docTypeAsString

protected java.lang.String docTypeAsString

size

protected java.lang.String size

gotoLink

protected java.lang.String gotoLink

bAnswer

protected boolean bAnswer

excerptRaw

protected java.lang.String excerptRaw

excerpt

protected java.lang.String excerpt

excerptTruncated

protected java.lang.String excerptTruncated

excerptOriginal

protected java.lang.String excerptOriginal

maxExcerptChars

protected int maxExcerptChars

bExcerptIsTruncated

protected boolean bExcerptIsTruncated

question

protected java.lang.String question

queryMode

protected java.lang.String queryMode

viewable

protected boolean viewable

answerGroup

protected int answerGroup

serverType

protected int serverType

score

protected int score

properties

protected java.util.HashMap properties
Be very careful accessing this directly in your impl. It might contain strings, it might contain lists. Generally you want strings, so call getStringProperty and it will make sure you get back a string.


source

protected int source

solutionType

protected int solutionType

elapsedTime

protected int elapsedTime

resultType

protected int resultType

language

protected java.lang.String language

nameMap

protected static final java.util.HashMap nameMap
Constructor Detail

Response

public Response()
Method Detail

getDocTypeAsString

public java.lang.String getDocTypeAsString()
Gets the string representation of the doc type of this result.

Returns:
document type

getDocTypeAsString

public static java.lang.String getDocTypeAsString(int docType)
Gets the string representation of the doc type.

Parameters:
docType - of a document
Returns:
document type

getVicQueryMap

public java.util.HashMap getVicQueryMap()
Deprecated. 

Returns:

getResponseSummary

public final com.primus.searchstudio.ResponseSummary getResponseSummary(ConstantQueryID queryId)
Generates a response summary suitable for use in VIC calls. The caller must provide the queryId of the associated query.

Parameters:
queryId - ID of the original query
Returns:
response summary

getVicQueryMapLinkToSource

public java.util.HashMap getVicQueryMapLinkToSource()
Deprecated. 

Returns:
an empty map

getContextId

public java.lang.String getContextId()

getGroupId

public java.lang.String getGroupId()
Deprecated. 

Returns:

getContentId

public java.lang.String getContentId()

setContentId

public void setContentId(java.lang.String contentId)

getSolutionId

public java.lang.String getSolutionId()

getSolutionIdViewedAnswer

public java.lang.String getSolutionIdViewedAnswer()

setSolutionId

public void setSolutionId(java.lang.String solutionId)

getDocType

public int getDocType()

isSolution

public boolean isSolution()

getResultType

public int getResultType()
Gets the result type of this result.

Returns:
result type

setResultType

public void setResultType(int resultType)

getResultTypeAsString

public java.lang.String getResultTypeAsString()
Gets the string representation of the result type of this result.

Returns:
result type

getUrl

public java.lang.String getUrl()

getResultCount

public int getResultCount()

setResultCount

public void setResultCount(int count)

getDocset

public java.lang.String getDocset()

setDocset

public void setDocset(java.lang.String docset)

getResponseId

public com.primus.frameworks.UniqueID getResponseId()

getClusterName

public java.lang.String getClusterName()
Deprecated. 

Returns:

getTitle

public java.lang.String getTitle()

getTimestamp

public long getTimestamp()

getServerType

public int getServerType()
Gets the server type of this response.

Returns:
server type

getServerTypeAsString

public java.lang.String getServerTypeAsString()
Gets the string representation of the server type of this response.

Returns:
server type

getScore

public int getScore()
Gets the score property.

Returns:
current score

setScore

public void setScore(int score)

getIsInstantPA

public boolean getIsInstantPA()
Deprecated. 

Returns true if this is an Instant Preferred Answer.

Returns:
true if is an Instant Preferred Answer

getPaTimestampString

public java.lang.String getPaTimestampString()
Gets the prefanswer modify timestamp as a String.

Returns:
timestamp string

getTimestampString

public java.lang.String getTimestampString()
Gets the timestamp as a String.

Returns:
timestamp string

getSize

public java.lang.String getSize()

getSizeAsKB

public java.lang.String getSizeAsKB()
Deprecated. 

Returns:

getGotoLink

public java.lang.String getGotoLink()

setGotoLink

public void setGotoLink(java.lang.String gotoLink)

isbAnswer

public boolean isbAnswer()

computeExcerpt

protected void computeExcerpt()
Sets the excerpt property and also uses maxAnswerChars to compute the excerptTruncated, minding AELINK sentinels


getExcerptRaw

public java.lang.String getExcerptRaw()
Gets the excerpt property.

Returns:
current excerpt

getExcerpt

public java.lang.String getExcerpt()
Gets the excerpt property.

Returns:
current excerpt

getExcerptTruncated

public java.lang.String getExcerptTruncated()
Gets the truncated excerpt property.

Returns:
current truncated excerpt

setMaxExcerptChars

public void setMaxExcerptChars(int mec)

getExcerptIsTruncated

public java.lang.String getExcerptIsTruncated()
Deprecated. 

Returns:

isExcerptTruncated

public boolean isExcerptTruncated()
Returns:

getProperties

public java.util.HashMap getProperties()

setProperties

public void setProperties(java.util.HashMap properties)

getSource

public int getSource()
Get and Set the answer source (AnswerKB, Solutions, Lotus Notes, etc.)

Returns:

setSource

public void setSource(int source)

getSolutionType

public int getSolutionType()
Get and set the solution type

Returns:

setSolutionType

public void setSolutionType(int solutionType)

getSourceAsString

public java.lang.String getSourceAsString()

getElapsedTime

public int getElapsedTime()

setElapsedTime

public void setElapsedTime(int elapsedTime)

getHDoc

public int getHDoc()
Gets the hDoc property.

Returns:
hdoc property

getAnswerOffset

public int getAnswerOffset()
Gets the answerOffset property.

Returns:
answer offset

getQuestion

public java.lang.String getQuestion()
Deprecated. 

Returns:
nomalized user question

setQuestion

public void setQuestion(java.lang.String question)
Deprecated. 

Parameters:
question - normalized user quesiton

setExcerpt

public void setExcerpt(java.lang.String s)

getQueryMode

public java.lang.String getQueryMode()

setQueryMode

public void setQueryMode(java.lang.String queryMode)

isViewable

public boolean isViewable()

getAnswerGroup

public int getAnswerGroup()

setAnswerGroup

public void setAnswerGroup(int group)

setTitle

public void setTitle(java.lang.String title)

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String language)

setPhysicalPartitionId

public void setPhysicalPartitionId(java.lang.String physicalPartitionId)

getPhysicalPartitionId

public java.lang.String getPhysicalPartitionId()