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

eworks.RQL.model
Class DisjunctionCondition

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

public class DisjunctionCondition
extends CompositionCondition

A condition that represents a disjunction of several other conditions, so called "subconditions". (A disjunction is expressed using the OR-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
DisjunctionCondition()
          Creates an empty disjunction condition (with no subconditions).
DisjunctionCondition(Condition subCondition)
          Creates a disjunction condition using one certain subcondition.
DisjunctionCondition(Condition[] subConditions)
          Creates a disjunction condition using certain subconditions.
 
Method Summary
 boolean matches(SymbolTable symbols)
          Checks if this disjunction 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

DisjunctionCondition

public DisjunctionCondition()
Creates an empty disjunction condition (with no subconditions).


DisjunctionCondition

public DisjunctionCondition(Condition[] subConditions)
Creates a disjunction condition using certain subconditions.

Parameters:
subConditions - This condition's subconditions.

DisjunctionCondition

public DisjunctionCondition(Condition subCondition)
Creates a disjunction 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 disjunction 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 false if and only if no subcondition matches.

This method uses so called "short circuit evaluation", that means the true is returned immediately after the first subcondition is found that does 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 disjunction 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/