Class MapBuiltinRegistry

java.lang.Object
org.apache.jena.reasoner.rulesys.BuiltinRegistry
org.apache.jena.reasoner.rulesys.MapBuiltinRegistry

public class MapBuiltinRegistry extends BuiltinRegistry
A registry for mapping functor names on java objects (instances of subclasses of Builtin) which implement their behaviour.

This is currently implemented as a singleton to simply any future move to support different sets of builtins.

See Also:
  • Constructor Details

    • MapBuiltinRegistry

      public MapBuiltinRegistry()
      Construct an empty registry
  • Method Details

    • register

      public void register(String functor, Builtin impl)
      Description copied from class: BuiltinRegistry
      Register an implementation for a given builtin functor.
      Specified by:
      register in class BuiltinRegistry
      Parameters:
      functor - the name of the functor used to invoke the builtin
      impl - the implementation of the builtin
    • register

      public void register(Builtin impl)
      Description copied from class: BuiltinRegistry
      Register an implementation for a given builtin using its default name.
      Specified by:
      register in class BuiltinRegistry
      Parameters:
      impl - the implementation of the builtin
    • getImplementation

      public Builtin getImplementation(String functor)
      Description copied from class: BuiltinRegistry
      Find the implementation of the given builtin functor.
      Specified by:
      getImplementation in class BuiltinRegistry
      Parameters:
      functor - the name of the functor being invoked.
      Returns:
      a Builtin or null if there is none registered under that name
    • getImplementationByURI

      public Builtin getImplementationByURI(String uri)
      Description copied from class: BuiltinRegistry
      Find the implementation of the given builtin functor.
      Specified by:
      getImplementationByURI in class BuiltinRegistry
      Parameters:
      uri - the URI of the builtin to be retrieved
      Returns:
      a Builtin or null if there is none registered under that name