public class QueryFileIterator extends Object implements QueryIterator
QueryIterator interface used to
iterate through the queries defined in a tabular delimited file i.e. e1\te2| Constructor 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
QueryFileIteratorfilepath - the file to load as repositoryIOException - if an IO exception appendspublic QueryFileIterator(String filepath, String uriPrefix) throws IOException
QueryFileIteratorfilepath - the file to load as repositoryuriPrefix - IOException - if an IO exception appendspublic boolean hasNext()
hasNext in interface QueryIteratorpublic QueryEntry next()
next in interface QueryIteratorQueryEntry. Also return null if the
row repository do not correspond to a well formed entry.public void close()
throws IOException
QueryIteratorclose in interface QueryIteratorIOExceptionpublic List<QueryEntry> nextValids(int nbValues)
QueryIteratornextValids in interface QueryIteratornbValues - the number of values the query list must contains.QueryEntrypublic long getNumberQueries()
throws Exception
getNumberQueries in interface QueryIteratorExceptionCopyright © 2014. All rights reserved.