eRqlEngine API documentation - http://www.wleklinski.de/rdf/

eworks.RQL.model
Class ConjunctionCondition

java.lang.Object
  extended byeworks.RQL.model.Condition
      extended byeworks.RQL.model.CompositionCondition
          extended byeworks.RQL.model.ConjunctionCondition

public class ConjunctionCondition
extends CompositionCondition

A condition that represents a conjunction of several other conditions, so called "subconditions". (A conjunction is expressed using the AND-operator according to the RQL syntax.)

Version:
1.00 (2003-11-03)
Author:
Fabian Wleklinski (fabian@wleklinski.de)
See Also:
The RDF Query Language (RQL)

Field Summary
 
Fields inherited from class eworks.RQL.model.CompositionCondition
subConditions
 
Constructor Summary
ConjunctionCondition()
          Creates an empty conjunction condition (with no subconditions).
ConjunctionCondition(Condition subCondition)
          Creates a conjunction condition using one certain subcondition.
ConjunctionCondition(Condition[] subConditions)
          Creates a conjunction condition using certain subconditions.
 
Method Summary
 boolean matches(SymbolTable symbols)
          Checks if this conjunction condition is satisfied using a certain symbol table.
 
Methods inherited from class eworks.RQL.model.CompositionCondition
add, compact, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConjunctionCondition

public ConjunctionCondition()
Creates an empty conjunction condition (with no subconditions).


ConjunctionCondition

public ConjunctionCondition(Condition[] subConditions)
Creates a conjunction condition using certain subconditions.

Parameters:
subConditions - This condition's subconditions.

ConjunctionCondition

public ConjunctionCondition(Condition subCondition)
Creates a conjunction condition using one certain subcondition.

Parameters:
subCondition - This condition's only subcondition.
Method Detail

matches

public boolean matches(SymbolTable symbols)
                throws VariableNotBoundException

Checks if this conjunction condition is satisfied using a certain symbol table. Therefore it is checked for all subconditions if they are satisfied (using the same symbol table). The result is true if and only if each subcondition matches, too.

This method uses so called "short circuit evaluation", that means the false is returned immediately after the first subcondition is found that does not match, and all further subconditions are not evaluated any more.

Specified by:
matches in class Condition
Parameters:
symbols - The symbol table to use.
Returns:
true if this conjunction condition is satisfied, false else.
Throws:
VariableNotBoundException - if one or several needed values of this condition's values or it's subcondition's values are not bound by the given symbol table.

eRqlEngine API documentation - http://www.wleklinski.de/rdf/