org.mindswap.query
Class ValueMap

java.lang.Object
  extended by org.mindswap.query.ValueMap

public class ValueMap
extends java.lang.Object

This interface provides a way to assign values to variables. When a process needs to be executed the values for the input parameters are specified with this interface. The result of the execution is also given with this interface

Author:
Evren Sirin

Constructor Summary
ValueMap()
           
 
Method Summary
 void addMap(ValueMap valueMap)
          Add all the value bindings that has been defined in the given ValueMap.
 void clear()
          Clear all the values
 void clearValue(Variable var)
          Clear the value that has been assigned to the given parameter
 java.lang.String debugString()
           
 OWLDataValue getDataValue(java.lang.String var)
           
 OWLDataValue getDataValue(Variable var)
          Get the value of the given variable cast to an OWLDataValue.
 OWLIndividual getIndividualValue(java.lang.String var)
           
 OWLIndividual getIndividualValue(Variable var)
          Get the value of the given variable cast to an OWLIndividual.
 java.lang.String getStringValue(java.lang.String var)
           
 java.lang.String getStringValue(Variable var)
           
 OWLValue getValue(java.lang.String varName)
          Get the value of the variable with the given local name.
 OWLValue getValue(Variable var)
          Get the value of the given variable
 java.util.Collection getValues()
           
 java.util.Set getVariables()
           
 boolean hasValue(Variable var)
          Return true if the given parameter has been assigned a value
 boolean isEmpty()
           
 void setDataValue(Variable var, java.lang.String value)
          Set the value of the given variable to a plain string.
 void setValue(Variable var, OWLValue value)
          Set the value of the given variable
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueMap

public ValueMap()
Method Detail

setDataValue

public void setDataValue(Variable var,
                         java.lang.String value)
Set the value of the given variable to a plain string. This is equivalent to
setValue( var, EntityFactory.createDataValue( value ) ).

Parameters:
var -
value -

setValue

public void setValue(Variable var,
                     OWLValue value)
Set the value of the given variable

Parameters:
var -
value -

getValue

public OWLValue getValue(Variable var)
Get the value of the given variable

Parameters:
var -
Returns:

getDataValue

public OWLDataValue getDataValue(Variable var)
Get the value of the given variable cast to an OWLDataValue. An exception occurs if the variable is bound to an OWLIndividual.

Parameters:
var -
Returns:

getDataValue

public OWLDataValue getDataValue(java.lang.String var)

getStringValue

public java.lang.String getStringValue(Variable var)

getStringValue

public java.lang.String getStringValue(java.lang.String var)

getIndividualValue

public OWLIndividual getIndividualValue(Variable var)
Get the value of the given variable cast to an OWLIndividual. An exception occurs if the variable is bound to an OWLDataValue.

Parameters:
var -
Returns:

getIndividualValue

public OWLIndividual getIndividualValue(java.lang.String var)

getValue

public OWLValue getValue(java.lang.String varName)
Get the value of the variable with the given local name. If there are more than one such variables a random one is returned;

Parameters:
var -
Returns:

hasValue

public boolean hasValue(Variable var)
Return true if the given parameter has been assigned a value

Parameters:
var -
Returns:

clearValue

public void clearValue(Variable var)
Clear the value that has been assigned to the given parameter

Parameters:
p -

clear

public void clear()
Clear all the values

Parameters:
p -

addMap

public void addMap(ValueMap valueMap)
Add all the value bindings that has been defined in the given ValueMap.

Parameters:
valueMap -

getVariables

public java.util.Set getVariables()

getValues

public java.util.Collection getValues()

isEmpty

public boolean isEmpty()

size

public int size()

toString

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

debugString

public java.lang.String debugString()


Copyright © 2004 Evren Sirin. All Rights Reserved.