Class FileBasedQueryList

java.lang.Object
org.aksw.iguana.cc.query.list.FileBasedQueryList
All Implemented Interfaces:
QueryList
Direct Known Subclasses:
FileCachingQueryList, FileReadingQueryList

public abstract class FileBasedQueryList extends Object implements QueryList
The abstract class for a QueryList. A query list provides the queries to the QueryHandler.
Author:
frensing
  • Field Details

    • querySource

      protected final QuerySource querySource
      This is the QuerySource from which the queries should be retrieved.
  • Constructor Details

    • FileBasedQueryList

      public FileBasedQueryList(QuerySource querySource)
  • Method Details

    • size

      public int size()
      This method returns the amount of queries in the query list.
      Specified by:
      size in interface QueryList
      Returns:
      The amount of queries in the query list
    • hashCode

      public int hashCode()
      This method returns the hashcode of the query list which is the hashcode of the query source.
      Specified by:
      hashCode in interface QueryList
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode of the query list
    • getQuery

      public abstract String getQuery(int index) throws IOException
      This method returns a query at the given index.
      Specified by:
      getQuery in interface QueryList
      Parameters:
      index - Index of the query in the list
      Returns:
      The query at the given index
      Throws:
      IOException
    • getQueryStream

      public abstract InputStream getQueryStream(int index) throws IOException
      Specified by:
      getQueryStream in interface QueryList
      Throws:
      IOException