/** {@inheritDoc} */ public void addStartState(ResolutionState startState) { resolutionSearch.addStartState(startState); }
/** * Calculates the set of free variables in a term. * * @param query The term to calculate the free non-anonymous variable set from. * * @return A set of variables that are free and non-anonymous in the term. */ public static Set<Variable> findFreeVariables(Term query) { QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>(); freeVarSearch.reset(); freeVarSearch.addStartState(query); freeVarSearch.setGoalPredicate(new FreeVariablePredicate()); return (Set<Variable>) (Set) Searches.setOf(freeVarSearch); }
/** * Calculates the set of free and non-anonymous variables in a term. This is the set of variables that a user query * usually wants to be made aware of. * * @param query The term to calculate the free non-anonymous variable set from. * * @return A set of variables that are free and non-anonymous in the term. */ public static Set<Variable> findFreeNonAnonymousVariables(Term query) { QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>(); freeVarSearch.reset(); freeVarSearch.addStartState(query); freeVarSearch.setGoalPredicate(new FreeNonAnonymousVariablePredicate()); return (Set<Variable>) (Set) Searches.setOf(freeVarSearch); }
new DepthFirstSearch<String, HierarchyLabelState>(); search.reset(); search.addStartState(new HierarchyLabelState(label, initialPath));
/** * Calculates the set of free variables in a term. * * @param query The term to calculate the free non-anonymous variable set from. * * @return A set of variables that are free and non-anonymous in the term. */ public static Set<Variable> findFreeVariables(Term query) { QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>(); freeVarSearch.reset(); freeVarSearch.addStartState(query); freeVarSearch.setGoalPredicate(new FreeVariablePredicate()); return (Set<Variable>) (Set) Searches.setOf(freeVarSearch); }
/** * Calculates the set of free and non-anonymous variables in a term. This is the set of variables that a user query * usually wants to be made aware of. * * @param query The term to calculate the free non-anonymous variable set from. * * @return A set of variables that are free and non-anonymous in the term. */ public static Set<Variable> findFreeNonAnonymousVariables(Term query) { QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>(); freeVarSearch.reset(); freeVarSearch.addStartState(query); freeVarSearch.setGoalPredicate(new FreeNonAnonymousVariablePredicate()); return (Set<Variable>) (Set) Searches.setOf(freeVarSearch); }
search.addStartState(term);
search.addStartState(term);
search.addStartState(new TreeSearchState<CategoryNode>(initialChild));
search.addStartState(new TreeSearchState<CategoryNode>(initialChild));
postfixSearch.addStartState(nextFunctorArg); postfixSearch.setGoalPredicate(new FunctorTermPredicate());