Packages

c

org.apache.daffodil.udf

UserDefinedFunctionProvider

abstract class UserDefinedFunctionProvider extends AnyRef

Abstract class used by ServiceLoader to poll for UDF providers on classpath.

Through this class, several User Defined Functions can be made available to Daffodil via a single entry in the META-INF/services file.

UDF Providers must subclass this, and must initialize the userDefinedFunctionClasses array with all the UDF classes it is providing.

If the UDFs being provided have constructors with arguments, the provider subclass must also implement the createUserDefinedFunction to return an initialized function class object based on the supplied namespace and name.

Subclasses must also supply a src/META-INF/services/org.apache.daffodil.udf.UserDefinedFunctionProvider file in their JAVA project in order to be discoverable by Daffodil.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UserDefinedFunctionProvider
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new UserDefinedFunctionProvider()

Abstract Value Members

  1. abstract def getUserDefinedFunctionClasses(): Array[Class[_ <: AnyRef]]

    Must be implemented to return the classes of the User Defined Function this provider is aware of/providing

    Must be implemented to return the classes of the User Defined Function this provider is aware of/providing

    returns

    array of the different UserDefinedFunction classes it provides

Concrete Value Members

  1. def createUserDefinedFunction(namespaceURI: String, fName: String): UserDefinedFunction

    Finds and initializes User Defined Function class based on namespace and name provided.

    Finds and initializes User Defined Function class based on namespace and name provided. The UserDefinedFunctionIdentification annotation applied to the function class must match name and namespaceURI field passed in from the schema.

    Must be overloaded if the function class's constructor takes arguments. Otherwise it will throw exceptions.

    namespaceURI

    XML namespace associated with schema function call

    fName

    function name called in schema

    returns

    initialized UserDefinedFunction object that must contain evaluate function with desired functionality

    Exceptions thrown

    java.lang.ExceptionInInitializerError if there is an issue initializing the UDF object

    java.lang.IllegalArgumentException if the UDF doesn't have a no-argument constructor

    java.lang.ReflectiveOperationException if the UDF doesn't have a no-argument constructor or if there is an issue initializing the UDF object

    java.lang.SecurityException if security manager exists and disallows access