Class QueryBuilders
java.lang.Object
org.hansken.plugin.extraction.hql_lite.lang.human.matcher.QueryBuilders
Query builders.
- Author:
- Netherlands Forensic Institute
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AllHqlMatcherall()Matches all traces.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.AndHqlMatcherand(HqlMatcher... queries) Builds an AndQuery, matching all traces that match all subqueries.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataHqlMatcherdata(HqlMatcher matcher) Builds aDataHqlMatcher, matching thematcherwith the HQL query expanding with the current datastream.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcherOverloaded version ofdataType(String, boolean), with default valuefullMatch = false.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.DataTypeHqlMatcherBuilds 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.NotHqlMatchernot(HqlMatcher matcher) Builds an NotQuery, matching all traces that do not match the subquery.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.OrHqlMatcheror(HqlMatcher... queries) Builds an OrQuery, matching all traces that match any subquery.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcherrange(String min, String max, boolean includesMin, boolean includesMax, boolean fullMatch, String... properties) Overloaded versionrange(BigDecimal, BigDecimal, boolean, boolean, boolean, String...)that convertsminand/ormaxfromStringtoBigDecimal.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcherOverloaded versionrange(String, String, boolean, boolean, boolean, String...)with default valueincludesMin = false.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.NumberRangeHqlMatcherrange(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.NumberRangeHqlMatcherrange(BigDecimal min, BigDecimal max, boolean includesMax, boolean fullMatch, String... properties) Overloaded versionrange(BigDecimal, BigDecimal, boolean, boolean, boolean, String...)with default valueincludesMin = false.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TermHqlMatcherBuilds 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.TermHqlMatcherOverloaded version ofterm(String, boolean, String...), with default valuefullMatch = false.static org.hansken.plugin.extraction.hql_lite.lang.human.matcher.TypeHqlMatchertype(List<HqlMatcher> matchers) Builds a TypeHqlMatcher, matching all traces that have all of the suppliedImmutableTrace.types()equal to the values supplied withmatchers.
-
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 ofterm(String, boolean, String...), with default valuefullMatch = 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 aDataHqlMatcher, matching thematcherwith 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 ofdataType(String, boolean), with default valuefullMatch = 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 suppliedImmutableTrace.types()equal to the values supplied withmatchers.- 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 rangemax- maximum value of the rangeincludesMin- is the min value inclusive(greater than or equal). default true.includesMax- is the max value inclusive(less than or equal)fullMatch- currently does nothingproperties- 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 versionrange(BigDecimal, BigDecimal, boolean, boolean, boolean, String...)with default valueincludesMin = false.- Parameters:
min- minimum value of the rangemax- maximum value of the rangeincludesMax- is the max value inclusive(less than or equal)fullMatch- currently does nothingproperties- 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 versionrange(BigDecimal, BigDecimal, boolean, boolean, boolean, String...)that convertsminand/ormaxfromStringtoBigDecimal.- Parameters:
min- minimum value of the rangemax- maximum value of the rangeincludesMin- is the min value inclusive(greater than or equal). default true.includesMax- is the max value inclusive(less than or equal)fullMatch- currently does nothingproperties- 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 versionrange(String, String, boolean, boolean, boolean, String...)with default valueincludesMin = false.- Parameters:
min- minimum value of the rangemax- maximum value of the rangeincludesMax- is the max value inclusive(less than or equal)fullMatch- currently does nothingproperties- 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
-