Package org.aksw.iguana.cc.query.handler
Class QueryHandler
java.lang.Object
org.aksw.iguana.cc.query.handler.QueryHandler
The QueryHandler is used by every worker that extends the AbstractWorker.
It initializes the QuerySource, QuerySelector, QueryList and, if needed, TemplateHandler.
After the initialization, it provides the next query to the worker using the generated QuerySource
and the order given by the QuerySelector.
- Author:
- frensing
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
static final record
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Empty Constructor for Testing purposes.QueryHandler
(QueryHandler.Config config) -
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns every query id in the format:queryListHash:index
The index of a query inside the returned array is the same as the index inside the string.Returns the configuration of the QueryHandler.getNextQuery
(QuerySelector querySelector) getNextQueryStream
(QuerySelector querySelector) int
getQueryId
(int i) int
hashCode()
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
config
-
queryList
-
hashCode
protected final int hashCode
-
-
Constructor Details
-
QueryHandler
protected QueryHandler()Empty Constructor for Testing purposes. TODO: look for an alternative -
QueryHandler
- Throws:
IOException
-
-
Method Details
-
getQuerySelectorInstance
-
getNextQuery
- Throws:
IOException
-
getNextQueryStream
-
hashCode
public int hashCode() -
getQueryCount
public int getQueryCount() -
getQueryId
-
getAllQueryIds
Returns every query id in the format:queryListHash:index
The index of a query inside the returned array is the same as the index inside the string.- Returns:
- String[] of query ids
-
getConfig
Returns the configuration of the QueryHandler.- Returns:
- the configuration of the QueryHandler
-