Package org.mycore.oai
Class MCROAISearcher
java.lang.Object
org.mycore.oai.MCROAISearcher
- Direct Known Subclasses:
MCROAICombinedSearcher
,MCROAIDeletedSearcher
,MCROAISolrSearcher
Base class to query different types of data in the mycore system.
Implementations has to implement the query and the earliest time stamp
methods. The result of a query is a MCROAIResult
.
Searchers have a unique id and a expiration time which increases every time a query is fired.
- Author:
- Matthias Eichner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
protected final String
The unique ID of this result setprotected MCROAIIdentify
protected static final Logger
protected org.mycore.oai.pmh.MetadataFormat
protected int
protected long
Increase every time aquery(String)
is calledprotected MCROAISetManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the earliest created/modified record time stamp.abstract Optional<org.mycore.oai.pmh.Header>
getID()
org.mycore.oai.pmh.MetadataFormat
int
void
init
(MCROAIIdentify identify, org.mycore.oai.pmh.MetadataFormat format, long expire, int partitionSize, MCROAISetManager setManager, MCROAIObjectManager objectManager) boolean
abstract MCROAIResult
abstract MCROAIResult
protected void
Updates the running expiration timer.
-
Field Details
-
LOGGER
-
identify
-
metadataFormat
protected org.mycore.oai.pmh.MetadataFormat metadataFormat -
id
The unique ID of this result set -
expire
protected long expire -
runningExpirationTimer
protected long runningExpirationTimerIncrease every time aquery(String)
is called -
partitionSize
protected int partitionSize -
setManager
-
-
Constructor Details
-
MCROAISearcher
public MCROAISearcher()
-
-
Method Details
-
init
public void init(MCROAIIdentify identify, org.mycore.oai.pmh.MetadataFormat format, long expire, int partitionSize, MCROAISetManager setManager, MCROAIObjectManager objectManager) -
getHeader
-
query
-
query
-
getEarliestTimestamp
Returns the earliest created/modified record time stamp. If the earliest time stamp cannot be retrieved an empty optional is returned.- Returns:
- the earliest created/modified time stamp
-
isExpired
public boolean isExpired() -
getExpirationTime
-
getMetadataFormat
public org.mycore.oai.pmh.MetadataFormat getMetadataFormat() -
getID
-
getSetManager
-
getObjectManager
-
getConfigPrefix
-
updateRunningExpirationTimer
protected void updateRunningExpirationTimer()Updates the running expiration timer. -
getPartitionSize
public int getPartitionSize()
-