Skip to content
Snippets Groups Projects
Commit da0927ab authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Merge branch 'feat/dmnapp/purehtmljs' into 'develop'

Feat/dmnapp/purehtmljs

See merge request jonasblatt/ma-jonasblatt-dmn-verifier!9
parents d5299874 ed57c077
No related branches found
No related tags found
No related merge requests found
Showing
with 68 additions and 21 deletions
......@@ -161,11 +161,11 @@ public class VDmnFunctions {
return true;
}
for (int i = 0; i < oneRule.getDmnOutputValues().size(); i++) {
if (oneRule
if (!oneRule
.getDmnOutputValues()
.get(i)
.getText()
.equals(otherRule.getDmnOutputValues().get(0).getText())) {
.equals(otherRule.getDmnOutputValues().get(i).getText())) {
return true;
}
}
......
......@@ -6,18 +6,29 @@ import de.unikoblenz.fgbks.base.domain.Name;
public abstract class AbstractClassificationType implements ClassificationType {
protected Name name;
protected Name niceName;
protected Description description;
protected AbstractClassificationType(Name name, Description description) {
protected AbstractClassificationType(Name name, Name niceName, Description description) {
this.name = name;
this.niceName = niceName;
this.description = description;
}
protected AbstractClassificationType(Name name, Description description) {
this(name, new Name(name), description);
}
@Override
public Name getName() {
return name;
}
@Override
public Name getNiceName() {
return niceName;
}
@Override
public Description getDescription() {
return description;
......
......@@ -12,6 +12,10 @@ public interface ClassificationType extends Serializable {
@JsonbProperty("name")
Name getName();
@NotNull
@JsonbProperty("niceName")
Name getNiceName();
@NotNull
@JsonbProperty("description")
Description getDescription();
......
......@@ -10,7 +10,7 @@ public class DecisionLogicLevelVerification extends AbstractClassificationType {
new DecisionLogicLevelVerification();
private DecisionLogicLevelVerification() {
super(new Name("DecisionLogic"), new Description("test")); // TODO
super(new Name("DecisionLogic"), new Name("Decision Logic"), new Description("test")); // TODO
}
public static DecisionLogicLevelVerification getInstance() {
......
......@@ -6,11 +6,10 @@ import de.unikoblenz.fgbks.base.domain.Name;
@Classification
public class DrdModelingLevelVerification extends AbstractClassificationType {
private static final DrdModelingLevelVerification instance =
new DrdModelingLevelVerification();
private static final DrdModelingLevelVerification instance = new DrdModelingLevelVerification();
private DrdModelingLevelVerification() {
super(new Name("DrdModeling"), new Description("test")); // TODO
super(new Name("DrdModeling"), new Name("DRD Modeling"), new Description("test")); // TODO
}
public static DrdModelingLevelVerification getInstance() {
......
......@@ -32,8 +32,7 @@ public class PartialReductionVerifier extends AbstractVerifier {
List<List<VDmnRule>> identicalOutputCluster =
VDmnFunctions.getRuleClustersWithIdenticalOutput(dmnDecisionTable);
List<VDmnInputColumn> inColumns = dmnDecisionTable.getInputColumns();
identicalOutputCluster.stream() // do: parallelStream() ?
.forEach(c -> findPartialReduction(inColumns, 0, c, false));
identicalOutputCluster.forEach(c -> findPartialReduction(inColumns, 0, c, false));
}
private void findPartialReduction(
......@@ -46,7 +45,7 @@ public class PartialReductionVerifier extends AbstractVerifier {
VerificationResultEntryElement.create(inColumns.get(0).getDmnDecisionTable())
.withIdentifier(rule.getRuleId())));
vreFactory.addVerificationFix(SHOW_RULES);
vreFactory.addToEntry(VerificationClassification.WARNING, "PartialReduction");
vreFactory.addToEntry(VerificationClassification.INFO, "PartialReduction");
}
} else {
List<VDmnInputValue> rules =
......
......@@ -7,18 +7,29 @@ import java.util.Objects;
public abstract class AbstractVerificationType implements VerificationType {
protected Name name;
protected Name niceName;
protected Description description;
protected AbstractVerificationType(Name name, Description description) {
protected AbstractVerificationType(Name name, Name niceName, Description description) {
this.name = name;
this.niceName = niceName;
this.description = description;
}
protected AbstractVerificationType(Name name, Description description) {
this(name, new Name(name), description);
}
@Override
public Name getName() {
return name;
}
@Override
public Name getNiceName() {
return niceName;
}
@Override
public Description getDescription() {
return description;
......
......@@ -12,7 +12,10 @@ public class DateVerification extends AbstractVerificationType {
private static final DateVerification instance = new DateVerification();
private DateVerification() {
super(new Name("DateFormatCheck"), new Description("test")); // TODO
super(
new Name("DateFormatVerification"),
new Name("Date Format Check"),
new Description("test")); // TODO
}
public static DateVerification getInstance() {
......
......@@ -12,7 +12,10 @@ public class EmptyOutputVerification extends AbstractVerificationType {
private static final EmptyOutputVerification instance = new EmptyOutputVerification();
private EmptyOutputVerification() {
super(new Name("EmptyOutputVerification"), new Description("test")); // TODO
super(
new Name("EmptyOutputVerification"),
new Name("Empty Output"),
new Description("test")); // TODO
}
public static EmptyOutputVerification getInstance() {
......
......@@ -12,7 +12,10 @@ public class EquivalentStringVerification extends AbstractVerificationType {
private static final EquivalentStringVerification instance = new EquivalentStringVerification();
private EquivalentStringVerification() {
super(new Name("EquivalentStringVerification"), new Description("test")); // TODO
super(
new Name("EquivalentStringVerification"),
new Name("Equivalent Strings"),
new Description("test")); // TODO
}
public static EquivalentStringVerification getInstance() {
......
......@@ -13,7 +13,7 @@ public class IdenticalBusinessRuleVerification extends AbstractVerificationType
new IdenticalBusinessRuleVerification();
private IdenticalBusinessRuleVerification() {
super(new Name("IdenticalBusinessRuleVerification"), new Description("test")); // TODO
super(new Name("Identical Rules"), new Description("test")); // TODO
}
public static IdenticalBusinessRuleVerification getInstance() {
......
......@@ -14,6 +14,7 @@ public class InputValueSyntaxVerification extends AbstractVerificationType {
private InputValueSyntaxVerification() {
super(
new Name("InputValueSyntaxVerification"),
new Name("Input Value Syntax Check"),
new Description("Check values for syntactical correctness."));
}
......
......@@ -14,6 +14,7 @@ public class LonelyDataInputVerification extends AbstractVerificationType {
private LonelyDataInputVerification() {
super(
new Name("LonelyDataInputVerification"),
new Name("Lonely Data Input"),
new Description(
"Checks for any input data node, if it has no connection to at least one decision table."));
}
......
......@@ -15,8 +15,8 @@ public class MissingInputColumnVerification extends AbstractVerificationType {
private MissingInputColumnVerification() {
super(
new Name("MissingInputColumnVerification"),
new Description(
"todo")); // TODO englisch
new Name("Missing Input Column"),
new Description("todo")); // TODO
}
public static MissingInputColumnVerification getInstance() {
......
......@@ -15,8 +15,9 @@ public class MissingInputDataVerification extends AbstractVerificationType {
private MissingInputDataVerification() {
super(
new Name("MissingInputDataVerification"),
new Name("Missing Input Data"),
new Description(
"todo")); // TODO englisch
"todo")); // TODO
}
public static MissingInputDataVerification getInstance() {
......
......@@ -12,7 +12,10 @@ public class MissingRuleVerification extends AbstractVerificationType {
private static final MissingRuleVerification instance = new MissingRuleVerification();
private MissingRuleVerification() {
super(new Name("MissingRuleVerification"), new Description("test")); // TODO
super(
new Name("MissingRuleVerification"),
new Name("Missing Rule"),
new Description("test")); // TODO
}
public static MissingRuleVerification getInstance() {
......
......@@ -12,7 +12,10 @@ public class OverlappingVerification extends AbstractVerificationType {
private static final OverlappingVerification instance = new OverlappingVerification();
private OverlappingVerification() {
super(new Name("OverlappingVerification"), new Description("test")); // TODO
super(
new Name("OverlappingVerification"),
new Name("Overlapping Rules"),
new Description("test")); // TODO
}
public static OverlappingVerification getInstance() {
......
......@@ -12,7 +12,10 @@ public class PartialReductionVerification extends AbstractVerificationType {
private static final PartialReductionVerification instance = new PartialReductionVerification();
private PartialReductionVerification() {
super(new Name("PartialReductionVerification"), new Description("test")); // TODO
super(
new Name("PartialReductionVerification"),
new Name("Partial Reductions"),
new Description("test")); // TODO
}
public static PartialReductionVerification getInstance() {
......
......@@ -14,6 +14,7 @@ public class PredefinedExistingValueVerification extends AbstractVerificationTyp
private PredefinedExistingValueVerification() {
super(
new Name("PredefinedExistingValueVerification"),
new Name("Predefined Existing Values"),
new Description(
"Es gibt in einer Tabellen-Zelle einen String Value, der aber nicht in der Liste der "
+ "Predefines Values vorgesehen ist.")); // TODO englisch
......
......@@ -15,6 +15,7 @@ public class PredefinedMissingValueVerification extends AbstractVerificationType
private PredefinedMissingValueVerification() {
super(
new Name("PredefinedMissingValueVerification"),
new Name("Predefined Missing Values"),
new Description(
"Es gibt in einer Tabellen-Zelle predefines values, die jedoch nicht in der spalte vorhanden sind.")); // TODO englisch
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment