Class FolderQuerySource
java.lang.Object
org.aksw.iguana.cc.query.source.QuerySource
org.aksw.iguana.cc.query.source.impl.FolderQuerySource
The FileSeparatorQuerySource reads queries from a folder with query files.
Each query contains one (multiline) query.
- Author:
- frensing
-
Field Summary
Fields inherited from class org.aksw.iguana.cc.query.source.QuerySource
hashCode, path
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns all queries in the source as a list of Strings.getQuery
(int index) This method returns the query at the given index.getQueryStream
(int index) int
hashCode()
int
size()
This method returns the amount of queries in the source.Methods inherited from class org.aksw.iguana.cc.query.source.QuerySource
getPath
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
files
-
-
Constructor Details
-
FolderQuerySource
- Throws:
IOException
-
-
Method Details
-
size
public int size()Description copied from class:QuerySource
This method returns the amount of queries in the source.- Specified by:
size
in classQuerySource
- Returns:
- the number of queries in the source
-
getQuery
Description copied from class:QuerySource
This method returns the query at the given index.- Specified by:
getQuery
in classQuerySource
- Parameters:
index
- the index of the query counted from the first query (in the first file)- Returns:
- String of the query
- Throws:
IOException
- if the query could not be read
-
getQueryStream
- Specified by:
getQueryStream
in classQuerySource
- Throws:
IOException
-
getAllQueries
Description copied from class:QuerySource
This method returns all queries in the source as a list of Strings.- Specified by:
getAllQueries
in classQuerySource
- Returns:
- List of Strings of all queries
- Throws:
IOException
- if the queries could not be read
-
hashCode
public int hashCode()- Overrides:
hashCode
in classQuerySource
-