com.iphrase.runtime.query.result
Class ResultSet

java.lang.Object
  |
  +--com.iphrase.runtime.query.result.ResultSet

public class ResultSet
extends java.lang.Object

Represent a single result set. The OneStep server may return any number of top-level result sets, from one or more sources (domains).

See Also:
QueryResult

Method Summary
 FeatureMetaData[] getAddColumnOptions()
          Get the additional column (aka add-column) options for this result set.
 FeatureRow getDirectNavRow()
          Get the direct navigation FeatureRow for this result set, if getQueryType() returns iphrase:direct navigation.
 java.lang.String getDirectNavUri()
          Get the direct navigation URI for this result set, if getQueryType() returns iphrase:direct navigation.
 TallyFeature[] getDrillDown()
          Deprecated. clients should use getDrillDownPlus() instead.
 DrillDown getDrillDownPlus()
          Get the drill-down (aka refine-by) information for this result set.
 TallyFeature[] getDrillSideways()
          Deprecated. clients should use getDrillSidewaysPlus() instead.
 DrillSideways getDrillSidewaysPlus()
          Get the drill-sideways (aka breadcrumb) information for this result set.
 FeatureMetaData[] getGroupByOptions()
          Get the group-by (aka view-by) options for this result set.
 int getGroupBySelected()
          Get the index of the currently selected group-by (aka view-by) option.
 java.lang.String[] getHighlightTerms()
          Get the highlight terms for this result set.
 java.util.Hashtable getHooks()
          Get the hooks hash table.
 java.lang.String getHtmlBizRule()
          If this result set is an HTML business rule, return the HTML, else null.
 java.lang.String getHtmlBizRuleJavaScriptFunctionCall()
          Get the JavaScript function used for click-through logging.
 java.lang.String getHtmlBizRuleTitle()
          If this result set is an HTML business rule, this is the HTML business rule title.
 java.lang.String getIdentifier()
          Get the OneStep identifier feature id for this result set.
 FeatureMetaData[] getIrDrillDownOptions()
          Get the IR feature drill-down options for this result set.
 boolean getIsRemoveIndividualTerms()
          Determine whether or not individual terms of a text query should be removable, as opposed to removing (disimissing the constraint for) the entire text query.
 boolean getIsRenderBreadcrumb()
          Determine whether or not the breadcrumb should be rendered.
 boolean getIsRenderPerPageOptions()
          Determine whether or not the per-page options control should be rendered.
 boolean getIsRenderSearchWithin()
          Determine whether or not the search within control should be rendered.
 java.lang.String getLabel()
          Get the display name of this result set.
 PageContext getPageContext()
          Get the page context for this result set.
 java.lang.String getQuerySubType()
          Get the sub-type of the query which begat this result set.
 java.lang.String getQueryType()
          Get the type of the query which begat this result set.
 int getRank()
          Get the presentation rank of this result set.
 Query getResolvedQuery()
          Get the resolved Query which begat this result set.
 java.lang.String getResolvedQueryState()
          Get the OneStep serialization String for the resolved Query which begat this result set.
 java.util.Hashtable getResponseHeaders()
          Get the response headers hash table.
 FeatureMetaData[] getSearchByOptions()
          Get the search-by (aka set feature) options for this result set.
 SortFeature[] getSortByOptions()
          Get the sort-by options for this result set.
 int getSortBySelected()
          Get the index of the currently selected sort-by option.
 FeatureMetaData[] getSummarizeByOptions()
          Get the summarize-by options for this result set.
 int getSummarizeBySelected()
          Get the index of the currently selected summarize-by option.
 Table getTable()
          Get the table for this result set.
 java.lang.Object getUserData()
          Get the userData object.
 FeatureMetaData[] getViewByOptions()
          Get the view-by (aka group-by) options for this result set.
 int getViewBySelected()
          Get the index of the currently selected view-by (aka group-by) option.
 Voiceover getVoiceover()
          Get the voiceover details for this result set.
 boolean isDirectAnswer()
          Determine if this result set is of type iphrase:direct answer (i.e.
 boolean isDirectNav()
          Determine if this result set is of type iphrase:direct navigation (i.e.
 boolean isRemoveIndividualTerms()
          Determine whether or not individual terms of a text query should be removable, as opposed to removing (disimissing the constraint for) the entire text query.
 boolean isRenderBreadcrumb()
          Determine whether or not the breadcrumb should be rendered.
 boolean isRenderPerPageOptions()
          Determine whether or not the per-page options control should be rendered.
 boolean isRenderSearchWithin()
          Determine whether or not the search within control should be rendered.
 void setHtmlBizRuleJavaScriptFunctionCall(java.lang.String htmlBizRuleJavaScriptFunctionCall)
          Set the JavaScript function used for click-through logging.
 void setUserData(java.lang.Object userData)
          Set the userData object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResolvedQuery

public final Query getResolvedQuery()
Get the resolved Query which begat this result set. Do NOT modify this query directly; you should only use it for read-only access to properties.

getResolvedQueryState

public java.lang.String getResolvedQueryState()
Get the OneStep serialization String for the resolved Query which begat this result set. This can be the point of departure for a follow up query via Connector.createQuery(String state).

getQueryType

public java.lang.String getQueryType()
Get the type of the query which begat this result set. The OneStep built-in query types are: Customers can configure their business rules and corresponding query types as [business_rule_section]:[business_rule_name].
Returns:
String query type.

getQuerySubType

public java.lang.String getQuerySubType()
Get the sub-type of the query which begat this result set. Currently, sub-type is only available for the getQueryType() value "iphrase:freeform", and can be one of:
Returns:
String query type.

isDirectNav

public boolean isDirectNav()
Determine if this result set is of type iphrase:direct navigation (i.e. if getQueryType() returns iphrase:direct navigation).
Returns:
true if this is a direct navigation result

getDirectNavRow

public FeatureRow getDirectNavRow()
Get the direct navigation FeatureRow for this result set, if getQueryType() returns iphrase:direct navigation.
Returns:
FeatureRow, or null if there is no direct nav row

getDirectNavUri

public java.lang.String getDirectNavUri()
Get the direct navigation URI for this result set, if getQueryType() returns iphrase:direct navigation. The client may choose to serve a redirect to the direct navigation URL.
Returns:
String URI, or null if there is no direct nav URI

isDirectAnswer

public boolean isDirectAnswer()
Determine if this result set is of type iphrase:direct answer (i.e. if getQueryType() returns iphrase:direct answer).
Returns:
boolean true if this is a direct answer result

getRank

public int getRank()
Get the presentation rank of this result set. Rank is a measure of importance. Rank 1 is most important, and should generally be rendered as the primary/main result. Currently, there should be one and only one result with presentation rank 1, but this is not guaranteed in future releases.
Returns:
positive int rank

isRenderSearchWithin

public boolean isRenderSearchWithin()
Determine whether or not the search within control should be rendered. This corresponds to the XML_RENDER_SEARCH_WITHIN server property.
Returns:
boolean true or false

getIsRenderSearchWithin

public boolean getIsRenderSearchWithin()
Determine whether or not the search within control should be rendered. This corresponds to the XML_RENDER_SEARCH_WITHIN server property. Identical to isRenderSearchWithin(), but starts with 'get' in order to expose bean property to JSP/JSTL.
Returns:
boolean true or false

isRenderPerPageOptions

public boolean isRenderPerPageOptions()
Determine whether or not the per-page options control should be rendered. This corresponds to the XML_RENDER_PER_PAGE server property.
Returns:
boolean true or false

getIsRenderPerPageOptions

public boolean getIsRenderPerPageOptions()
Determine whether or not the per-page options control should be rendered. This corresponds to the XML_RENDER_PER_PAGE server property. Identical to isRenderPerPageOptions(), but starts with 'get' in order to expose bean property to JSP/JSTL.
Returns:
boolean true or false

isRenderBreadcrumb

public boolean isRenderBreadcrumb()
Determine whether or not the breadcrumb should be rendered. This corresponds to the XML_RENDER_DRILL_SIDEWAYS server property (which should've been named XML_RENDER_BREADCRUMB).
Returns:
boolean true or false

getIsRenderBreadcrumb

public boolean getIsRenderBreadcrumb()
Determine whether or not the breadcrumb should be rendered. This corresponds to the XML_RENDER_DRILL_SIDEWAYS server property (which should've been named XML_RENDER_BREADCRUMB). Identical to isRenderBreadcrumb(), but starts with 'get' in order to expose bean property to JSP/JSTL.
Returns:
boolean true or false

isRemoveIndividualTerms

public boolean isRemoveIndividualTerms()
Determine whether or not individual terms of a text query should be removable, as opposed to removing (disimissing the constraint for) the entire text query. This corresponds to the 'render_remove_individual_terms' property in iq.txt.
Returns:
boolean true or false

getIsRemoveIndividualTerms

public boolean getIsRemoveIndividualTerms()
Determine whether or not individual terms of a text query should be removable, as opposed to removing (disimissing the constraint for) the entire text query. This corresponds to the 'render_remove_individual_terms' property in iq.txt. Identical to isRemoveIndividualTerms(), but starts with 'get' in order to expose bean property to JSP/JSTL.
Returns:
boolean true or false

getIdentifier

public java.lang.String getIdentifier()
Get the OneStep identifier feature id for this result set.
Returns:
String feature id.

getLabel

public java.lang.String getLabel()
Get the display name of this result set.
Returns:
String label.

getHtmlBizRuleJavaScriptFunctionCall

public java.lang.String getHtmlBizRuleJavaScriptFunctionCall()
Get the JavaScript function used for click-through logging.
Parameters:
htmlBizRuleJavaScriptFunctionCall - String a JavaScript function call, possibly with leading args, that accepts these three additional args:
  1. rownum
  2. feature
  3. target
The JavaScript function should be defined in such a way as to post the arguments back to the application, which will then be able to accomplish click-through logging.

setHtmlBizRuleJavaScriptFunctionCall

public void setHtmlBizRuleJavaScriptFunctionCall(java.lang.String htmlBizRuleJavaScriptFunctionCall)
Set the JavaScript function used for click-through logging.
Parameters:
htmlBizRuleJavaScriptFunctionCall - String a JavaScript function call, possibly with leading args, that accepts these three additional args:
  1. rownum
  2. feature
  3. target
The JavaScript function should be defined in such a way as to post the arguments back to the application, which will then be able to accomplish click-through logging.

getHtmlBizRuleTitle

public java.lang.String getHtmlBizRuleTitle()
If this result set is an HTML business rule, this is the HTML business rule title.
Returns:
the title of the HTML business rule or empty string if the title is not not available

getHtmlBizRule

public java.lang.String getHtmlBizRule()
If this result set is an HTML business rule, return the HTML, else null. If there are links in the HTML and they are configured for click-through logging, then each href will be parsed for arguments and replaced by a JavaScript function call set by setHtmlBizRuleJavaScriptFunctionCall(java.lang.String). If htmlBizRuleJavaScriptFunctionCall wasn't set, the links will remain as is (untransformed). For example:
Returns:
String HTML source or null if there is no HTML bizrule

getTable

public Table getTable()
Get the table for this result set.
Returns:
Table

getVoiceover

public Voiceover getVoiceover()
Get the voiceover details for this result set.
Returns:
Voiceover or null if there are no voiceover details for this result set.

getPageContext

public PageContext getPageContext()
Get the page context for this result set.
Returns:
PageContext or null if there is no page context for this result set.

getDrillDown

public TallyFeature[] getDrillDown()
Deprecated. clients should use getDrillDownPlus() instead.

Get the drill-down (aka refine-by) tally tree for this result set.
Returns:
TallyFeature[] array, which will have 0 elements if there is no drill-down tally tree for this result set.

getDrillDownPlus

public DrillDown getDrillDownPlus()
Get the drill-down (aka refine-by) information for this result set.
Returns:
DrillDown

getDrillSideways

public TallyFeature[] getDrillSideways()
Deprecated. clients should use getDrillSidewaysPlus() instead.

Get the drill-sideways (aka breadcrumb) tally tree for this result set.
Returns:
TallyFeature[] array, which will have 0 elements if there is no drill-sideways tally tree for this result set.

getDrillSidewaysPlus

public DrillSideways getDrillSidewaysPlus()
Get the drill-sideways (aka breadcrumb) information for this result set.
Returns:
DrillSideways

getGroupByOptions

public FeatureMetaData[] getGroupByOptions()
Get the group-by (aka view-by) options for this result set. Query.setGroupByFeature(java.lang.String) can view (group) results by one of these features.
Returns:
FeatureMetaData array, which will have 0 elements if there are no view-by options for this result set.

getViewByOptions

public FeatureMetaData[] getViewByOptions()
Get the view-by (aka group-by) options for this result set. Query.setViewByFeature(java.lang.String) can view (group) results by one of these features.
Returns:
FeatureMetaData array, which will have 0 elements if there are no view-by options for this result set.
See Also:
getGroupByOptions()

getGroupBySelected

public int getGroupBySelected()
Get the index of the currently selected group-by (aka view-by) option.
Returns:
int option index, or -1 if no option is selected.
See Also:
getGroupByOptions()

getViewBySelected

public int getViewBySelected()
Get the index of the currently selected view-by (aka group-by) option.
Returns:
int option index, or -1 if no option is selected.
See Also:
getGroupBySelected()

getSummarizeByOptions

public FeatureMetaData[] getSummarizeByOptions()
Get the summarize-by options for this result set. Query.setSummarizeByFeatures(java.util.List) can summarize results by one or more of these features.
Returns:
FeatureMetaData array, which will have 0 elements if there are no summarize-by options for this result set.

getSummarizeBySelected

public int getSummarizeBySelected()
Get the index of the currently selected summarize-by option.
Returns:
int option index, or -1 if no option is selected.
See Also:
getSummarizeByOptions()

getSearchByOptions

public FeatureMetaData[] getSearchByOptions()
Get the search-by (aka set feature) options for this result set. Query.setSearchFeatures(java.util.List) can restrict a text query to one or more of these features.
Returns:
FeatureMetaData array, which will have 0 elements if there are no search-by options for this result set (no restriction possible).

getAddColumnOptions

public FeatureMetaData[] getAddColumnOptions()
Get the additional column (aka add-column) options for this result set. Query.setAddColumnFeatures(java.util.List) will add one or more of these columns to the result table.
Returns:
FeatureMetaData array, which will have 0 elements if there are no additional column options for this result set.

getIrDrillDownOptions

public FeatureMetaData[] getIrDrillDownOptions()
Get the IR feature drill-down options for this result set.
Returns:
FeatureMetaData array, which will have 0 elements if there are no IR feature drill-down options for this result set.

getSortByOptions

public SortFeature[] getSortByOptions()
Get the sort-by options for this result set.
Returns:
SortFeature array or null if there are no sort-by options for this result set.

getSortBySelected

public int getSortBySelected()
Get the index of the currently selected sort-by option.
Returns:
int option index, or -1 if no option is selected.
See Also:
getSortByOptions()

getHighlightTerms

public java.lang.String[] getHighlightTerms()
Get the highlight terms for this result set.
Returns:
String array of terms to highlight in rendered page, or null if there are no highlight terms for this result set.

getResponseHeaders

public java.util.Hashtable getResponseHeaders()
Get the response headers hash table. All values are String.
Returns:
Hashtable response header key/val pairs.

getUserData

public java.lang.Object getUserData()
Get the userData object.
Returns:
Object user defined data previously set to this particular ResultSet.

setUserData

public void setUserData(java.lang.Object userData)
Set the userData object.
Parameters:
{@link - Object} user defined object.

getHooks

public java.util.Hashtable getHooks()
Get the hooks hash table. All values are String.
Returns:
Hashtable key/value pairs of custom data set by hooks

© Copyright 2005, 2006. IBM Corporation. All rights reserved.