com.primus.searchstudio
Class Result

java.lang.Object
  extended by com.primus.searchstudio.Response
      extended by com.primus.searchstudio.Result
All Implemented Interfaces:
java.io.Serializable

public class Result
extends Response
implements java.io.Serializable

Search result value object.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.primus.searchstudio.Response
answerGroup, bAnswer, bExcerptIsTruncated, contentId, contextId, DOC_TYPE_HTML, DOC_TYPE_IFILTER, DOC_TYPE_MAX, DOC_TYPE_MIN, DOC_TYPE_NONE, DOC_TYPE_PDF, DOC_TYPE_TEXT, DOC_TYPE_UNKNOWN, DOC_TYPE_XHTML, docset, docType, docTypeAsString, elapsedTime, excerpt, excerptOriginal, excerptRaw, excerptTruncated, gotoLink, instantPA, INVALID_ANSWER_SCORE, language, maxExcerptChars, nameMap, properties, queryMode, question, responseId, RESULT_TYPE_BROWSE, RESULT_TYPE_DOCUMENT, RESULT_TYPE_MAX, RESULT_TYPE_MIN, RESULT_TYPE_PREFANSWER, RESULT_TYPE_SENTENCE, RESULT_TYPE_SOLUTION, RESULT_TYPE_STRUCT, resultCount, resultType, score, SERVER_TYPE_AE, SERVER_TYPE_MAX, SERVER_TYPE_MIN, serverType, size, SOLUTION_TYPE_MAX, SOLUTION_TYPE_MIN, SOLUTION_TYPE_ROLE_CAUSE, SOLUTION_TYPE_ROLE_CHANGE, SOLUTION_TYPE_ROLE_FACT, SOLUTION_TYPE_ROLE_FIX, SOLUTION_TYPE_ROLE_GOAL, SOLUTION_TYPE_ROLE_ID, SOLUTION_TYPE_ROLE_SYMPTOM, SOLUTION_TYPE_ROLE_TITLE, solutionId, solutionType, source, SOURCE_ANSWERKB, SOURCE_ESERVER, SOURCE_MAX, SOURCE_MIN, summary, timestamp, title, url, viewable
 
Constructor Summary
Result()
          default ctor
Result(java.lang.String contextId, java.lang.String groupId, int docType, java.lang.String url, int resultType, int resultCount, java.lang.String clusterName, java.lang.String responseId, int answerGroup, java.lang.String gotoLink)
          Constructs a new result object
 
Method Summary
 void addChildResult(Result childResult)
           
static java.util.Comparator byDocByScore()
          Allows sorting of Results instances by document/by score.
static java.util.Comparator byPaTimestamp()
          Allows sorting of Result instances by prefanswer timestamp.
static java.util.Comparator byScore()
          Allows sorting of Result instances by score.
static java.util.Comparator byTimestamp()
          Allows sorting of Result instances by timestamp.
 boolean equals(java.lang.Object obj)
          Standard equals function.
 double FindScoreAsPercent(int score)
          Deprecated.  
 void FindStars(int score)
          Deprecated.  
 java.lang.String getAnswerRange()
          Gets the answerRange property.
 java.util.ArrayList getChildResults()
           
 int getChildResultsCount()
           
 java.lang.String getContentId()
          Gets the contentId property.
 java.lang.String getDebugNodeString()
          Gets the debug String.
 java.lang.String getDebugString()
          Gets the debug String.
 java.lang.String getFaq()
          Gets the faq property.
 java.lang.String getFullTitle()
          Gets the full title.
 java.lang.String getHighlightInfo()
           
 boolean getIsParentResult()
          Deprecated.  
 java.lang.String getIsParentResultAsString()
          Deprecated.  
 boolean getIsTruncated()
          Gets the trancated variable.
 java.lang.String getNormalizedResponse()
          Gets the normalized response String.
 int getParentResult()
           
 long getPaTimestamp()
          Gets the PrefAnswer modified timestamp property.
 java.lang.String getPaTimestampString()
          Gets the prefanswer modify timestamp as a String.
 int getPopularity()
           
 java.lang.String getRankCalc()
           
 java.lang.String getReferenceId()
           
 java.lang.String getRelevancyFile()
          Deprecated.  
 com.primus.frameworks.UniqueID getResponseId()
          Gets the responseId property.
 double getScoreAsPercent()
          Deprecated.  
 java.lang.String getStars()
          Deprecated.  
 java.lang.String getSummary()
          Gets the sumamry.
 long getTimestamp()
          Gets the document modified timestamp property.
 java.lang.String getTitle()
          Gets the title property.
 java.lang.String getUrl()
          Gets the url property.
 java.util.ArrayList getVecDocumentSets()
           
 int getVicDocType()
          Gets the doc type of this result for use in a View in Context command.
 java.lang.String getVicDocTypeAsString()
          Gets the string representation of the doc type of this result for use in a View in Context command.
 int hashCode()
          Standard hash code method.
 boolean isParentResult()
           
 void setChildResults(java.util.ArrayList childResults)
           
 void setDebugNodeString(java.lang.String ds)
          Sets the debug String.
 void setIsParentResult(boolean isParentResult)
           
 void setIsTruncated(boolean isTruncated)
          Sets the trancated variable.
 void setNormalizedResponse(java.lang.String norm)
          Sets the normalized response String.
 void setParentResult(int parentResult)
           
 void setPopularity(int p)
           
 void setRankCalc(java.lang.String rankCalc)
           
 void setVecDocumentSets(java.util.ArrayList vecDocSets)
           
 java.lang.String toString()
          Standard toString method.
 java.lang.String toSummaryString()
          Standard toString method, but returns summaries of long text fields.
 
Methods inherited from class com.primus.searchstudio.Response
computeExcerpt, getAnswerGroup, getAnswerOffset, getClusterName, getContextId, getDocset, getDocType, getDocTypeAsString, getDocTypeAsString, getElapsedTime, getExcerpt, getExcerptIsTruncated, getExcerptRaw, getExcerptTruncated, getGotoLink, getGroupId, getHDoc, getIsInstantPA, getLanguage, getPhysicalPartitionId, getProperties, getQueryMode, getQuestion, getResponseSummary, getResultCount, getResultType, getResultTypeAsString, getScore, getServerType, getServerTypeAsString, getSize, getSizeAsKB, getSolutionId, getSolutionIdViewedAnswer, getSolutionType, getSource, getSourceAsString, getTimestampString, getVicQueryMap, getVicQueryMapLinkToSource, isbAnswer, isExcerptTruncated, isSolution, isViewable, setAnswerGroup, setContentId, setDocset, setElapsedTime, setExcerpt, setGotoLink, setLanguage, setMaxExcerptChars, setPhysicalPartitionId, setProperties, setQueryMode, setQuestion, setResultCount, setResultType, setScore, setSolutionId, setSolutionType, setSource, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Result

public Result()
default ctor


Result

public Result(java.lang.String contextId,
              java.lang.String groupId,
              int docType,
              java.lang.String url,
              int resultType,
              int resultCount,
              java.lang.String clusterName,
              java.lang.String responseId,
              int answerGroup,
              java.lang.String gotoLink)
Constructs a new result object

Parameters:
contextId - context ID
groupId - groupid of group the asnwer came from
docType - type of document
url - url of page
resultType - type of result
resultCount - result count
clusterName - name of cluster
responseId - response ID
answerGroup - answer group
gotoLink - go to link
Method Detail

getContentId

public java.lang.String getContentId()
Gets the contentId property.

Overrides:
getContentId in class Response
Returns:
contentId

getTimestamp

public long getTimestamp()
Gets the document modified timestamp property.

Overrides:
getTimestamp in class Response
Returns:
document modified timestamp

getPaTimestamp

public long getPaTimestamp()
Gets the PrefAnswer modified timestamp property.

Returns:
PrefAnswer modified timestamp

getAnswerRange

public java.lang.String getAnswerRange()
Gets the answerRange property.

Returns:
answer range

getVicDocTypeAsString

public java.lang.String getVicDocTypeAsString()
Gets the string representation of the doc type of this result for use in a View in Context command. All types are HTML unless they are PDF.

Returns:
document type

getVicDocType

public int getVicDocType()
Gets the doc type of this result for use in a View in Context command. All types are HTML unless they are PDF.

Returns:
document type

getUrl

public java.lang.String getUrl()
Gets the url property.

Overrides:
getUrl in class Response
Returns:
current url

getSummary

public java.lang.String getSummary()
Gets the sumamry.

Returns:
summary

getTitle

public java.lang.String getTitle()
Gets the title property.

Overrides:
getTitle in class Response
Returns:
current title

getFullTitle

public java.lang.String getFullTitle()
Gets the full title.

Returns:
full title

getIsTruncated

public boolean getIsTruncated()
Gets the trancated variable.

Returns:
current trancated variable

setIsTruncated

public void setIsTruncated(boolean isTruncated)
Sets the trancated variable.


getFaq

public java.lang.String getFaq()
Gets the faq property.

Returns:
current faq

getResponseId

public com.primus.frameworks.UniqueID getResponseId()
Gets the responseId property.

Overrides:
getResponseId in class Response
Returns:
response Id

getDebugString

public java.lang.String getDebugString()
Gets the debug String.

Returns:
debug string

getDebugNodeString

public java.lang.String getDebugNodeString()
Gets the debug String.

Returns:
debug string

getNormalizedResponse

public java.lang.String getNormalizedResponse()
Gets the normalized response String.

Returns:
normString string

setNormalizedResponse

public void setNormalizedResponse(java.lang.String norm)
Sets the normalized response String.


setDebugNodeString

public void setDebugNodeString(java.lang.String ds)
Sets the debug String.


getPaTimestampString

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

Overrides:
getPaTimestampString in class Response
Returns:
timestamp string

toString

public java.lang.String toString()
Standard toString method.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this value object

toSummaryString

public java.lang.String toSummaryString()
Standard toString method, but returns summaries of long text fields. This makes debugging easier.

Returns:
string summary representation of this value object

hashCode

public int hashCode()
Standard hash code method.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code for this instance

equals

public boolean equals(java.lang.Object obj)
Standard equals function.

Overrides:
equals in class java.lang.Object

byScore

public static java.util.Comparator byScore()
Allows sorting of Result instances by score. This is just a utility function--the results collater/merger facilities are much more capable.


byTimestamp

public static java.util.Comparator byTimestamp()
Allows sorting of Result instances by timestamp. This is just a utility function--the results collater/merger facilities are much more capable.


byPaTimestamp

public static java.util.Comparator byPaTimestamp()
Allows sorting of Result instances by prefanswer timestamp. This is just a utility function--the results collater/merger facilities are much more capable.


byDocByScore

public static java.util.Comparator byDocByScore()
Allows sorting of Results instances by document/by score. This just a utility function--the results collater/merger facilities are much more capable.


getRelevancyFile

public java.lang.String getRelevancyFile()
Deprecated. 

Returns:

FindStars

public void FindStars(int score)
Deprecated. 

Parameters:
score -

getStars

public java.lang.String getStars()
Deprecated. 

Returns:

getScoreAsPercent

public double getScoreAsPercent()
Deprecated. 

Returns:

FindScoreAsPercent

public double FindScoreAsPercent(int score)
Deprecated. 

Parameters:
score -
Returns:

getHighlightInfo

public java.lang.String getHighlightInfo()

getPopularity

public int getPopularity()

setPopularity

public void setPopularity(int p)

setIsParentResult

public void setIsParentResult(boolean isParentResult)

getIsParentResult

public boolean getIsParentResult()
Deprecated. 

Returns:

isParentResult

public boolean isParentResult()

getIsParentResultAsString

public java.lang.String getIsParentResultAsString()
Deprecated. 

Returns:

setChildResults

public void setChildResults(java.util.ArrayList childResults)

addChildResult

public void addChildResult(Result childResult)

getChildResults

public java.util.ArrayList getChildResults()

getChildResultsCount

public int getChildResultsCount()

setParentResult

public void setParentResult(int parentResult)

getParentResult

public int getParentResult()

getReferenceId

public java.lang.String getReferenceId()

getVecDocumentSets

public java.util.ArrayList getVecDocumentSets()

setVecDocumentSets

public void setVecDocumentSets(java.util.ArrayList vecDocSets)

getRankCalc

public java.lang.String getRankCalc()
Returns:
Result of ranking configuration calculation

setRankCalc

public void setRankCalc(java.lang.String rankCalc)
Parameters:
rankCalc - Result of ranking configuration calculation