Package openllet.core.rules
Class DatavaluePropertyBindingHelper
- java.lang.Object
-
- openllet.core.rules.DatavaluePropertyBindingHelper
-
- All Implemented Interfaces:
BindingHelper
public class DatavaluePropertyBindingHelper extends java.lang.Object implements BindingHelper
Title: Datavalue Property Binding Helper
Description: Generates bindings based off the given _pattern. The predicate must be a datatype property. TODO: Rename to DatavaluedPropertyBindingHelper
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
- Author:
- Ron Alford
-
-
Constructor Summary
Constructors Constructor Description DatavaluePropertyBindingHelper(ABox abox, DatavaluedPropertyAtom pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<AtomVariable>getBindableVars(java.util.Collection<AtomVariable> bound)java.util.Collection<AtomVariable>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
-
DatavaluePropertyBindingHelper
public DatavaluePropertyBindingHelper(ABox abox, DatavaluedPropertyAtom pattern)
-
-
Method Detail
-
getBindableVars
public java.util.Collection<AtomVariable> 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<AtomVariable> 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)
Set 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. Copied on input.
-
selectNextBinding
public boolean selectNextBinding()
Selects 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)
Set the variables this _pattern uses in the given map.- Specified by:
setCurrentBindingin interfaceBindingHelper- Parameters:
currentBinding-
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-