org.openanzo.glitter.expression
Class UnaryFunction

java.lang.Object
  extended by org.openanzo.glitter.expression.FunctionBase
      extended by org.openanzo.glitter.expression.UnaryFunction
All Implemented Interfaces:
Function, FunctionOnValues
Direct Known Subclasses:
Datatype, IsBlank, IsIRI, IsLiteral, Lang, Not, Str, UnaryMinus, UnaryPlus, XSDDouble, XSDInteger, XSDString

public abstract class UnaryFunction
extends FunctionBase
implements FunctionOnValues

Base class for SPARQL functions that take a single argument. This base class takes care of checking that only a single argument is passed to a unary function.

Author:
lee

Constructor Summary
UnaryFunction()
           
 
Method Summary
 RDFTerm call(java.util.List<RDFTerm> arguments)
          Invokes the function and determines a return value.
abstract  RDFTerm call(RDFTerm arg1)
          An unpackaged version of FunctionOnValues.call(List) that receives the single argument to the function.
 
Methods inherited from class org.openanzo.glitter.expression.FunctionBase
compareBooleans, compareBooleans, compareDateTimes, compareNumerics, compareStringLiterals, operatesOnTypeErrors, operatesOnValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openanzo.glitter.expression.Function
getIdentifier, operatesOnTypeErrors, operatesOnValues
 

Constructor Detail

UnaryFunction

public UnaryFunction()
Method Detail

call

public RDFTerm call(java.util.List<RDFTerm> arguments)
             throws ExpressionEvaluationException
Description copied from interface: FunctionOnValues
Invokes the function and determines a return value.

Specified by:
call in interface FunctionOnValues
Parameters:
arguments - The (evaluated) RDF terms being passed to the function
Returns:
The result of evaluating this function against the given arguments
Throws:
ExpressionEvaluationException - For invalid types, or other expression evalutaion problems

call

public abstract RDFTerm call(RDFTerm arg1)
                      throws IncompatibleTypeException
An unpackaged version of FunctionOnValues.call(List) that receives the single argument to the function.

Parameters:
arg1 - The single unary argument to the function
Returns:
The return value of the function.
Throws:
IncompatibleTypeException


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