SigPath

org.sigpath.datamodel.kinetic
Class BindingSet

java.lang.Object
  extended by org.sigpath.datamodel.kinetic.BindingSet
All Implemented Interfaces:
InstanceCallbacks

public class BindingSet
extends Object
implements InstanceCallbacks

Set of bindings. Bindings are the information needed to bind the various parameters in a formula to values, so that the formula can be evaluated. Binding sets can contain binding declaration of binding definitions.


Constructor Summary
BindingSet()
          Constructs a binding set with no defined bindings.
BindingSet(SymbolTable table)
          Construct a new binding set with a jep symbol table.
 
Method Summary
 void add(SymbolBinding binding)
          Add a binding to this set.
 void addAll(BindingSet forward)
          Adds a full binding set to the bindingSet on which the method is called.
 void addAll(Kinetic kinetic, BindingSet forward)
          Adds a full binding set to the bindingSet on which the method is called.
 BindingSet getBindingChemicals()
          Get bindings that are of type BindingChemicalImpl.
 BindingSet getBindingParameters()
          Get bindings that are of type BindingParameterImpl.
 SymbolBinding getMember(String name)
          Get a binding by name.
 Set getMembers()
          Returns all the bindings in this set.
 Collection<String> getNames()
           
 BindingParameterImpl getParameterBinding(String name)
           
 void jdoPostLoad()
           
 void jdoPreClear()
           
 void jdoPreDelete()
           
 void jdoPreStore()
           
 boolean removeMember(String name)
          Remove binding by name.
 void setMembers(Set<SymbolBinding> members)
          Set a new binding set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingSet

public BindingSet()
Constructs a binding set with no defined bindings.


BindingSet

public BindingSet(SymbolTable table)
Construct a new binding set with a jep symbol table. TODO explain what the symbol table is and what it contains.

Parameters:
table - A Jep symbol table.
Method Detail

jdoPostLoad

public void jdoPostLoad()
Specified by:
jdoPostLoad in interface InstanceCallbacks

jdoPreStore

public void jdoPreStore()
Specified by:
jdoPreStore in interface InstanceCallbacks

jdoPreClear

public void jdoPreClear()
Specified by:
jdoPreClear in interface InstanceCallbacks

jdoPreDelete

public void jdoPreDelete()
Specified by:
jdoPreDelete in interface InstanceCallbacks

getMembers

public Set getMembers()
Returns all the bindings in this set. You do not get a copy of the set, but the real thing.

Returns:
The set used to keep the bindings of this binding set.

setMembers

public void setMembers(Set<SymbolBinding> members)
Set a new binding set. The reference is used as is, no copy is made.

Parameters:
members -

add

public void add(SymbolBinding binding)
Add a binding to this set.

Parameters:
binding - The binding to add to the set.

getMember

public SymbolBinding getMember(String name)
Get a binding by name.

Parameters:
name - Name of the binding to return
Returns:
Binding that matches name, or null.

removeMember

public boolean removeMember(String name)
Remove binding by name.

Parameters:
name - Name of the binding to return
Returns:
Binding that matches name, or null.

getBindingParameters

public BindingSet getBindingParameters()
Get bindings that are of type BindingParameterImpl.

Returns:
a subset of bindings in this set that are instance of BindingParameterImpl.

getBindingChemicals

public BindingSet getBindingChemicals()
Get bindings that are of type BindingChemicalImpl.

Returns:
a subset of bindings in this set that are instance of BindingChemicalImpl.

getNames

public Collection<String> getNames()

addAll

public void addAll(BindingSet forward)
Adds a full binding set to the bindingSet on which the method is called.

Parameters:
forward -

addAll

public void addAll(Kinetic kinetic,
                   BindingSet forward)
Adds a full binding set to the bindingSet on which the method is called.

Parameters:
forward -

getParameterBinding

public BindingParameterImpl getParameterBinding(String name)

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.