com.clarkparsia.pellet.rules
Class DatavaluePropertyBindingHelper

java.lang.Object
  extended by com.clarkparsia.pellet.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
DatavaluePropertyBindingHelper(ABox abox, DatavaluedPropertyAtom pattern)
           
 
Method Summary
 java.util.Collection<AtomVariable> getBindableVars(java.util.Collection<AtomVariable> bound)
          Returns a set of variables which this binding helper can bind.
 java.util.Collection<AtomVariable> getPrerequisiteVars(java.util.Collection<AtomVariable> bound)
          Returns a set of variables which must be bound before this helper can generate bindings.
 void rebind(VariableBinding newBinding)
          Set the incoming binding for this helper.
 boolean selectNextBinding()
          Selects the next binding.
 void setCurrentBinding(VariableBinding currentBinding)
          Set the variables this pattern uses in the given map.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatavaluePropertyBindingHelper

public DatavaluePropertyBindingHelper(ABox abox,
                                      DatavaluedPropertyAtom pattern)
Method Detail

getBindableVars

public java.util.Collection<AtomVariable> getBindableVars(java.util.Collection<AtomVariable> bound)
Description copied from interface: BindingHelper
Returns a set of variables which this binding helper can bind.

Specified by:
getBindableVars in interface BindingHelper

getPrerequisiteVars

public java.util.Collection<AtomVariable> getPrerequisiteVars(java.util.Collection<AtomVariable> bound)
Description copied from interface: BindingHelper
Returns a set of variables which must be bound before this helper can generate bindings.

Specified by:
getPrerequisiteVars in interface BindingHelper

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:
rebind in interface BindingHelper
Parameters:
newBinding - Binding map. Copied on input.

selectNextBinding

public boolean selectNextBinding()
Selects the next binding.

Specified by:
selectNextBinding in interface BindingHelper
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:
setCurrentBinding in interface BindingHelper
Parameters:
currentBinding -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004 Evren Sirin. All Rights Reserved.