diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule10ParametersSpec.java index dcbce9bfbf..25756d8b95 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule20ParametersSpec.java index 8cb38516ef..4239c11b7f 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule5ParametersSpec.java index 5510996799..b82f267e1d 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage30DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule10ParametersSpec.java index af66794734..30d5035b40 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule20ParametersSpec.java index 73d545b62d..719c539499 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule5ParametersSpec.java index 334ddaea6e..c5025cf09d 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage60DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule10ParametersSpec.java index 3365bc4753..f8eecf830d 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule20ParametersSpec.java index 7050f322fb..a481b47625 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule5ParametersSpec.java index 604bea1b21..5f41063c19 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/BetweenPercentMovingAverage7DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/PercentMovingAverageRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/PercentMovingAverageRuleParametersSpec.java index 9aa79377e1..ecfe37d4cc 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/PercentMovingAverageRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/PercentMovingAverageRuleParametersSpec.java @@ -28,7 +28,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule10ParametersSpec.java index cc69a00e80..6bda90da8a 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule20ParametersSpec.java index 40e9597961..9da60490da 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule5ParametersSpec.java index 0b5a9df7f9..ccdda7cfaa 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage30DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule10ParametersSpec.java index be002ed395..d9102b7c29 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule20ParametersSpec.java index 245dc85af2..23ff16c606 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule5ParametersSpec.java index cf5698f642..d2d848bb5d 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage60DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule10ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule10ParametersSpec.java index 189997f3be..47fb57a556 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule10ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule10ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule20ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule20ParametersSpec.java index ac8e8c2e01..3040e0dbfc 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule20ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule20ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule5ParametersSpec.java b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule5ParametersSpec.java index 702e1cea77..09f2966ae0 100644 --- a/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule5ParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/averages/WithinPercentMovingAverage7DaysRule5ParametersSpec.java @@ -27,7 +27,7 @@ import java.util.Objects; /** - * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average of a time window. + * Data quality rule that verifies if a data quality sensor readout value is not above X percent of the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev30DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev30DaysRuleParametersSpec.java index 95e6ac2a68..396f0aa007 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev30DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev30DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev60DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev60DaysRuleParametersSpec.java index f47629b768..f3b26fbfdc 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev60DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev60DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev7DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev7DaysRuleParametersSpec.java index 15e6cda41d..2668146734 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev7DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdev7DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin30DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin30DaysRuleParametersSpec.java index 927465da1b..7ba9283ae4 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin30DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin30DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin60DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin60DaysRuleParametersSpec.java index d6a1d7d317..d6fff16e89 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin60DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin60DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin7DaysRuleParametersSpec.java b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin7DaysRuleParametersSpec.java index ebdfad4966..00520aa272 100644 --- a/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin7DaysRuleParametersSpec.java +++ b/dqops/src/main/java/com/dqops/rules/stdev/MultiplyMovingStdevWithin7DaysRuleParametersSpec.java @@ -29,7 +29,7 @@ /** * Data quality rule that verifies if a data quality sensor readout value - * doesn't excessively deviate from the moving average of a time window. + * doesn't excessively deviate from the moving average within a time window. */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/dqops/src/main/java/com/dqops/utils/docs/checks/check_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/checks/check_documentation.hbs index 0e4c9ecf7e..4ab08c1a96 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/checks/check_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/checks/check_documentation.hbs @@ -1,21 +1,29 @@ -**{{replace primaryCheckName "_" " "}}** checks +# {{replace primaryCheckName "_" " "}} data quality checks {{#if checkSpecClassJavaDoc}} -**Description** {{checkSpecClassJavaDoc}} {{else}} {{/if}} + ___ +The **{{replace primaryCheckName "_" " "}}** data quality check has the following variants for each +[type of data quality](/docs/dqo-concepts/checks/index.md#types-of-checks) checks supported by DQOps. + {{#each allChecks}} -## **{{replace checkName "_" " "}}** +## {{replace checkName "_" " "}} **Check description** + {{checkHelp}} |Check name|Check type|Time scale|Quality dimension|Sensor definition|Quality rule| |----------|----------|----------|-----------------|-----------------|------------| |{{checkName}}|{{checkType}}|{{#if timeScale}}{{timeScale}}{{else}} {{/if}}|{{qualityDimension}}|[{{sensor.sensorName}}](../../../reference/sensors/{{target}}/{{sensor.category}}-{{target}}-sensors.md#{{replace sensor.sensorName "_" "-"}})|[{{rule.ruleName}}](../../../reference/rules/{{capitalizeFirst rule.category}}.md#{{replace rule.ruleName "_" "-"}})| +**Command-line examples** + +Please expand the section below to see the DQOps command-line examples to run or activate the {{replace checkName "_" " "}} data quality check. + ??? example "Managing {{replace checkName "_" " "}} check from DQOps shell" === "Activate check" @@ -42,7 +50,8 @@ ___ dqo> check run -c=connection_name -t=schema_name.table_name -ch={{checkName}} ``` -**Sample configuration (YAML)** +**YAML configuration** + The sample *schema_name.table_name.dqotable.yaml* file with the check configured is shown below. @@ -115,24 +124,31 @@ Expand the *Configure with data grouping* section to see additional examples for {{/if}} {{#if runOnConnectionCliCommand}} **CLI command to run check on connection** + ``` {{runOnConnectionCliCommand}} ``` + {{else}} {{/if}} {{#if runOnTableCliCommand}} **CLI command to run check on table** + ``` {{runOnTableCliCommand}} ``` + {{else}} {{/if}} {{#if runOnColumnCliCommand}} **CLI command to run check on column** + ``` {{runOnColumnCliCommand}} ``` + {{else}} {{/if}} ___ -{{/each}} \ No newline at end of file + +{{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/checks/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/checks/main_page_documentation.hbs index c0e5bc6132..948734579a 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/checks/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/checks/main_page_documentation.hbs @@ -1,6 +1,6 @@ # {{header}} -**{{helpText}}** +{{helpText}} {{#each checkTargets}} {{#if (gt checkTargets.length 1)}}## {{capitalizeFirst this}} checks{{/if}} @@ -13,8 +13,10 @@ |------------|------------|-------------|-------| {{#each allChecks}}|[{{checkName}}](/docs/checks/{{target}}/{{categoryName}}/{{replace primaryCheckName " " "-"}}.md#{{replace checkName "_" "-"}})|{{checkType}}|{{checkHelp}}|{{checkClass}}| {{/each}} + {{/each}} {{else}} {{/if}} {{/each}} + {{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/cli/CliCommandDocumentationGeneratorImpl.java b/dqops/src/main/java/com/dqops/utils/docs/cli/CliCommandDocumentationGeneratorImpl.java index 52b64b0c9c..1a94eb3bf8 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/cli/CliCommandDocumentationGeneratorImpl.java +++ b/dqops/src/main/java/com/dqops/utils/docs/cli/CliCommandDocumentationGeneratorImpl.java @@ -90,6 +90,8 @@ public List createCommandModels() { for (Map.Entry subcommand : firstLevelCommands.entrySet()) { CliRootCommandDocumentationModel rootCommandModel = new CliRootCommandDocumentationModel(); rootCommandModel.setRootCommandName(subcommand.getKey()); + rootCommandModel.setRootCommandHeader(extractRootCommandHeader(subcommand.getValue())); + rootCommandModel.setRootCommandDescription(extractRootCommandDescription(subcommand.getValue())); rootCommands.add(rootCommandModel); collectSubCommands(rootCommandModel, subcommand.getValue()); @@ -98,6 +100,40 @@ public List createCommandModels() { return rootCommands; } + /** + * Retrieves the header from the root command. + * @param commandLine Command line. + * @return Command header. + */ + public String extractRootCommandHeader(CommandLine commandLine) { + CommandLine.Model.CommandSpec commandSpec = commandLine.getCommandSpec(); + + CommandLine.Model.UsageMessageSpec usageMessageSpec = commandSpec.usageMessage(); + String[] header = usageMessageSpec.header(); + if (header == null) { + return null; + } + + return String.join(" ", header); + } + + /** + * Retrieves the description from the root command. + * @param commandLine Command line. + * @return Command description. + */ + public String extractRootCommandDescription(CommandLine commandLine) { + CommandLine.Model.CommandSpec commandSpec = commandLine.getCommandSpec(); + + CommandLine.Model.UsageMessageSpec usageMessageSpec = commandSpec.usageMessage(); + String[] description = usageMessageSpec.description(); + if (description == null) { + return null; + } + + return String.join(" ", description); + } + /** * Create 'dqo' root command used for the documentation. * @return Root commands and their subcommands. diff --git a/dqops/src/main/java/com/dqops/utils/docs/cli/CliRootCommandDocumentationModel.java b/dqops/src/main/java/com/dqops/utils/docs/cli/CliRootCommandDocumentationModel.java index 898a9ec41c..89cc1a46be 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/cli/CliRootCommandDocumentationModel.java +++ b/dqops/src/main/java/com/dqops/utils/docs/cli/CliRootCommandDocumentationModel.java @@ -30,6 +30,16 @@ public class CliRootCommandDocumentationModel { */ private String rootCommandName; + /** + * The header of the root command. + */ + private String rootCommandHeader; + + /** + * The description of the root command. + */ + private String rootCommandDescription; + /** * List of commands. */ diff --git a/dqops/src/main/java/com/dqops/utils/docs/cli/cli_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/cli/cli_documentation.hbs index cb4ea4b9eb..5147a0d034 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/cli/cli_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/cli/cli_documentation.hbs @@ -1,25 +1,38 @@ -# {{rootCommandName}} +# dqo {{rootCommandName}} command +{{rootCommandHeader}} + +{{rootCommandDescription}} + {{#each commands}} + ___ -### **dqo{{#if (and (neq qualifiedName "dqo") (neq qualifiedName ""))}} {{qualifiedName}}{{/if}}** + +## dqo{{#if (and (neq qualifiedName "dqo") (neq qualifiedName ""))}} {{qualifiedName}}{{/if}} {{#each header}} {{this}} {{/each}} + **Description** + {{#each description}} {{this}} {{else}} -For this command description is not added yet. +For this command description is not provided yet. {{/each}} + {{#if (eq rootCommandName "dqo")}} -**Summary (CLI)** +**Command line sample** + ``` $ dqo [root_level_parameter] [command] ``` + **Example** + ``` $ dqo --dqo.cloud.api-key=3242424324242 check run -c=connection_name ``` + {{#if options}} **Options** @@ -31,16 +44,24 @@ $ dqo --dqo.cloud.api-key=3242424324242 check run -c=connection_name {{else}} {{/if}} {{else}} + **Command-line synopsis** + ``` $ dqo [dqo options...]{{{synopsis}}} ``` -**DQOps Shell synopsis** + +**DQOps shell synopsis** + ``` dqo>{{{synopsis}}} ``` + {{#if options}} -**Options** + +**Command options** + +All parameters supported by the command are listed below. | Command argument     | Description | Required | Accepted values | |-----------------------------------------------|-------------|:-----------------:|-----------------| @@ -50,4 +71,5 @@ dqo>{{{synopsis}}} {{else}} {{/if}} {{/if}} -{{/each}} \ No newline at end of file + +{{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/cli/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/cli/main_page_documentation.hbs index f47ba9ba8c..8bf91b192f 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/cli/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/cli/main_page_documentation.hbs @@ -1,10 +1,13 @@ -# Command-line interface -___ -**This is a list of the CLI commands in DQOps broken down by category and a brief description of what they do.** +# DQOps command-line interface +All command-line commands supported from the DQOps shell or directly from the system command prompt are listed below. + + {{#each allCommands}} ## {{rootCommandName}} | Command name | Description | |--------------|-------------| {{#each commands}} | {{#if (or (eq qualifiedName "") (eq qualifiedName "dqo"))}} [dqo](./{{rootCommandName}}.md#dqo){{else}}[dqo {{qualifiedName}}](./{{rootCommandName}}.md#dqo-{{slugify qualifiedName}}){{/if}} | {{#each description}}{{this}}{{else}}For this command description is not added yet.{{/each}} | {{/each}} + + {{/each}} \ No newline at end of file diff --git a/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/main_page_documentation.hbs index b49303eb0c..4e75e9d512 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/main_page_documentation.hbs @@ -1,6 +1,8 @@ -# Parquet files +# Parquet files supported by DQOps +The list of parquet tables used by DQOps to store data quality results in the *[$DQO_USER_HOME](/docs/dqo-concepts/home-folders/dqops-user-home.md)/.data* folder is listed below. -**This is a list of parquet file types in DQOps.** + +## List of supported parquet tables | Parquet file table | Description | |--------------------|-------------| diff --git a/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/parquetfiles_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/parquetfiles_documentation.hbs index d1aecb48fc..66038f2471 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/parquetfiles_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/parquetfiles/parquetfiles_documentation.hbs @@ -1,4 +1,5 @@ -# {{parquetFileFullName}} +# DQOps {{parquetFileFullName}} parquet table schema +The parquet file schema for the {{parquetFileFullName}} table stored in the *$DQO_USER_HOME/.data/{{parquetFileFullName}}* folder in DQOps. ## Table description diff --git a/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModel.java b/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModel.java index 850c94224f..930fbca99f 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModel.java +++ b/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModel.java @@ -56,4 +56,9 @@ public class RuleDocumentationModel { * Rule definition wrapper. */ private RuleDefinitionWrapper definition; + + /** + * The source code of the rule (Python). + */ + private String pythonSourceCode; } diff --git a/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModelFactoryImpl.java b/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModelFactoryImpl.java index 519d454f97..9cc4ec6069 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModelFactoryImpl.java +++ b/dqops/src/main/java/com/dqops/utils/docs/rules/RuleDocumentationModelFactoryImpl.java @@ -90,6 +90,7 @@ public RuleDocumentationModel createRuleDocumentation(AbstractRuleParametersSpec documentationModel.setRuleExample(loadRuleExample(ruleParts[0], ruleParts[1])); documentationModel.setDefinition(ruleDefinitionWrapper); + documentationModel.setPythonSourceCode(ruleDefinitionWrapper.getRulePythonModuleContent().getTextContent().replace("\n", "\n ")); List fieldsForRuleParameters = this.specToModelCheckMappingService.createFieldsForRuleParameters(ruleParametersSpec); ParameterDefinitionsListSpec fieldDefinitionsList = new ParameterDefinitionsListSpec(); @@ -111,7 +112,7 @@ public String loadRuleExample(String ruleCategory, String ruleName) { try { List read = Files.readAllLines(path); - return String.join("\n", read); + return String.join("\n ", read); } catch (IOException e) { System.err.println("Cannot load rule example from file: " + path + ", error: " + e.getMessage() + ", " + e); return null; diff --git a/dqops/src/main/java/com/dqops/utils/docs/rules/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/rules/main_page_documentation.hbs index 56db027d26..248cd29575 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/rules/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/rules/main_page_documentation.hbs @@ -1,9 +1,8 @@ -# Rules - -**This is a list of the rules in DQOps broken down by category and a brief description of what they do.** +# Data quality rules supported by DQOps +The full list of data quality rules supported by DQOps. The source code is found in the *[$DQO_HOME](/docs/dqo-concepts/architecture/dqops-architecture.md#dqops-home)/rules/* folder in the DQOps distribution. {{#each rules}} -### **{{category}}** +## {{category}} rules | Rule name | Description | |-----------|-------------| diff --git a/dqops/src/main/java/com/dqops/utils/docs/rules/rule_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/rules/rule_documentation.hbs index 4eeebcefae..61979f5be1 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/rules/rule_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/rules/rule_documentation.hbs @@ -1,32 +1,46 @@ -# {{category}} -___ +# Data quality {{category}} rules +The list of {{category}} [data quality rules](/docs/dqo-concepts/rules/rules.md) supported by DQOps. The source code is found in the *[$DQO_HOME](/docs/dqo-concepts/architecture/dqops-architecture.md#dqops-home)/rules/{{category}}* folder in the DQOps distribution. + {{#each ruleDocumentationModels}} -## **{{replace ruleName "_" " "}}** -**Full rule name** -``` -{{fullRuleName}} -``` -**Description** +--- + +## {{replace ruleName "_" " "}} {{ruleParametersJavaDoc}} + +**Rule summary** + +The {{replace ruleName "_" " "}} data quality rule is described below. + +| Category | Full rule name | Rule specification source code | Python source code | +| ---------|----------------|--------------------|--------------------| +| {{category}} | `{{fullRuleName}}` | [Rule configuration](https://github.com/dqops/dqo/blob/develop/home/rules/{{fullRuleName}}.dqorule.yaml) | [Python code](https://github.com/dqops/dqo/blob/develop/home/rules/{{fullRuleName}}.py) | + {{#if definition.spec.fields}} -**Parameters** +**Rule parameters** + +The parameters passed to the rule are shown below. | Field name | Description | Allowed data type | Required | Allowed values | |------------|-------------|-------------------|-----------------|----------------| -{{#each definition.spec.fields}}|{{displayName}}|{{helpText}}|{{replace dataType "_type" ""}}|{{checkmark required}}|{{#each allowedValues}}{{this}}
{{/each}}| +{{#each definition.spec.fields}}|`{{displayName}}`|{{helpText}}|{{replace dataType "_type" ""}}|{{checkmark required}}|{{#each allowedValues}}{{this}}
{{/each}}| {{/each}} {{else}} {{/if}} + {{#if ruleExample}} **Rule definition YAML** The rule definition YAML file *{{fullRuleName}}.dqorule.yaml* with the time window and rule parameters configuration is shown below. -```yaml -{{ruleExample}} -``` +??? abstract "Please expand to see the content of the .dqorule.yaml file" + + ```yaml + {{{ruleExample}}} + ``` + {{else}} {{/if}} + {{#if definition.spec.parameters}} **Additional rule parameters** @@ -36,28 +50,33 @@ The rule definition YAML file *{{fullRuleName}}.dqorule.yaml* with the time wind {{/each}} {{else}} {{/if}} -**Rule implementation (Python)** - -The code sample below shows the content of the *{{fullRuleName}}.py* file. The *evaluate_rule* function at the bottom evaluates the sensor result and returns the rule evaluation result. - -```python -{{{replace definition.rulePythonModuleContent.textContent '# -# Copyright © 2021 DQOps (support@dqops.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -' ""}}} -``` -___ -{{/each}} \ No newline at end of file + +**Rule source code** + +Please expand the section below to see the Python source code for the *{{fullRuleName}}* rule. +The file is found in the *[$DQO_HOME](/docs/dqo-concepts/architecture/dqops-architecture.md#dqops-home)/rules/{{fullRuleName}}.py* file in the DQOps distribution. + +??? abstract "Rule source code" + + ```python + {{{replace pythonSourceCode '# + # Copyright © 2021 DQOps (support@dqops.com) + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + + ' ""}}} + ``` + + +{{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/sensors/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/sensors/main_page_documentation.hbs index 58b831c0f4..2906470d9c 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/sensors/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/sensors/main_page_documentation.hbs @@ -3,7 +3,9 @@ **{{helpText}}** {{#each sensorTargets}} -{{#if (gt sensorTargets.length 1)}}## {{capitalizeFirst this}} sensors{{/if}} +{{#if (gt sensorTargets.length 1)}} +## {{capitalizeFirst this}} sensors{{/if}} + {{#each sensors}} {{#if (eq target ../this)}} ### **{{category}}** @@ -15,4 +17,5 @@ {{else}} {{/if}} {{/each}} -{{/each}} \ No newline at end of file + +{{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/sensors/sensor_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/sensors/sensor_documentation.hbs index ce94ceafca..8b7642445d 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/sensors/sensor_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/sensors/sensor_documentation.hbs @@ -1,30 +1,46 @@ +# Data quality {{replace category "_" " "}} sensors +All [data quality sensors](/docs/dqo-concepts/sensors/sensors.md) in the **{{replace category "_" " "}}** category supported by DQOps are listed below. Those sensors are measured on a {{target}} level. + +--- + {{#each collectedSensors}} -## **{{replace sensorName "_" " "}}** -**Full sensor name** -``` -{{fullSensorName}} -``` -**Description** +## {{replace sensorName "_" " "}} {{sensorParametersJavaDoc}} + +**Sensor summary** + +The {{replace sensorName "_" " "}} sensor is documented below. + +| Target | Category | Full sensor name | Source code on GitHub | +|--------|----------|------------------|-----------------------| +| {{target}} | {{category}} | `{{fullSensorName}}` | [sensors/{{target}}/{{category}}](https://github.com/dqops/dqo/tree/develop/home/sensors/{{target}}/{{category}}/) | + {{#if definition.spec.fields}} -**Parameters** +**Sensor parameters** | Field name | Description | Allowed data type | Required | Allowed values | |------------|-------------|-------------------|-----------------|----------------| -{{#each definition.spec.fields}}|{{displayName}}|{{helpText}}|{{replace dataType "_type" ""}}|{{#if required}}Yes{{else}} {{/if}}|{{#each allowedValues}}{{this}}
{{/each}}| +{{#each definition.spec.fields}}|`{{displayName}}`|{{helpText}}|{{replace dataType "_type" ""}}|{{#if required}}Yes{{else}} {{/if}}|{{#each allowedValues}}{{this}}
{{/each}}| {{/each}} {{else}} {{/if}} + {{#if definition.spec.parameters}} **Additional sensor definition parameters** +The additional parameters that can be passed to the sensor are shown below. + | Parameters name | Value | |-----------------|-------| {{#each definition.spec.parameters}}|{{@key}}|{{this}}| {{/each}} {{else}} {{/if}} -**SQL Template (Jinja2)** + +**Jinja2 SQL templates** + +The templates used to generate the SQL query for each data source supported by DQOps is shown below. + {{#each sqlTemplates~}} === "{{@key.providerTypeDisplayName}}" @@ -34,5 +50,8 @@ {{/each~}} ``` {{/each~}} + ___ -{{/each}} \ No newline at end of file + + +{{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/docs/yaml/main_page_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/yaml/main_page_documentation.hbs index 64b822022f..eee006969f 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/yaml/main_page_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/yaml/main_page_documentation.hbs @@ -7,7 +7,7 @@ {{helpText}} {{#if superiorObjects}} -**The structure of this object is described below** +The structure of this object is described below | Property name | Type                     | |---------------|--------------------------| diff --git a/dqops/src/main/java/com/dqops/utils/docs/yaml/yaml_documentation.hbs b/dqops/src/main/java/com/dqops/utils/docs/yaml/yaml_documentation.hbs index 6d44c55dd3..345f6ed9b8 100644 --- a/dqops/src/main/java/com/dqops/utils/docs/yaml/yaml_documentation.hbs +++ b/dqops/src/main/java/com/dqops/utils/docs/yaml/yaml_documentation.hbs @@ -1,3 +1,6 @@ +# DQOps YAML file definitions +The definition of YAML files used by DQOps to configure the data sources, monitored tables, and the configuration of activated data quality checks. + {{#each classObjects}} ## {{classSimpleName}} {{classDescription}} @@ -18,7 +21,7 @@ {{else}} {{#if (eq classSimpleName "DashboardListSpec")}} {{else}} -**The structure of this object is described below** +The structure of this object is described below | Property name | Description                     | Data type | Enum values | Default value | Sample values | |---------------|---------------------------------|-----------|-------------|---------------|---------------| @@ -33,4 +36,5 @@ {{/if}} {{/if}} ___ + {{/each}} diff --git a/dqops/src/main/java/com/dqops/utils/reflection/ClassInfo.java b/dqops/src/main/java/com/dqops/utils/reflection/ClassInfo.java index 78d1d08cbc..32dafc01e5 100644 --- a/dqops/src/main/java/com/dqops/utils/reflection/ClassInfo.java +++ b/dqops/src/main/java/com/dqops/utils/reflection/ClassInfo.java @@ -31,16 +31,19 @@ public class ClassInfo { private final Class reflectedClass; private final Constructor constructor; private final List fields = new ArrayList<>(); + private final String metaDescription; /** * Creates a class reflection info, storing the class type. * * @param reflectedClass Target class type. - * @param constructor + * @param constructor The default parameterless constructor. + * @param metaDescription Metadata description of the class to be used for documentation. */ - public ClassInfo(Class reflectedClass, Constructor constructor) { + public ClassInfo(Class reflectedClass, Constructor constructor, String metaDescription) { this.reflectedClass = reflectedClass; this.constructor = constructor; + this.metaDescription = metaDescription; } /** @@ -67,6 +70,14 @@ public List getFields() { return fields; } + /** + * Returns the meta description content to be used to document this object. + * @return Meta description. + */ + public String getMetaDescription() { + return metaDescription; + } + /** * Retrieves a field given the class field name. * @param classFieldName Field's name in the Java class. diff --git a/dqops/src/main/java/com/dqops/utils/reflection/MetaDescription.java b/dqops/src/main/java/com/dqops/utils/reflection/MetaDescription.java new file mode 100644 index 0000000000..06a4011381 --- /dev/null +++ b/dqops/src/main/java/com/dqops/utils/reflection/MetaDescription.java @@ -0,0 +1,34 @@ +/* + * Copyright © 2021 DQOps (support@dqops.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.dqops.utils.reflection; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation for classes that returns the test used in the meta description of documentation pages. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface MetaDescription { + /** + * The content of the meta description tag to be used in the documentation. + * @return Meta description content. + */ + String values(); +} diff --git a/dqops/src/main/java/com/dqops/utils/reflection/ReflectionServiceImpl.java b/dqops/src/main/java/com/dqops/utils/reflection/ReflectionServiceImpl.java index f6c486916e..9ef821b877 100644 --- a/dqops/src/main/java/com/dqops/utils/reflection/ReflectionServiceImpl.java +++ b/dqops/src/main/java/com/dqops/utils/reflection/ReflectionServiceImpl.java @@ -83,8 +83,10 @@ protected ClassInfo reflectClass(Class targetClass) { Optional> parameterlessConstructor = Arrays.stream(constructors) .filter(c -> c.getParameterCount() == 0) .findFirst(); + String metaDescription = targetClass.isAnnotationPresent(MetaDescription.class) ? + targetClass.getAnnotation(MetaDescription.class).values() : null; - ClassInfo classInfo = new ClassInfo(targetClass, parameterlessConstructor.orElse(null)); + ClassInfo classInfo = new ClassInfo(targetClass, parameterlessConstructor.orElse(null), metaDescription); Class reflectedClass = targetClass; while (reflectedClass != Object.class) {