org.openanzo.glitter.expression
Class FunctionRegistry

java.lang.Object
  extended by org.openanzo.glitter.expression.FunctionRegistry

public class FunctionRegistry
extends java.lang.Object

A singleton class that maintains a mapping from function URIs to Functions

Author:
lee

Method Summary
 Function getFunction(java.lang.String name)
           
 Function getFunction(java.net.URI name)
           
static FunctionRegistry getRegistry()
           
 void registerFunction(java.net.URI name, Function f)
          Register a function.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRegistry

public static FunctionRegistry getRegistry()
Returns:
The singleton FunctionRegistry instance.

registerFunction

public void registerFunction(java.net.URI name,
                             Function f)
Register a function. It is a parse error if a query is received that references a function not registered in the FunctionRegistry.

Parameters:
name - Identifies the function
f - The function itself

getFunction

public Function getFunction(java.net.URI name)
Parameters:
name - Identifies the desired function
Returns:
The function associated with the given name, or null if no such function is registered.

getFunction

public Function getFunction(java.lang.String name)
Parameters:
name - Identifies the desired function
Returns:
The function associated with the given name, or null if no such function is registered.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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