Class XPathFunction

java.lang.Object
de.aristaflow.adept2.model.common.xml.XPathFunction
All Implemented Interfaces:
net.sf.saxon.s9api.ExtensionFunction

public abstract class XPathFunction extends Object implements net.sf.saxon.s9api.ExtensionFunction
This class provides the basic means for a function used within XPath. Each function needs to have a unique name and will be called while evaluating XPath. It may have one or several input parameters and one return value or nothing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.sf.saxon.s9api.SequenceType[]
    The type of the input parameter of this function.
    protected final net.sf.saxon.s9api.QName
    The unique name of this function in XPath.
    protected final net.sf.saxon.s9api.SequenceType
    The type of the return value of this function.
  • Constructor Summary

    Constructors
    Constructor
    Description
    XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType paramType, net.sf.saxon.s9api.OccurrenceIndicator paramOcc)
    Creates a new XPath function with the designated simple input and no return value.
    XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType resType, net.sf.saxon.s9api.OccurrenceIndicator resOcc, Pair<net.sf.saxon.s9api.ItemType,net.sf.saxon.s9api.OccurrenceIndicator>... params)
    Creates a new XPath function with the designated return value and the designated input parameters.
    XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType paramType, net.sf.saxon.s9api.OccurrenceIndicator paramOcc, net.sf.saxon.s9api.ItemType resType, net.sf.saxon.s9api.OccurrenceIndicator resOcc)
    Creates a new XPath function with the designated simple input parameter and the designated return value.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.sf.saxon.s9api.SequenceType[]
     
    net.sf.saxon.s9api.QName
     
    net.sf.saxon.s9api.SequenceType
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.sf.saxon.s9api.ExtensionFunction

    call
  • Field Details

    • name

      protected final net.sf.saxon.s9api.QName name
      The unique name of this function in XPath.
    • argType

      protected final net.sf.saxon.s9api.SequenceType[] argType
      The type of the input parameter of this function.
    • resType

      protected final net.sf.saxon.s9api.SequenceType resType
      The type of the return value of this function.
  • Constructor Details

    • XPathFunction

      public XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType paramType, net.sf.saxon.s9api.OccurrenceIndicator paramOcc)
      Creates a new XPath function with the designated simple input and no return value.
      Parameters:
      funcName - The unique name of this XPath function.
      paramType - The type of the input parameter of this XPath function.
      paramOcc - The occurrence of the input parameter of this XPath function. If this is more than 1, each occurrence will be a new input parameter.
    • XPathFunction

      public XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType paramType, net.sf.saxon.s9api.OccurrenceIndicator paramOcc, net.sf.saxon.s9api.ItemType resType, net.sf.saxon.s9api.OccurrenceIndicator resOcc)
      Creates a new XPath function with the designated simple input parameter and the designated return value.
      Parameters:
      funcName - The unique name of this XPath function.
      paramType - The type of the input parameter of this XPath function.
      paramOcc - The occurrence of the input parameter of this XPath function. If this is more than 1, each occurrence will be a new input parameter.
      resType - The type of the return value of this XPath function.
      resOcc - The occurrence of the input parameter of this XPath function.
    • XPathFunction

      @SafeVarargs public XPathFunction(net.sf.saxon.s9api.QName funcName, net.sf.saxon.s9api.ItemType resType, net.sf.saxon.s9api.OccurrenceIndicator resOcc, Pair<net.sf.saxon.s9api.ItemType,net.sf.saxon.s9api.OccurrenceIndicator>... params)
      Creates a new XPath function with the designated return value and the designated input parameters.
      Parameters:
      funcName - The unique name of this XPath function.
      resType - The type of the return value of this XPath function or null for no return value.
      resOcc - The occurrence of the input parameter of this XPath function.
      params - The input parameters of this XPath function or null for no input parameters. If the occurrence of an input parameter is many, there will be several input parameters of this type at this position thus moving the positions of the following parameters.
  • Method Details

    • getName

      public net.sf.saxon.s9api.QName getName()
      Specified by:
      getName in interface net.sf.saxon.s9api.ExtensionFunction
    • getArgumentTypes

      public net.sf.saxon.s9api.SequenceType[] getArgumentTypes()
      Specified by:
      getArgumentTypes in interface net.sf.saxon.s9api.ExtensionFunction
    • getResultType

      public net.sf.saxon.s9api.SequenceType getResultType()
      Specified by:
      getResultType in interface net.sf.saxon.s9api.ExtensionFunction