Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.query
Class XQueryFunction

    java.lang.Object
      net.sf.saxon.query.XQueryFunction

All Implemented Interfaces:
  Container, Declaration, InstructionInfo, LocationProvider, org.xml.sax.Locator, SaxonLocator, javax.xml.transform.SourceLocator

public class XQueryFunction
extends java.lang.Object
implements InstructionInfo, Container, Declaration

Constructor Summary
`XQueryFunction()`

Method Summary
`void` | `checkReferences(StaticContext env)` Type-check references to this function
`UserFunction` | `compile(StaticQueryContext env)`
`void` | `explain(NamePool pool)` Produce diagnostic output showing the compiled and optimized expression tree for a function
`void` | `fixupReferences(StaticContext env)` Fix up references to this function
`SequenceType[]` | `getArgumentTypes()`
`int` | `getColumnNumber()` Return the column number
`int` | `getConstructType()` Get the type of construct.
`Executable` | `getExecutable()` Get the Executable (representing a complete stylesheet or query) of which this Container forms part
`java.lang.String` | `getFunctionDisplayName(NamePool pool)`
`int` | `getFunctionFingerprint()`
`int` | `getHostLanguage()` Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
`int` | `getLineNumber()` Get the line number of the instruction in the source stylesheet module.
`int` | `getLineNumber(int locationId)`
`LocationProvider` | `getLocationProvider()` Get the LocationProvider allowing location identifiers to be resolved.
`int` | `getNameCode()`
`NamespaceResolver` | `getNamespaceResolver()` Get the namespace context of the instruction.
`int` | `getNumberOfArguments()`
`int` | `getObjectNameCode()` Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc.
`UserFunctionParameter[]` | `getParameterDefinitions()`
`java.util.Iterator` | `getProperties()` Get an iterator over all the properties available.
`java.lang.Object` | `getProperty(java.lang.String name)` Get the value of a particular property of the instruction.
`java.lang.String` | `getPublicId()` Return the public identifier for the current document event.
`SequenceType` | `getResultType()`
`StaticContext` | `getStaticContext()`
`java.lang.String` | `getSystemId()` Get the system identifier (URI) of the source module containing the instruction.
`java.lang.String` | `getSystemId(int locationId)`
`UserFunction` | `getUserFunction()` Get the callable compiled function contained within this XQueryFunction definition.
`void` | `registerReference(UserFunctionCall ufc)`
`void` | `setExecutable(Executable exec)`
`void` | `setNameCode(int nameCode)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XQueryFunction

    public XQueryFunction()

Method Detail

### setNameCode

    public void setNameCode(int nameCode)

### getNameCode

    public int getNameCode()

### getFunctionDisplayName

    public java.lang.String getFunctionDisplayName(NamePool pool)

### getFunctionFingerprint

    public int getFunctionFingerprint()

### getResultType

    public SequenceType getResultType()

### setExecutable

    public void setExecutable(Executable exec)

### getExecutable

    public Executable getExecutable()

  Description copied from interface: `Container`
  Get the Executable (representing a complete stylesheet or query) of which this Container forms part

  Specified by:
    `getExecutable` in interface `Container`

### getLocationProvider

    public LocationProvider getLocationProvider()

  Get the LocationProvider allowing location identifiers to be resolved.

  Specified by:
    `getLocationProvider` in interface `Container`

### getStaticContext

    public StaticContext getStaticContext()

### getArgumentTypes

    public SequenceType[] getArgumentTypes()

### getParameterDefinitions

    public UserFunctionParameter[] getParameterDefinitions()

### getNumberOfArguments

    public int getNumberOfArguments()

### registerReference

    public void registerReference(UserFunctionCall ufc)

### compile

    public UserFunction compile(StaticQueryContext env)
                         throws StaticError

  Throws:
    `StaticError`

### fixupReferences

    public void fixupReferences(StaticContext env)
                         throws XPathException

  Fix up references to this function

  Throws:
    `XPathException`

### checkReferences

    public void checkReferences(StaticContext env)
                         throws XPathException

  Type-check references to this function

  Throws:
    `XPathException`

### explain

    public void explain(NamePool pool)

  Produce diagnostic output showing the compiled and optimized expression tree for a function

  Parameters:
    `pool` - the namepool to be used

### getUserFunction

    public UserFunction getUserFunction()

  Get the callable compiled function contained within this XQueryFunction definition.

### getConstructType

    public int getConstructType()

  Get the type of construct. This will be a constant in class `Location`.

  Specified by:
    `getConstructType` in interface `InstructionInfo`

### getObjectNameCode

    public int getObjectNameCode()

  Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically.

  Specified by:
    `getObjectNameCode` in interface `InstructionInfo`

### getSystemId

    public java.lang.String getSystemId()

  Get the system identifier (URI) of the source module containing the instruction. This will generally be an absolute URI. If the system identifier is not known, the method may return null. In some cases, for example where XML external entities are used, the correct system identifier is not always retained.

  Specified by:
    `getSystemId` in interface `InstructionInfo`

### getLineNumber

    public int getLineNumber()

  Get the line number of the instruction in the source stylesheet module. If this is not known, or if the instruction is an artificial one that does not relate to anything in the source code, the value returned may be -1.

  Specified by:
    `getLineNumber` in interface `InstructionInfo`

### getPublicId

    public java.lang.String getPublicId()

  Return the public identifier for the current document event.

  Specified by:
    `getPublicId` in interface `org.xml.sax.Locator`
  Returns:
    A string containing the public identifier, or null if none is available.
  See Also:
    `getSystemId()`

### getColumnNumber

    public int getColumnNumber()

  Return the column number

  Specified by:
    `getColumnNumber` in interface `org.xml.sax.Locator`
  Returns:
    The column number, or -1 if none is available.
  See Also:
    `getLineNumber()`

### getSystemId

    public java.lang.String getSystemId(int locationId)

  Specified by:
    `getSystemId` in interface `LocationProvider`

### getLineNumber

    public int getLineNumber(int locationId)

  Specified by:
    `getLineNumber` in interface `LocationProvider`

### getNamespaceResolver

    public NamespaceResolver getNamespaceResolver()

  Get the namespace context of the instruction. This will not always be available, in which case the method returns null.

  Specified by:
    `getNamespaceResolver` in interface `InstructionInfo`

### getProperty

    public java.lang.Object getProperty(java.lang.String name)

  Get the value of a particular property of the instruction. Properties of XSLT instructions are generally known by the name of the stylesheet attribute that defines them.

  Specified by:
    `getProperty` in interface `InstructionInfo`
  Parameters:
    `name` - The name of the required property
  Returns:
    The value of the requested property, or null if the property is not available

### getProperties

    public java.util.Iterator getProperties()

  Get an iterator over all the properties available. The values returned by the iterator will be of type String, and each string can be supplied as input to the getProperty() method to retrieve the value of the property.

  Specified by:
    `getProperties` in interface `InstructionInfo`

### getHostLanguage

    public int getHostLanguage()

  Get the host language (XSLT, XQuery, XPath) used to implement the code in this container

  Specified by:
    `getHostLanguage` in interface `Container`
  Returns:
    typically `Configuration.XSLT` or `Configuration.XQUERY`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD