java.lang.Object
org.hansken.plugin.extraction.hql_lite.lang.human.matcher.QueryBuilders

public final class QueryBuilders extends Object
Query builders.
Author:
Netherlands Forensic Institute
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AllHqlMatcher
    all()
    Matches all traces.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AndHqlMatcher
    and(HqlMatcher... queries)
    Builds an AndQuery, matching all traces that match all subqueries.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataHqlMatcher
    data(HqlMatcher matcher)
    Builds a DataHqlMatcher, matching the matcher with the HQL query expanding with the current datastream.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcher
    Overloaded version of dataType(String, boolean), with default value fullMatch = false.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcher
    dataType(String value, boolean fullMatch)
    Builds a DataHqlMatcher, matching all traces where the dataType is equal to the supplied value(s).
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NotHqlMatcher
    not(HqlMatcher matcher)
    Builds an NotQuery, matching all traces that do not match the subquery.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.OrHqlMatcher
    or(HqlMatcher... queries)
    Builds an OrQuery, matching all traces that match any subquery.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher
    range(String min, String max, boolean includesMin, boolean includesMax, boolean fullMatch, String... properties)
    Overloaded version range(BigDecimal, BigDecimal, boolean, boolean, boolean, String...) that converts min and/or max from String to BigDecimal.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher
    range(String min, String max, boolean includesMax, boolean fullMatch, String... properties)
    Overloaded version range(String, String, boolean, boolean, boolean, String...) with default value includesMin = false.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher
    range(BigDecimal min, BigDecimal max, boolean includesMin, boolean includesMax, boolean fullMatch, String... properties)
    Builds a RangeQuery, matching all traces that have any of the supplied properties within a range of values.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher
    range(BigDecimal min, BigDecimal max, boolean includesMax, boolean fullMatch, String... properties)
    Overloaded version range(BigDecimal, BigDecimal, boolean, boolean, boolean, String...) with default value includesMin = false.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TermHqlMatcher
    term(String value, boolean fullMatch, String... properties)
    Builds a TermQuery, matching all traces that have any of the supplied properties equal to the supplied value(s).
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TermHqlMatcher
    term(String value, String... properties)
    Overloaded version of term(String, boolean, String...), with default value fullMatch = false.
    static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TypeHqlMatcher
    type(List<HqlMatcher> matchers)
    Builds a TypeHqlMatcher, matching all traces that have all of the supplied ImmutableTrace.types() equal to the values supplied with matchers.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • all

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AllHqlMatcher all()
      Matches all traces.
      Returns:
      AllQuery
    • term

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TermHqlMatcher term(String value, boolean fullMatch, String... properties)
      Builds a TermQuery, matching all traces that have any of the supplied properties equal to the supplied value(s).
      Parameters:
      value - the value against which the set propertie(s) should be matched. a string with optional wildcards(? *).
      fullMatch - whether to match full(treating wildcards as string literals), untokenized string values, default false.
      properties - the properties to match.
      Returns:
      TermQuery
    • term

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TermHqlMatcher term(String value, String... properties)
      Overloaded version of term(String, boolean, String...), with default value fullMatch = false.
      Parameters:
      value - the value against which the set propertie(s) should be matched. a string with optional wildcards(? *).
      properties - the properties to match.
      Returns:
      TermQuery
    • data

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataHqlMatcher data(HqlMatcher matcher)
      Builds a DataHqlMatcher, matching the matcher with the HQL query expanding with the current datastream.
      Parameters:
      matcher - the properties to match.
      Returns:
      DataHqlMatcher
    • dataType

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcher dataType(String value, boolean fullMatch)
      Builds a DataHqlMatcher, matching all traces where the dataType is equal to the supplied value(s).
      Parameters:
      value - the value against which the set propertie(s) should be matched. a string with optional wildcards(? *).
      fullMatch - whether to match full(treating wildcards as string literals), untokenized string values, default false.
      Returns:
      DataTypeHqlMatcher
    • dataType

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcher dataType(String value)
      Overloaded version of dataType(String, boolean), with default value fullMatch = false.
      Parameters:
      value - the value against which the set propertie(s) should be matched. a string with optional wildcards(? *).
      Returns:
      DataTypeHqlMatcher
    • type

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TypeHqlMatcher type(List<HqlMatcher> matchers)
      Builds a TypeHqlMatcher, matching all traces that have all of the supplied ImmutableTrace.types() equal to the values supplied with matchers.
      Parameters:
      matchers - a list of matchers for every type we want to match on
      Returns:
      TypesHqlMatcher
    • range

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher range(BigDecimal min, BigDecimal max, boolean includesMin, boolean includesMax, boolean fullMatch, String... properties)
      Builds a RangeQuery, matching all traces that have any of the supplied properties within a range of values.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
      includesMin - is the min value inclusive(greater than or equal). default true.
      includesMax - is the max value inclusive(less than or equal)
      fullMatch - currently does nothing
      properties - the properties to match.
      Returns:
      RangeQuery
    • range

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher range(BigDecimal min, BigDecimal max, boolean includesMax, boolean fullMatch, String... properties)
      Overloaded version range(BigDecimal, BigDecimal, boolean, boolean, boolean, String...) with default value includesMin = false.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
      includesMax - is the max value inclusive(less than or equal)
      fullMatch - currently does nothing
      properties - the properties to match.
      Returns:
      RangeQuery
    • range

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher range(String min, String max, boolean includesMin, boolean includesMax, boolean fullMatch, String... properties)
      Overloaded version range(BigDecimal, BigDecimal, boolean, boolean, boolean, String...) that converts min and/or max from String to BigDecimal.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
      includesMin - is the min value inclusive(greater than or equal). default true.
      includesMax - is the max value inclusive(less than or equal)
      fullMatch - currently does nothing
      properties - the properties to match.
      Returns:
      RangeQuery
    • range

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcher range(String min, String max, boolean includesMax, boolean fullMatch, String... properties)
      Overloaded version range(String, String, boolean, boolean, boolean, String...) with default value includesMin = false.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
      includesMax - is the max value inclusive(less than or equal)
      fullMatch - currently does nothing
      properties - the properties to match.
      Returns:
      RangeQuery
    • and

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AndHqlMatcher and(HqlMatcher... queries)
      Builds an AndQuery, matching all traces that match all subqueries.
      Parameters:
      queries - the queries to match.
      Returns:
      AndQuery
    • or

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.OrHqlMatcher or(HqlMatcher... queries)
      Builds an OrQuery, matching all traces that match any subquery.
      Parameters:
      queries - the queries to match.
      Returns:
      OrQuery
    • not

      public static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NotHqlMatcher not(HqlMatcher matcher)
      Builds an NotQuery, matching all traces that do not match the subquery.
      Parameters:
      matcher - the query not to match.
      Returns:
      NotQuery