org.ow2.weblab.portlet.tool
Class ResultSetSplitter

java.lang.Object
  extended by org.ow2.weblab.portlet.tool.ResultSetSplitter

public class ResultSetSplitter
extends java.lang.Object

A navigation manager for ResultSet.

Author:
emilien

Constructor Summary
ResultSetSplitter()
           
ResultSetSplitter(org.ow2.weblab.core.model.ResultSet rs, int splitSize, AnnotationsDescBean annotDesc, java.lang.String sortMethod)
          Constructor.
 
Method Summary
 boolean currentSplitIsInMemory()
           
 int getAvaibleSubResourcesNumber()
          Get the total result page number for the search according the total number of result.
 int getCurrentPosition()
          Get the current page index for this search
 org.ow2.weblab.core.model.PieceOfKnowledge getCurrentSplitPOK()
           
 HitDescriptionBean getCurrentWTripleMap()
          Get the searchArgs of the current page of the search.
 org.ow2.weblab.core.model.PieceOfKnowledge getPOK(int splitNumber)
           
 java.lang.String getSortMethod()
          Sort method accessor
 int getTotalNumberOfResources()
          return the number of result of the search
 HitDescriptionBean getWTripleMap(int splitNumber)
          Get the searchArgs of the current page of the search.
 boolean isInMemory(int splitNumber)
           
 int nextPosition()
          Change the current page to the next page.
 int prevPostion()
          Change the current page to the previous page.
 int setCurrentPageIndex(int currentPosition)
          Set the current page index to a new index.
 void updateResultSet(org.ow2.weblab.core.model.ResultSet rs)
          Update this splitter with the new resultset without changing the current position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetSplitter

public ResultSetSplitter()

ResultSetSplitter

public ResultSetSplitter(org.ow2.weblab.core.model.ResultSet rs,
                         int splitSize,
                         AnnotationsDescBean annotDesc,
                         java.lang.String sortMethod)
Constructor.

Parameters:
args - the searchArgs corresponding the search.
numberOfresults - the number of result fot this searchArgs.
Method Detail

getWTripleMap

public HitDescriptionBean getWTripleMap(int splitNumber)
Get the searchArgs of the current page of the search.

Returns:
the SearchArgs of the current page.

getCurrentWTripleMap

public HitDescriptionBean getCurrentWTripleMap()
Get the searchArgs of the current page of the search.

Returns:
the SearchArgs of the current page.

nextPosition

public int nextPosition()
Change the current page to the next page.

Returns:
the new current page.

prevPostion

public int prevPostion()
Change the current page to the previous page.

Returns:
the new current page.

getAvaibleSubResourcesNumber

public int getAvaibleSubResourcesNumber()
Get the total result page number for the search according the total number of result.

Returns:
the number of page avaible for this search.

getCurrentPosition

public int getCurrentPosition()
Get the current page index for this search

Returns:
the page number for this search

setCurrentPageIndex

public int setCurrentPageIndex(int currentPosition)
Set the current page index to a new index.

Parameters:
currentPage -
Returns:
the new current page index.

getTotalNumberOfResources

public int getTotalNumberOfResources()
return the number of result of the search

Returns:
the number of result for the search

isInMemory

public boolean isInMemory(int splitNumber)

currentSplitIsInMemory

public boolean currentSplitIsInMemory()

updateResultSet

public void updateResultSet(org.ow2.weblab.core.model.ResultSet rs)
Update this splitter with the new resultset without changing the current position.

Parameters:
rs -

getPOK

public org.ow2.weblab.core.model.PieceOfKnowledge getPOK(int splitNumber)

getCurrentSplitPOK

public org.ow2.weblab.core.model.PieceOfKnowledge getCurrentSplitPOK()

getSortMethod

public java.lang.String getSortMethod()
Sort method accessor



Copyright © 2004-2012. All Rights Reserved.