use of org.drools.workbench.models.datamodel.rule.IFactPattern in project drools-wb by kiegroup.
the class BRLConditionColumnSynchronizer method doDelete.
private void doDelete(final BRLConditionVariableColumn column) {
final int iFirstColumnIndex = model.getExpandedColumns().indexOf(column);
synchroniseDeleteColumn(iFirstColumnIndex);
final BRLConditionColumn brlColumn = model.getBRLColumn(column);
brlColumn.getChildColumns().remove(column);
for (IPattern iPattern : brlColumn.getDefinition()) {
if (iPattern instanceof FactPattern) {
removePattern(column, (FactPattern) iPattern);
} else if (iPattern instanceof CompositeFactPattern) {
for (IFactPattern childPattern : ((CompositeFactPattern) iPattern).getPatterns()) {
if (childPattern instanceof FactPattern) {
removePattern(column, (FactPattern) childPattern);
}
}
}
}
}
use of org.drools.workbench.models.datamodel.rule.IFactPattern in project drools-wb by kiegroup.
the class GuidedRuleTemplateIndexVisitor method visitCompositeFactPattern.
private void visitCompositeFactPattern(final CompositeFactPattern pattern) {
String fullyQualifiedClassName = getFullyQualifiedClassName(pattern.getType());
addResourceReference(fullyQualifiedClassName, ResourceType.JAVA);
if (pattern.getPatterns() != null) {
for (IFactPattern fp : pattern.getPatterns()) {
visit(fp);
}
}
}
use of org.drools.workbench.models.datamodel.rule.IFactPattern in project drools-wb by kiegroup.
the class RuleModelCloneVisitor method visitCompositeFactPattern.
private CompositeFactPattern visitCompositeFactPattern(CompositeFactPattern pattern) {
CompositeFactPattern clone = new CompositeFactPattern();
clone.setType(pattern.getType());
if (pattern.getPatterns() != null) {
for (IFactPattern fp : pattern.getPatterns()) {
clone.addFactPattern((IFactPattern) visit(fp));
}
}
return clone;
}
Aggregations