Package openllet.core.rules
Class ObjectVariableBindingHelper
- java.lang.Object
-
- openllet.core.rules.ObjectVariableBindingHelper
-
- All Implemented Interfaces:
BindingHelper
public class ObjectVariableBindingHelper extends java.lang.Object implements BindingHelper
Title: Object Variable Binding Helper
Description: A binding helper that will iterate over all named individuals in the _abox.
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
- Author:
- Ron Alford
-
-
Constructor Summary
Constructors Constructor Description ObjectVariableBindingHelper(ABox abox, AtomIVariable var)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<AtomIVariable>getBindableVars(java.util.Collection<AtomVariable> bound)java.util.Collection<AtomIVariable>getPrerequisiteVars(java.util.Collection<AtomVariable> bound)voidrebind(VariableBinding newBinding)Set the incoming binding for this helper.booleanselectNextBinding()Selects the next binding.voidsetCurrentBinding(VariableBinding currentBinding)Set the variables this pattern uses in the given map.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ObjectVariableBindingHelper
public ObjectVariableBindingHelper(ABox abox, AtomIVariable var)
-
-
Method Detail
-
getBindableVars
public java.util.Collection<AtomIVariable> getBindableVars(java.util.Collection<AtomVariable> bound)
- Specified by:
getBindableVarsin interfaceBindingHelper- Returns:
- a set of variables which this binding helper can bind.
-
getPrerequisiteVars
public java.util.Collection<AtomIVariable> getPrerequisiteVars(java.util.Collection<AtomVariable> bound)
- Specified by:
getPrerequisiteVarsin interfaceBindingHelper- Returns:
- a set of variables which must be bound before this helper can generate bindings.
-
rebind
public void rebind(VariableBinding newBinding)
Description copied from interface:BindingHelperSet the incoming binding for this helper. This fixes any variables that are already bound by a preceding Binding Helper.- Specified by:
rebindin interfaceBindingHelper- Parameters:
newBinding- Binding map. Implementation will copy map if needed.
-
selectNextBinding
public boolean selectNextBinding()
Description copied from interface:BindingHelperSelects the next binding.- Specified by:
selectNextBindingin interfaceBindingHelper- Returns:
- True if a binding was available for this pattern given the initial binding. False otherwise. Will return if the binding is not set.
-
setCurrentBinding
public void setCurrentBinding(VariableBinding currentBinding)
Description copied from interface:BindingHelperSet the variables this pattern uses in the given map.- Specified by:
setCurrentBindingin interfaceBindingHelper
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-