Package org.dspace.discovery.indexobject
Class LDNMessageEntityIndexFactoryImpl
java.lang.Object
org.dspace.discovery.indexobject.IndexFactoryImpl<IndexableLDNNotification,LDNMessageEntity>
org.dspace.discovery.indexobject.LDNMessageEntityIndexFactoryImpl
- All Implemented Interfaces:
IndexFactory<IndexableLDNNotification,LDNMessageEntity>
public class LDNMessageEntityIndexFactoryImpl
extends IndexFactoryImpl<IndexableLDNNotification,LDNMessageEntity>
Factory implementation implementation for the
IndexableLDNNotification- Author:
- Stefano Maffei at 4science.com
-
Field Summary
Fields inherited from class org.dspace.discovery.indexobject.IndexFactoryImpl
solrSearchCore, solrServiceIndexPlugins -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.solr.common.SolrInputDocumentbuildDocument(Context context, IndexableLDNNotification indexableObject) Create solr document with all the shared fields initialized.Retrieve all instances of a certain indexable object typefindIndexableObject(Context context, String id) Retrieve a single indexable object using the provided identifiergetIndexableObjects(Context context, LDNMessageEntity object) Retrieve all the indexable objects for the provided objectgetType()Return the type of the indexable objectbooleanDetermine whether the class can handle the factory implementationMethods inherited from class org.dspace.discovery.indexobject.IndexFactoryImpl
addFacetIndex, addFacetIndex, addNamedResourceTypeIndex, buildNewDocument, delete, delete, deleteAll, writeDocument, writeDocument
-
Constructor Details
-
LDNMessageEntityIndexFactoryImpl
public LDNMessageEntityIndexFactoryImpl()
-
-
Method Details
-
findAll
Description copied from interface:IndexFactoryRetrieve all instances of a certain indexable object type- Parameters:
context- DSpace context object- Returns:
- An iterator containing all the objects to be indexed for the indexable object
- Throws:
SQLException- If database error
-
getType
Description copied from interface:IndexFactoryReturn the type of the indexable object- Returns:
- a string containing the type
-
findIndexableObject
public Optional<IndexableLDNNotification> findIndexableObject(Context context, String id) throws SQLException Description copied from interface:IndexFactoryRetrieve a single indexable object using the provided identifier- Parameters:
context- DSpace context objectid- The identifier for which we want to retrieve our indexable object- Returns:
- An indexable object
- Throws:
SQLException- If database error
-
supports
Description copied from interface:IndexFactoryDetermine whether the class can handle the factory implementation- Parameters:
object- The object which we want to check- Returns:
- True if the factory implementation can handle the given object. False if it doesn't.
-
getIndexableObjects
public List<IndexableLDNNotification> getIndexableObjects(Context context, LDNMessageEntity object) throws SQLException Description copied from interface:IndexFactoryRetrieve all the indexable objects for the provided object- Parameters:
context- DSpace context objectobject- The object we want to retrieve our indexable objects for- Returns:
- A list of indexable objects
- Throws:
SQLException- If database error
-
buildDocument
public org.apache.solr.common.SolrInputDocument buildDocument(Context context, IndexableLDNNotification indexableObject) throws SQLException, IOException Description copied from interface:IndexFactoryCreate solr document with all the shared fields initialized.- Specified by:
buildDocumentin interfaceIndexFactory<IndexableLDNNotification,LDNMessageEntity> - Overrides:
buildDocumentin classIndexFactoryImpl<IndexableLDNNotification,LDNMessageEntity> indexableObject- the indexableObject that we want to index- Returns:
- initialized solr document
- Throws:
SQLExceptionIOException
-