Package org.dspace.app.suggestion.scorer
Class DateScorer
java.lang.Object
org.dspace.app.suggestion.scorer.DateScorer
- All Implemented Interfaces:
EvidenceScorer
Implementation of which evaluate ImportRecords
based on the distance from a date extracted from the ResearcherProfile (birthday / graduation date)
- Author:
- Andrea Bollini (andrea.bollini at 4science dot it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeEvidence(Item researcher, ExternalDataObject importRecord) Method which is responsible to evaluate ImportRecord based on the publication date.voidsetBirthDateDelta(int birthDateDelta) voidsetBirthDateMetadata(String birthDate) voidsetBirthDateRange(int birthDateRange) voidsetEducationDateDelta(int educationDateDelta) voidsetEducationDateMetadata(String educationDate) voidsetEducationDateRange(int educationDateRange) voidsetItemService(ItemService itemService) voidsetPublicationDateMetadata(String publicationDateMetadata)
-
Constructor Details
-
DateScorer
public DateScorer()
-
-
Method Details
-
setItemService
-
setBirthDateMetadata
-
getBirthDateMetadata
-
setEducationDateMetadata
-
getEducationDateMetadata
-
setBirthDateDelta
public void setBirthDateDelta(int birthDateDelta) -
setBirthDateRange
public void setBirthDateRange(int birthDateRange) -
setEducationDateDelta
public void setEducationDateDelta(int educationDateDelta) -
setEducationDateRange
public void setEducationDateRange(int educationDateRange) -
setPublicationDateMetadata
-
computeEvidence
Method which is responsible to evaluate ImportRecord based on the publication date. ImportRecords which have a date outside the defined or calculated expected range will be discarded.birthDateMetadata,educationDateMetadata- Specified by:
computeEvidencein interfaceEvidenceScorer- Parameters:
importRecord- the ExternalDataObject to checkresearcher- DSpace item- Returns:
- the generated evidence or null if the record must be discarded
-