Package org.dspace.authority.indexer
Class DSpaceAuthorityIndexer
- java.lang.Object
-
- org.dspace.authority.indexer.DSpaceAuthorityIndexer
-
- All Implemented Interfaces:
AuthorityIndexerInterface,org.springframework.beans.factory.InitializingBean
public class DSpaceAuthorityIndexer extends Object implements AuthorityIndexerInterface, org.springframework.beans.factory.InitializingBean
DSpaceAuthorityIndexer is used in IndexClient, which is called by the AuthorityConsumer and the indexing-script.The DSpaceAuthorityIndexer will return a list of all authority values for a given item. It will return an authority value for all metadata fields defined in dspace.conf with 'authority.author.indexer.field'.
You have to call getAuthorityValues for every Item you want to index. But you can supply an optional cache, to save the mapping from the metadata value to the new authority values for metadata fields without an authority key.
- Author:
- Antoine Snyers (antoine at atmire.com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorityValueServiceauthorityValueServiceprotected ConfigurationServiceconfigurationServiceprotected ItemServiceitemServiceprotected List<String>metadataFieldsThe list of metadata fields which are to be indexed *
-
Constructor Summary
Constructors Constructor Description DSpaceAuthorityIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()List<AuthorityValue>getAuthorityValues(Context context, Item item)List<AuthorityValue>getAuthorityValues(Context context, Item item, Map<String,AuthorityValue> cache)booleanisConfiguredProperly()
-
-
-
Field Detail
-
metadataFields
protected List<String> metadataFields
The list of metadata fields which are to be indexed *
-
authorityValueService
@Autowired(required=true) protected AuthorityValueService authorityValueService
-
itemService
@Autowired(required=true) protected ItemService itemService
-
configurationService
@Autowired(required=true) protected ConfigurationService configurationService
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getAuthorityValues
public List<AuthorityValue> getAuthorityValues(Context context, Item item) throws SQLException, AuthorizeException
- Specified by:
getAuthorityValuesin interfaceAuthorityIndexerInterface- Throws:
SQLExceptionAuthorizeException
-
getAuthorityValues
public List<AuthorityValue> getAuthorityValues(Context context, Item item, Map<String,AuthorityValue> cache) throws SQLException, AuthorizeException
- Specified by:
getAuthorityValuesin interfaceAuthorityIndexerInterface- Throws:
SQLExceptionAuthorizeException
-
isConfiguredProperly
public boolean isConfiguredProperly()
- Specified by:
isConfiguredProperlyin interfaceAuthorityIndexerInterface
-
-