01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.query.algebra.evaluation.function;
07:
08: import info.aduna.lang.service.ServiceRegistry;
09:
10: /**
11: * @author Arjohn Kampman
12: */
13: public class FunctionRegistry extends ServiceRegistry<String, Function> {
14:
15: private static FunctionRegistry defaultRegistry;
16:
17: /**
18: * Gets the default QueryParserRegistry.
19: *
20: * @return The default registry.
21: */
22: public static synchronized FunctionRegistry getInstance() {
23: if (defaultRegistry == null) {
24: defaultRegistry = new FunctionRegistry();
25: }
26:
27: return defaultRegistry;
28: }
29:
30: public FunctionRegistry() {
31: super (Function.class);
32: }
33:
34: @Override
35: protected String getKey(Function function) {
36: return function.getURI();
37: }
38: }
|