public class QueryFileIterator extends Object implements QueryIterator
QueryIterator
interface used to
iterate through the queries defined in a tabular delimited file i.e. e1\te2Constructor and Description |
---|
QueryFileIterator(String filepath)
Constructor of a
QueryFileIterator |
QueryFileIterator(String filepath,
String uriPrefix)
Constructor of a
QueryFileIterator |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the opened repository
|
long |
getNumberQueries() |
boolean |
hasNext() |
QueryEntry |
next()
Note the Query Entry returned can be equal to null if the line is not in
agreement with the expectations i.e.
|
List<QueryEntry> |
nextValids(int nbValues)
Return a List containing the next valid queries.
|
public QueryFileIterator(String filepath) throws IOException
QueryFileIterator
filepath
- the file to load as repositoryIOException
- if an IO exception appendspublic QueryFileIterator(String filepath, String uriPrefix) throws IOException
QueryFileIterator
filepath
- the file to load as repositoryuriPrefix
- IOException
- if an IO exception appendspublic boolean hasNext()
hasNext
in interface QueryIterator
public QueryEntry next()
next
in interface QueryIterator
QueryEntry
. Also return null if the
row repository do not correspond to a well formed entry.public void close() throws IOException
QueryIterator
close
in interface QueryIterator
IOException
public List<QueryEntry> nextValids(int nbValues)
QueryIterator
nextValids
in interface QueryIterator
nbValues
- the number of values the query list must contains.QueryEntry
public long getNumberQueries() throws Exception
getNumberQueries
in interface QueryIterator
Exception
Copyright © 2014. All rights reserved.