Class FolderQuerySource

java.lang.Object
org.aksw.iguana.cc.query.source.QuerySource
org.aksw.iguana.cc.query.source.impl.FolderQuerySource

public class FolderQuerySource extends QuerySource
The FileSeparatorQuerySource reads queries from a folder with query files. Each query contains one (multiline) query.
Author:
frensing
  • Field Details

    • LOGGER

      protected static final org.slf4j.Logger LOGGER
    • files

      protected Path[] files
  • Constructor Details

  • 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 class QuerySource
      Returns:
      the number of queries in the source
    • getQuery

      public String getQuery(int index) throws IOException
      Description copied from class: QuerySource
      This method returns the query at the given index.
      Specified by:
      getQuery in class QuerySource
      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

      public InputStream getQueryStream(int index) throws IOException
      Specified by:
      getQueryStream in class QuerySource
      Throws:
      IOException
    • getAllQueries

      public List<String> getAllQueries() throws IOException
      Description copied from class: QuerySource
      This method returns all queries in the source as a list of Strings.
      Specified by:
      getAllQueries in class QuerySource
      Returns:
      List of Strings of all queries
      Throws:
      IOException - if the queries could not be read
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class QuerySource