com.hp.hpl.jena.sparql.expr
Class ExprFunction

java.lang.Object
  extended by com.hp.hpl.jena.sparql.expr.ExprNode
      extended by com.hp.hpl.jena.sparql.expr.ExprFunction
All Implemented Interfaces:
Expr
Direct Known Subclasses:
ExprFunction0, ExprFunction1, ExprFunction2, ExprFunction3, ExprFunctionN, ExprFunctionOp

public abstract class ExprFunction
extends ExprNode

A function in the expression hierarchy. Everything that is evaluable (i.e. not NodeValue, NodeVar) is a function). It is useful to distinguish between values, vars and functions. The exists operations (which take a op, not arguments) are functions of zero arguments.


Field Summary
 
Fields inherited from interface com.hp.hpl.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL
 
Method Summary
 boolean equals(Object other)
           
abstract  Expr getArg(int i)
           
 List<Expr> getArgs()
           
 ExprFunction getFunction()
          Get the function (returns null if not a function)
 String getFunctionIRI()
          URI for this function, whether custom or specification defined URI (these are keywords in the language)
 String getFunctionName(SerializationContext cxt)
          Name used in a functional form (i.e.
 String getFunctionPrintName(SerializationContext cxt)
          Name used for output in SPARQL format needing functional form (no specific keyword).
 FunctionLabel getFunctionSymbol()
          Used to get a unique name for the function, which is intern'ed.
 String getOpName()
          Get the symbol name (+, ! etc) for this function -- maybe null for none
 int hashCode()
           
 boolean isFunction()
          Answer wether this is a function.
abstract  int numArgs()
           
 
Methods inherited from class com.hp.hpl.jena.sparql.expr.ExprNode
applyNodeTransform, asVar, copySubstitute, copySubstitute, deepCopy, eval, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarNamesMentioned, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString, varNamesMentioned, varsMentioned
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.sparql.expr.Expr
visit
 

Method Detail

getArg

public abstract Expr getArg(int i)

numArgs

public abstract int numArgs()

getArgs

public List<Expr> getArgs()

isFunction

public boolean isFunction()
Description copied from interface: Expr
Answer wether this is a function.

Specified by:
isFunction in interface Expr
Overrides:
isFunction in class ExprNode

getFunction

public ExprFunction getFunction()
Description copied from interface: Expr
Get the function (returns null if not a function)

Specified by:
getFunction in interface Expr
Overrides:
getFunction in class ExprNode

hashCode

public int hashCode()
Specified by:
hashCode in class ExprNode

equals

public boolean equals(Object other)
Specified by:
equals in class ExprNode

getFunctionPrintName

public String getFunctionPrintName(SerializationContext cxt)
Name used for output in SPARQL format needing functional form (no specific keyword). e.g. regexp(), custom functions, ...


getFunctionName

public String getFunctionName(SerializationContext cxt)
Name used in a functional form (i.e. SPARQL algebra). getOpName() is used in preference as a short, symbol name.


getFunctionSymbol

public FunctionLabel getFunctionSymbol()
Used to get a unique name for the function, which is intern'ed. Used in hashCode()


getFunctionIRI

public String getFunctionIRI()
URI for this function, whether custom or specification defined URI (these are keywords in the language)


getOpName

public String getOpName()
Get the symbol name (+, ! etc) for this function -- maybe null for none



Licenced under the Apache License, Version 2.0