@Override public ActionInsertFact getRHSBoundFact(String var) { return model.getRHSBoundFact(var); }
private String getFactType(String variable) { if (modeller.getModel().getRHSBoundFacts().contains(variable) == false) { return modeller.getModel().getLHSBindingType(variable); } else { return modeller.getModel().getRHSBoundFact(variable).getFactType(); } }
@Override public ActionInsertFact getRHSBoundFact(String var) { return model.getRHSBoundFact(var); }
private String getFactType(String variable) { if (modeller.getModel().getRHSBoundFacts().contains(variable) == false) { return modeller.getModel().getLHSBindingType(variable); } else { return modeller.getModel().getRHSBoundFact(variable).getFactType(); } }
private String getFactTypeFromRHS() { ActionInsertFact rhsBoundFact = modeller.getModel().getRHSBoundFact(model.getVariable()); if (rhsBoundFact != null) { return rhsBoundFact.getFactType(); } return null; }
private void getRHSFacTypes() { for (String variable : model.getModel().getAllRHSVariables()) { factTypesByVariables.put(variable, model.getModel().getRHSBoundFact(variable).getFactType()); } }
private String getFactTypeFromRHS() { ActionInsertFact rhsBoundFact = modeller.getModel().getRHSBoundFact(model.getVariable()); if (rhsBoundFact != null) { return rhsBoundFact.getFactType(); } return null; }
private void getRHSFacTypes() { for (String variable : model.getModel().getAllRHSVariables()) { factTypesByVariables.put(variable, model.getModel().getRHSBoundFact(variable).getFactType()); } }
@Override public ActionInsertFact getRHSBoundFact(final String var) { for (ActionCol52 col : dtable.getActionCols()) { if (col instanceof ActionInsertFactCol52) { final ActionInsertFactCol52 action = (ActionInsertFactCol52) col; if (action.getBoundName().equals(var)) { if (action.isInsertLogical()) { return new ActionInsertFactCol52ActionInsertLogicalFactAdaptor(action); } return new ActionInsertFactCol52ActionInsertFactAdaptor(action); } } else if (col instanceof BRLActionColumn) { //Delegate to super class's implementation final RuleModel rm = new RuleModel(); final BRLActionColumn brl = (BRLActionColumn) col; rm.rhs = brl.getDefinition().toArray(new IAction[brl.getDefinition().size()]); final ActionInsertFact aif = rm.getRHSBoundFact(var); if (aif != null) { return aif; } } } return super.getRHSBoundFact(var); } }
private boolean isRHSFieldTypeEquivalent(String boundVariable) { String boundFactType = modeller.getModel().getRHSBoundFact(boundVariable).getFactType(); if (boundFactType == null) { return false; } if (this.variableType == null) { return false; } //If the types are SuggestionCompletionEngine.TYPE_COMPARABLE check the enums are equivalent if (boundFactType.equals(DataType.TYPE_COMPARABLE)) { if (!this.variableType.equals(DataType.TYPE_COMPARABLE)) { return false; } String[] dd = this.modeller.getDataModelOracle().getEnumValues(boundFactType, this.value.getField()); return isEnumEquivalent(dd); } //If the types are identical (and not SuggestionCompletionEngine.TYPE_COMPARABLE) then return true if (boundFactType.equals(this.variableType)) { return true; } return false; }
private boolean isRHSFieldTypeEquivalent(String boundVariable) { String boundFactType = modeller.getModel().getRHSBoundFact(boundVariable).getFactType(); if (boundFactType == null) { return false; } if (this.variableType == null) { return false; } //If the types are SuggestionCompletionEngine.TYPE_COMPARABLE check the enums are equivalent if (boundFactType.equals(DataType.TYPE_COMPARABLE)) { if (!this.variableType.equals(DataType.TYPE_COMPARABLE)) { return false; } String[] dd = this.modeller.getDataModelOracle().getEnumValues(boundFactType, this.value.getField()); return isEnumEquivalent(dd); } //If the types are identical (and not SuggestionCompletionEngine.TYPE_COMPARABLE) then return true if (boundFactType.equals(this.variableType)) { return true; } return false; }
private List<String> getApplicableBindings() { List<String> bindings = new ArrayList<String>(); //Examine LHS Fact and Field bindings and RHS (new) Fact bindings for (String v : modeller.getModel().getAllVariables()) { //LHS FactPattern FactPattern fp = modeller.getModel().getLHSBoundFact(v); if (fp != null) { if (isLHSFactTypeEquivalent(v)) { bindings.add(v); } } //LHS FieldConstraint FieldConstraint fc = modeller.getModel().getLHSBoundField(v); if (fc != null) { if (isLHSFieldTypeEquivalent(v)) { bindings.add(v); } } //RHS ActionInsertFact ActionInsertFact aif = modeller.getModel().getRHSBoundFact(v); if (aif != null) { if (isRHSFieldTypeEquivalent(v)) { bindings.add(v); } } } return bindings; }
private List<String> getApplicableBindings() { List<String> bindings = new ArrayList<String>(); //Examine LHS Fact and Field bindings and RHS (new) Fact bindings for (String v : modeller.getModel().getAllVariables()) { //LHS FactPattern FactPattern fp = modeller.getModel().getLHSBoundFact(v); if (fp != null) { if (isLHSFactTypeEquivalent(v)) { bindings.add(v); } } //LHS FieldConstraint FieldConstraint fc = modeller.getModel().getLHSBoundField(v); if (fc != null) { if (isLHSFieldTypeEquivalent(v)) { bindings.add(v); } } //RHS ActionInsertFact ActionInsertFact aif = modeller.getModel().getRHSBoundFact(v); if (aif != null) { if (isRHSFieldTypeEquivalent(v)) { bindings.add(v); } } } return bindings; }
private String getVariableType() { String type; if (oracle.isGlobalVariable(this.model.getVariable())) { type = oracle.getGlobalVariable(this.model.getVariable()); } else { type = this.getModeller().getModel().getLHSBindingType(this.model.getVariable()); if (type == null) { type = this.getModeller().getModel().getRHSBoundFact(this.model.getVariable()).getFactType(); } } return type; }
private String getVariableType() { String type; if (oracle.isGlobalVariable(this.model.getVariable())) { type = oracle.getGlobalVariable(this.model.getVariable()); } else { type = this.getModeller().getModel().getLHSBindingType(this.model.getVariable()); if (type == null) { type = this.getModeller().getModel().getRHSBoundFact(this.model.getVariable()).getFactType(); } } return type; }
ActionValueEditor valueEditor(final ActionFieldValue actionFieldValue) { AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); String type = ""; if (oracle.isGlobalVariable(this.model.getVariable())) { type = oracle.getGlobalVariable(this.model.getVariable()); } else { type = this.getModeller().getModel().getLHSBindingType(this.model.getVariable()); /* * to take in account if the using a rhs bound variable */ if (type == null && !this.readOnly) { type = this.getModeller().getModel().getRHSBoundFact(this.model.getVariable()).getFactType(); } } ActionValueEditor actionValueEditor = actionValueEditor(type, actionFieldValue, model.getFieldValues(), readOnly); actionValueEditor.setOnChangeCommand(new Command() { public void execute() { RefreshUtil.refreshActionValueEditorsDropDownData(actionValueEditors, actionFieldValue); setModified(true); } }); //Keep a reference to the value editors so they can be refreshed for dependent enums actionValueEditors.put(actionFieldValue, actionValueEditor); return actionValueEditor; }
ActionValueEditor valueEditor(final ActionFieldValue actionFieldValue) { AsyncPackageDataModelOracle oracle = this.getModeller().getDataModelOracle(); String type = ""; if (oracle.isGlobalVariable(this.model.getVariable())) { type = oracle.getGlobalVariable(this.model.getVariable()); } else { type = this.getModeller().getModel().getLHSBindingType(this.model.getVariable()); /* * to take in account if the using a rhs bound variable */ if (type == null && !this.readOnly) { type = this.getModeller().getModel().getRHSBoundFact(this.model.getVariable()).getFactType(); } } ActionValueEditor actionValueEditor = actionValueEditor(type, actionFieldValue, model.getFieldValues(), readOnly); actionValueEditor.setOnChangeCommand(new Command() { public void execute() { RefreshUtil.refreshActionValueEditorsDropDownData(actionValueEditors, actionFieldValue); setModified(true); } }); //Keep a reference to the value editors so they can be refreshed for dependent enums actionValueEditors.put(actionFieldValue, actionValueEditor); return actionValueEditor; }
this.isBoundFact = true; } else { ActionInsertFact patternRhs = mod.getModel().getRHSBoundFact(set.getVariable()); if (patternRhs != null) { oracle.getFieldCompletions(patternRhs.getFactType(),
this.isBoundFact = true; } else { ActionInsertFact patternRhs = mod.getModel().getRHSBoundFact(set.getVariable()); if (patternRhs != null) { oracle.getFieldCompletions(patternRhs.getFactType(),