From 3ce2849a2ac25ddb0d1ddb6e353957c4df308fe3 Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Thu, 19 Dec 2024 14:58:10 +0100 Subject: [PATCH] fix: Imports for documentation examples --- .../modules/rql/pages/developer-guide.adoc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/documentation/modules/rql/pages/developer-guide.adoc b/documentation/modules/rql/pages/developer-guide.adoc index a3ce5107..028793c7 100644 --- a/documentation/modules/rql/pages/developer-guide.adoc +++ b/documentation/modules/rql/pages/developer-guide.adoc @@ -5,7 +5,8 @@ [[rql-parser]] == RQL Parser -This Maven module contains the antlr4 grammar and the Bosch Semantic Stack RQL parser to create the _RqlQueryModel_ from a string or vice versa. For more information on antlr4, refer to https://github.com/antlr/grammars-v4[^]. +This Maven module contains the antlr4 grammar and the Bosch Semantic Stack RQL parser to create the _RqlQueryModel_ from a string or vice versa. +For more information on antlr4, refer to https://github.com/antlr/grammars-v4[^]. The parser is the central tool that uses antlr4 code to analyze RQL queries and convert them into an _RqlQueryModel_. Therefore, this module enables the interpretation of RQL queries in string format and transforms them into an internal model (RqlQueryModel) that can be further processed. @@ -192,7 +193,8 @@ This can be expressed elegantly using the following construct: <1> The original Query may well have defined it's own slice (e.g. [25:701]) this is honored throughout the process. <2> Always exists in models generated by `Rql.getPagedQuery`. <3> Continue requesting as long as a) the remote service returns as many items as requested and b) there are still more items to be requested in the original query. -<4> The deferral is needed so another request is only made after we get to this element. Otherwise, a `.take(15)` further up the stream would not take effect until all elements had been fetched. +<4> The deferral is needed so another request is only made after we get to this element. +Otherwise, a `.take(15)` further up the stream would not take effect until all elements had been fetched. [[rql-query-dsl]] == RQL to QueryDSL @@ -233,7 +235,8 @@ The bridge currently supports the operators: Top-level attributes, nested attributes, and collections of attributes can be referenced in query expressions. -In the following example, filters are defined on attributes of a `Person` entity. This `Person` entity has a `firstName` top-level attribute, an attribute `addresses` that references a sub-entity of type `Address` and a list of `Hobby` entities. +In the following example, filters are defined on attributes of a `Person` entity. +This `Person` entity has a `firstName` top-level attribute, an attribute `addresses` that references a sub-entity of type `Address` and a list of `Hobby` entities. ---- filter=eq(firstName,"John") @@ -241,7 +244,7 @@ filter=eq(address.zipCode,1234) filter=like(hobbies.description,"?iking*") ---- -If there are multiple constraints on entries of a collection, all constraints are applied to each entry. +If there are multiple constraints on entries of a collection, all constraints are applied to each entry. That means the following query matches persons who have a hobby with the name "ships" and that hobby's description contains "?iking*": @@ -352,9 +355,9 @@ As of now the transformation process is not completely independent of the underl [source,java] ---- -import com.bosch.bci.rql.model.v1.IQueryModel; -import com.bosch.bci.rql.parser.v1.RqlParser; -import querydsl.rql.com.boschsemanticstack.QueryModelToQueryDSL; +import com.boschsemanticstack.rql.model.v1.RqlQueryModel; +import com.boschsemanticstack.rql.parser.v1.RqlParser; +import com.boschsemanticstack.rql.querydsl.QueryModelToQueryDSL; import com.querydsl.core.types.Predicate; public void example() {