@Override public List<String> getAllVariables() { return model.getAllVariables(); }
@Override public List<String> getAllVariables() { return model.getAllVariables(); }
/** * Checks to see if a variable is used or not, includes fields as well as * facts. */ public boolean isVariableNameUsed(String s) { return getAllVariables().contains(s); }
private void canTheVariableButtonBeShown(final Callback<Boolean> callback) { List<String> factTypes = new ArrayList<String>(); for (String variable : modeller.getModel().getAllVariables()) { String factType = getFactType(variable); factTypes.add(factType); if (factType.equals(this.parameterType)) { callback.callback(true); return; } } new SuperTypeMatcher(oracle).isThereAMatchingSuperType(factTypes, parameterType, callback); }
private void canTheVariableButtonBeShown(final Callback<Boolean> callback) { List<String> factTypes = new ArrayList<String>(); for (String variable : modeller.getModel().getAllVariables()) { String factType = getFactType(variable); factTypes.add(factType); if (factType.equals(this.parameterType)) { callback.callback(true); return; } } new SuperTypeMatcher(oracle).isThereAMatchingSuperType(factTypes, parameterType, callback); }
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; }