Package org.mycore.oai
Class MCROAISearchManager
java.lang.Object
org.mycore.oai.MCROAISearchManager
Search manager of the mycore OAI-PMH implementation. Creates a new
MCROAISearcher
instance for each
searchHeader(MetadataFormat, MCRSet, Instant, Instant)
and searchRecord(MetadataFormat, MCRSet, Instant, Instant)
call.
The resumption token created by those methods can be reused for
later calls to the same searcher. A searcher is dropped after an
expiration time. The time increases for each query call.
Due to token based querying it is not possible to set a current position for the resumption token. Its always set to -1.
- Author:
- Matthias Eichner
-
Field Summary
Modifier and TypeFieldDescriptionprotected MCROAIIdentify
protected static final Logger
protected static int
protected MCROAIObjectManager
protected int
protected Map<String,
MCROAISearcher> protected MCROAISetManager
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.mycore.oai.pmh.Header>
protected org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Header>
getHeaderList
(MCROAISearcher searcher, MCROAIResult result) int
protected org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Record>
getRecordList
(MCROAISearcher searcher, MCROAIResult result) static MCROAISearcher
getSearcher
(MCROAIIdentify identify, org.mycore.oai.pmh.MetadataFormat format, int partitionSize, MCROAISetManager setManager, MCROAIObjectManager objectManager) getSearchId
(String token) getTokenCursor
(String token) void
init
(MCROAIIdentify identify, MCROAIObjectManager objManager, MCROAISetManager setManager, int partitionSize) org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Header>
searchHeader
(String resumptionToken) org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Header>
searchHeader
(org.mycore.oai.pmh.MetadataFormat format, MCRSet set, Instant from, Instant until) org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Record>
searchRecord
(String resumptionToken) org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Record>
searchRecord
(org.mycore.oai.pmh.MetadataFormat format, MCRSet set, Instant from, Instant until) protected void
setResumptionToken
(org.mycore.oai.pmh.OAIDataList<?> dataList, MCROAISearcher searcher, MCROAIResult result)
-
Field Details
-
LOGGER
-
TOKEN_DELIMITER
- See Also:
-
MAX_AGE
protected static int MAX_AGE -
resultMap
-
identify
-
objManager
-
setManager
-
partitionSize
protected int partitionSize
-
-
Constructor Details
-
MCROAISearchManager
public MCROAISearchManager()
-
-
Method Details
-
init
public void init(MCROAIIdentify identify, MCROAIObjectManager objManager, MCROAISetManager setManager, int partitionSize) -
getHeader
-
searchHeader
public org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Header> searchHeader(String resumptionToken) throws org.mycore.oai.pmh.BadResumptionTokenException - Throws:
org.mycore.oai.pmh.BadResumptionTokenException
-
searchRecord
public org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Record> searchRecord(String resumptionToken) throws org.mycore.oai.pmh.BadResumptionTokenException - Throws:
org.mycore.oai.pmh.BadResumptionTokenException
-
searchHeader
-
searchRecord
-
getRecordList
protected org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Record> getRecordList(MCROAISearcher searcher, MCROAIResult result) -
getHeaderList
protected org.mycore.oai.pmh.OAIDataList<org.mycore.oai.pmh.Header> getHeaderList(MCROAISearcher searcher, MCROAIResult result) -
getSearchId
- Throws:
org.mycore.oai.pmh.BadResumptionTokenException
-
getTokenCursor
- Throws:
org.mycore.oai.pmh.BadResumptionTokenException
-
setResumptionToken
protected void setResumptionToken(org.mycore.oai.pmh.OAIDataList<?> dataList, MCROAISearcher searcher, MCROAIResult result) -
getPartitionSize
public int getPartitionSize() -
getSearcher
public static MCROAISearcher getSearcher(MCROAIIdentify identify, org.mycore.oai.pmh.MetadataFormat format, int partitionSize, MCROAISetManager setManager, MCROAIObjectManager objectManager)
-