com.plumtree.portalpages.browsing.search.results
Class GroupedResults508ViewHelper

java.lang.Object
  extended by com.plumtree.portalpages.browsing.search.results.GroupedResults508ViewHelper
All Implemented Interfaces:
IGroupedResultsViewHelper

public class GroupedResults508ViewHelper
extends java.lang.Object
implements IGroupedResultsViewHelper

Author:
CraigS

Field Summary
protected  XPDateFormat _dateFormat
           
protected  ISearchResultModelRO _model
           
protected  SearchPageModeHelper _pageMode
           
protected  HTMLElement[] _resultRows
           
protected  GroupedResultsView _view
           
static java.lang.String COLON
           
static java.lang.String DOT
           
static java.lang.String LEFT_PAREN
           
protected  AActivitySpace m_asOwner
           
static java.lang.String RIGHT_PAREN
           
static java.lang.String SPACE
           
 
Constructor Summary
GroupedResults508ViewHelper(SearchPageModeHelper pageMode)
           
 
Method Summary
 HTMLElement DisplayCollection()
          Returns the element that all other elements will be added to, such as an HTMLTable.
 HTMLElement DisplayFooter()
          Returns an element that will appear after all results regardless of whether the results are grouped.
 HTMLElement DisplayFooterIfUngrouped()
          Returns an element that will appear after all results if the results are not grouped.
 HTMLElement DisplayGroupFooter(int groupNum)
          Returns an element that will appear after all results in a single group.
 HTMLElement DisplayGroupHeader(int groupNum)
          Returns the header element (e.g.
 HTMLElement DisplayHeader()
          Returns an element that will appear before all results, whether or not the results are grouped.
 HTMLElement DisplayHeaderIfUngrouped()
          Returns the header element (e.g.
 HTMLScript DisplayJavascript()
          Returns javascript for the view.
 HTMLElement DisplaySingleResult(int overallRank, boolean oddRow, int groupNum)
          Returns the element (e.g.
protected  HTMLElement formatKWIC(java.lang.String kwic, PTStyleClass hiddenStyle, java.lang.String kwicLang)
          Helper method to reformat the KWIC string into a 508 and screenreader-friendly version.
 java.lang.String formatPath(java.lang.String path)
          Helper method to format path string in a friendly way In 508 mode, we simply show the parent folder name, since reading off a lengthy (and truncated) path takes a lot of time.
protected  XPDateFormat Get508DateFormat(AActivitySpace owner)
           
 void Init(AActivitySpace owner, ISearchResultModelRO model, GroupedResultsView view)
          Called to set the activityspace, model, and view being used
 void InitDisplayResults()
          Call this method before calling any of the other methods to do initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_asOwner

protected AActivitySpace m_asOwner

_model

protected ISearchResultModelRO _model

_view

protected GroupedResultsView _view

_pageMode

protected SearchPageModeHelper _pageMode

DOT

public static final java.lang.String DOT
See Also:
Constant Field Values

COLON

public static final java.lang.String COLON
See Also:
Constant Field Values

SPACE

public static final java.lang.String SPACE
See Also:
Constant Field Values

LEFT_PAREN

public static final java.lang.String LEFT_PAREN
See Also:
Constant Field Values

RIGHT_PAREN

public static final java.lang.String RIGHT_PAREN
See Also:
Constant Field Values

_dateFormat

protected XPDateFormat _dateFormat

_resultRows

protected HTMLElement[] _resultRows
Constructor Detail

GroupedResults508ViewHelper

public GroupedResults508ViewHelper(SearchPageModeHelper pageMode)
Method Detail

Init

public void Init(AActivitySpace owner,
                 ISearchResultModelRO model,
                 GroupedResultsView view)
Description copied from interface: IGroupedResultsViewHelper
Called to set the activityspace, model, and view being used

Specified by:
Init in interface IGroupedResultsViewHelper

Get508DateFormat

protected XPDateFormat Get508DateFormat(AActivitySpace owner)

formatPath

public java.lang.String formatPath(java.lang.String path)
Helper method to format path string in a friendly way In 508 mode, we simply show the parent folder name, since reading off a lengthy (and truncated) path takes a lot of time. The user can see the full path in View Properties.


DisplayJavascript

public HTMLScript DisplayJavascript()
Returns javascript for the view.

Specified by:
DisplayJavascript in interface IGroupedResultsViewHelper

DisplayCollection

public HTMLElement DisplayCollection()
Returns the element that all other elements will be added to, such as an HTMLTable. If null is returned, a generic HTMLElementCollection will be used.

Specified by:
DisplayCollection in interface IGroupedResultsViewHelper

DisplayHeader

public HTMLElement DisplayHeader()
Returns an element that will appear before all results, whether or not the results are grouped.

Specified by:
DisplayHeader in interface IGroupedResultsViewHelper

DisplayFooter

public HTMLElement DisplayFooter()
Returns an element that will appear after all results regardless of whether the results are grouped.

Specified by:
DisplayFooter in interface IGroupedResultsViewHelper

DisplayHeaderIfUngrouped

public HTMLElement DisplayHeaderIfUngrouped()
Returns the header element (e.g. an HTMLTableRow containing column headings) that will be used if the results are not grouped. Not called if the results are grouped.

Specified by:
DisplayHeaderIfUngrouped in interface IGroupedResultsViewHelper

DisplayFooterIfUngrouped

public HTMLElement DisplayFooterIfUngrouped()
Returns an element that will appear after all results if the results are not grouped. Not called if the results are grouped.

Specified by:
DisplayFooterIfUngrouped in interface IGroupedResultsViewHelper

DisplayGroupHeader

public HTMLElement DisplayGroupHeader(int groupNum)
Returns the header element (e.g. an HTMLTableRow containing column headings) that will be used if the results are grouped. Not called if the results are ungrouped.

Specified by:
DisplayGroupHeader in interface IGroupedResultsViewHelper

DisplayGroupFooter

public HTMLElement DisplayGroupFooter(int groupNum)
Returns an element that will appear after all results in a single group. Not called if the results are ungrouped.

Specified by:
DisplayGroupFooter in interface IGroupedResultsViewHelper

DisplaySingleResult

public HTMLElement DisplaySingleResult(int overallRank,
                                       boolean oddRow,
                                       int groupNum)
Returns the element (e.g. an HTMLTableRow) for a single search result.

Specified by:
DisplaySingleResult in interface IGroupedResultsViewHelper

formatKWIC

protected HTMLElement formatKWIC(java.lang.String kwic,
                                 PTStyleClass hiddenStyle,
                                 java.lang.String kwicLang)
Helper method to reformat the KWIC string into a 508 and screenreader-friendly version.


InitDisplayResults

public void InitDisplayResults()
Description copied from interface: IGroupedResultsViewHelper
Call this method before calling any of the other methods to do initialization.

Specified by:
InitDisplayResults in interface IGroupedResultsViewHelper



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.