public abstract class AbstractSearchIndexerUpdateStrategy extends AbstractLoggableComponent implements SearchIndexerUpdateStrategy
SearchIndexerUpdateStrategy
interface.Modifier and Type | Field and Description |
---|---|
protected static String |
CONTEXT_VARIABLE_ENTRY_UPDATE_VISITOR
The key for the
CountingEntryUpdateVisitor . |
protected static String |
CONTEXT_VARIABLE_RESOURCE_URI_SET
The key for the
Set of resource-URIs . |
private IndexerDependencies |
indexerDependencies |
Constructor and Description |
---|
AbstractSearchIndexerUpdateStrategy()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected CountingEntryUpdateVisitor |
createEntryUpdateVisitor()
This method creates the
CountingEntryUpdateVisitor to use. |
protected void |
doInitialize()
This method performs the actual
initialization . |
protected ChangeType |
getChangeType(BrowsableResource resource,
UpdateStrategyArguments arguments)
This method determines the
ChangeType of the given
resource . |
protected CountingEntryUpdateVisitor |
getEntryUpdateVisitor(UpdateStrategyArguments arguments)
This method gets the
CountingEntryUpdateVisitor to use. |
protected IndexerDependencies |
getIndexerDependencies() |
void |
index(UpdateStrategyArguments arguments)
This method performs the actual indexing.
|
abstract void |
index(UpdateStrategyArguments arguments,
SearchIndexerDataLocation location,
EntryUpdateVisitor entryUpdateVisitor)
This method indexes as single
location . |
void |
indexRecursive(UpdateStrategyArguments arguments,
SearchIndexerDataLocation location,
BrowsableResource resource,
Set<String> visitedResources,
EntryUpdateVisitor entryUpdateVisitor,
BrowsableResource locationResource)
This method starts the indexing from the given
directory
adding the given source as metadata. |
void |
indexRecursive(UpdateStrategyArguments arguments,
SearchIndexerDataLocation location,
EntryUpdateVisitor entryUpdateVisitor)
|
protected boolean |
isFullIndexing(UpdateStrategyArguments arguments)
This method determines if full indexing from scratch shall be performed.
|
protected void |
postIndex(UpdateStrategyArguments arguments)
This method is called at the end of
index(UpdateStrategyArguments)
to complete the indexing. |
protected void |
preIndex(UpdateStrategyArguments arguments)
This method is called at the beginning of
index(UpdateStrategyArguments) to setup the indexing. |
void |
setIndexerDependencies(IndexerDependencies indexerDependencies) |
createLogger, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isResponsible
protected static final String CONTEXT_VARIABLE_RESOURCE_URI_SET
Set
of resource-URIs
.protected static final String CONTEXT_VARIABLE_ENTRY_UPDATE_VISITOR
CountingEntryUpdateVisitor
.private IndexerDependencies indexerDependencies
getIndexerDependencies()
public AbstractSearchIndexerUpdateStrategy()
protected IndexerDependencies getIndexerDependencies()
@Inject public void setIndexerDependencies(IndexerDependencies indexerDependencies)
indexerDependencies
- is the deltaIndexerDependencies to setprotected void doInitialize()
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractLoggableComponent
protected boolean isFullIndexing(UpdateStrategyArguments arguments)
arguments
- are the UpdateStrategyArgumentsBean
.true
if all resources shall be added to the indexed,
false
if only modified resources shall be updated in
the index.protected void preIndex(UpdateStrategyArguments arguments)
index(UpdateStrategyArguments)
to setup the indexing.arguments
- are the UpdateStrategyArgumentsBean
.protected void postIndex(UpdateStrategyArguments arguments)
index(UpdateStrategyArguments)
to complete the indexing.arguments
- are the UpdateStrategyArgumentsBean
.public void index(UpdateStrategyArguments arguments)
index
in interface SearchIndexerUpdateStrategy
arguments
- are the UpdateStrategyArguments
for the indexing.public abstract void index(UpdateStrategyArguments arguments, SearchIndexerDataLocation location, EntryUpdateVisitor entryUpdateVisitor)
location
.arguments
- are the UpdateStrategyArgumentsBean
.location
- is the SearchIndexerDataLocation
to index.entryUpdateVisitor
- is the EntryUpdateVisitor
.public final void indexRecursive(UpdateStrategyArguments arguments, SearchIndexerDataLocation location, EntryUpdateVisitor entryUpdateVisitor)
arguments
- are the UpdateStrategyArgumentsBean
.location
- is the SearchIndexerDataLocation
to index.entryUpdateVisitor
- is the EntryUpdateVisitor
.protected CountingEntryUpdateVisitor createEntryUpdateVisitor()
CountingEntryUpdateVisitor
to use.protected final CountingEntryUpdateVisitor getEntryUpdateVisitor(UpdateStrategyArguments arguments)
CountingEntryUpdateVisitor
to use.arguments
- are the UpdateStrategyArguments
.CountingEntryUpdateVisitor
.createEntryUpdateVisitor()
protected ChangeType getChangeType(BrowsableResource resource, UpdateStrategyArguments arguments)
ChangeType
of the given
resource
.resource
- is the BrowsableResource
for which to determine the
ChangeType
.arguments
- are the UpdateStrategyArguments
.ChangeType
indicating how the given
resource
shall be updated or null
to
indicate that the resource
shall remain unchanged.SearchIndexerSourceState.getIndexingDate()
public void indexRecursive(UpdateStrategyArguments arguments, SearchIndexerDataLocation location, BrowsableResource resource, Set<String> visitedResources, EntryUpdateVisitor entryUpdateVisitor, BrowsableResource locationResource)
directory
adding the given source
as metadata.arguments
- are the UpdateStrategyArguments
.location
- is the SearchIndexerDataLocation
.resource
- is the resource
(directory) to
index recursively.visitedResources
- is the Set
with the
URIs
of
the resources
that have already been
crawled.entryUpdateVisitor
- is the EntryUpdateVisitor
.locationResource
- is the resource
for
SearchIndexerDataLocation.getLocationUri()
of the given
location
.SearchEntry.getSource()
Copyright © 2001–2016 mmm-Team. All rights reserved.