Package lumis.portal.bigdata
Class DummyDocumentPopularityProvider
- java.lang.Object
-
- lumis.portal.bigdata.DummyDocumentPopularityProvider
-
- All Implemented Interfaces:
IDocumentPopularityProvider
public class DummyDocumentPopularityProvider extends Object implements IDocumentPopularityProvider
IDocumentPopularityProvider
that does not change any popularity of any content.- Since:
- 11.1.0
- Version:
- $Revision: 22201 $ $Date: 2018-12-17 15:53:06 -0200 (Mon, 17 Dec 2018) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface lumis.portal.bigdata.IDocumentPopularityProvider
IDocumentPopularityProvider.DocumentPopularityKey
-
-
Constructor Summary
Constructors Constructor Description DummyDocumentPopularityProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<IDocumentPopularityProvider.DocumentPopularityKey,Double>
calculateDocumentPopularities()
Returns a list of documents popularities.double
calculateDocumentPopularity(StandardDocument document)
Returns the popularity for the given document.
-
-
-
Method Detail
-
calculateDocumentPopularities
public Map<IDocumentPopularityProvider.DocumentPopularityKey,Double> calculateDocumentPopularities() throws PortalException, TransactionRequiredException
Description copied from interface:IDocumentPopularityProvider
Returns a list of documents popularities.
Each entry of the given map is consisted in: astandard document's item identifier
, used as the entry's key; and adouble
value, used as the document's popularity.
Both, key and value must not be null and the value must be a positivefinite
number.
A popularity between0
and1
decrease the score the document would have during a search. A popularity of1
does not alter the score the document would have during search. A popularity greater than1
increase the score the document would have during search.
The returned map must not be null.- Specified by:
calculateDocumentPopularities
in interfaceIDocumentPopularityProvider
- Returns:
- a list of documents popularities.
- Throws:
PortalException
- if some error occur during calculation.TransactionRequiredException
- if there's no active transaction.
-
calculateDocumentPopularity
public double calculateDocumentPopularity(StandardDocument document) throws PortalException, TransactionRequiredException, IllegalArgumentException
Description copied from interface:IDocumentPopularityProvider
Returns the popularity for the given document. The returned value must be a positivefinite
number. A popularity between0
and1
decrease the score the document would have during a search. A popularity of1
does not alter the score the document would have during search. A popularity greater than1
increase the score the document would have during search.- Specified by:
calculateDocumentPopularity
in interfaceIDocumentPopularityProvider
- Parameters:
document
- the document.- Returns:
- the popularity for the given document.
- Throws:
PortalException
- if some error occur during calculation.TransactionRequiredException
- if there's no active transaction.IllegalArgumentException
- if the given document isnull
.
-
-