Module dev.metaschema.core
Package dev.metaschema.core.metapath.function
package dev.metaschema.core.metapath.function
Provides the core framework for defining and executing Metapath functions.
This package contains the foundational interfaces and classes for implementing functions that can be called within Metapath expressions. It supports function registration, resolution, and execution based on the XPath 3.1 function model.
Key Interfaces
IFunction- Represents a function signature with its name, arguments, return type, and propertiesIFunctionLibrary- Provides access to a collection of function signaturesIFunctionExecutor- Executes a function with provided argumentsIArgument- Represents a single function argument signature
Key Classes
DefaultFunction- Concrete implementation of a function signatureFunctionService- Service-based function discovery using Java ServiceLoaderFunctionLibrary- Registry for organizing and looking up functions
Usage
Functions are registered in libraries and resolved by name and arity during
Metapath expression evaluation. The FunctionService loads function
libraries using the Java ServiceLoader mechanism, making them available to
the Metapath evaluator.
-
ClassDescriptionRepresents an error that occurred while performing mathematical operations.Represents an immutable execution context for function calls in Metapath expressions.FOCA: Exceptions related to type casting.A collection of comparison functions supporting value and general comparisons.Comparison operators.FODT: Exceptions related to Date/Time/Duration errors.Provides a concrete implementation of a function call executor.FODC: Exceptions representing document related errors.Provides a catalog of registered function implementations.Represents an error that occurs during Metapath function evaluation.Supports looking up named Metapath functions that are loaded using the
ServiceLoaderinterface.A collection of utility functions for use in implementing Metapath functions.Represents a single function argument signature.Used to create an argument's signature using a builder pattern.A common interface for all Metapath functions.Used to create a function's signature using a builder pattern.Details specific characteristics of a function.This functional interface provides a dispatch method for executing a function call.Provides access to a collection of Metapath function signatures.Resolves Metapath function signatures based on name and arity.FORG: Exceptions related to argument types.FOTY: Exceptions related to type errors.FORG0001: Thrown when a cast operation fails because the supplied value cannot be converted to the target datatype.FOJS: Exceptions related to JSON function operations in XPath.FOER0000: Thrown when an unidentified error occurs during function evaluation.FONS: Exceptions related to function namespaces.