org.openanzo.glitter.syntax.abstrakt
Class SimpleExpression

java.lang.Object
  extended by org.openanzo.glitter.syntax.abstrakt.Expression
      extended by org.openanzo.glitter.syntax.abstrakt.SimpleExpression

public class SimpleExpression
extends Expression

A SimpleExpression represents an expression (i.e., in a FILTER or ORDER BY) which is simply a TriplePatternComponent (a variable, IRI ref., bnode, or literal).

Author:
Lee

Constructor Summary
SimpleExpression(TriplePatternComponent tpc)
          Constructs a SimpleExpression from an RDFTerm or Variable.
 
Method Summary
 RDFTerm evaluate(PatternSolution environment)
           
 java.util.Set<Variable> getReferencedVariables()
           
 TriplePatternComponent getTerm()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleExpression

public SimpleExpression(TriplePatternComponent tpc)
Constructs a SimpleExpression from an RDFTerm or Variable.

Parameters:
tpc -
Method Detail

evaluate

public RDFTerm evaluate(PatternSolution environment)
                 throws ExpressionEvaluationException
Specified by:
evaluate in class Expression
Parameters:
environment - A set of bindings to use to evaluate Bindable objects in the expression.
Returns:
The RDFTerm that is the value of evaluating this expression.
Throws:
ExpressionEvaluationException - If there is an error (e.g. a type error) in evaluating this expression.

getTerm

public TriplePatternComponent getTerm()
Returns:
The triple pattern component that comprises this expression.

getReferencedVariables

public java.util.Set<Variable> getReferencedVariables()
Specified by:
getReferencedVariables in class Expression
Returns:
A set of all the variables that occur in this expression.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.