gpt4 book ai didi

net.sf.saxon.query.XQueryFunction.getUserFunction()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 08:07:05 27 4
gpt4 key购买 nike

本文整理了Java中net.sf.saxon.query.XQueryFunction.getUserFunction()方法的一些代码示例,展示了XQueryFunction.getUserFunction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XQueryFunction.getUserFunction()方法的具体详情如下:
包路径:net.sf.saxon.query.XQueryFunction
类名称:XQueryFunction
方法名:getUserFunction

XQueryFunction.getUserFunction介绍

[英]Get the callable compiled function contained within this XQueryFunction definition.
[中]获取此XQueryFunction定义中包含的可调用编译函数。

代码示例

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Get the function with a given name and arity. This method is provided so that XQuery functions
 * can be called directly from a Java application. Note that there is no type checking or conversion
 * of arguments when this is done: the arguments must be provided in exactly the form that the function
 * signature declares them.
 * @param uri the uri of the function name
 * @param localName the local part of the function name
 * @param arity the number of arguments.
 * @return the function identified by the URI, local name, and arity; or null if there is no such function
 */
public UserFunction getUserDefinedFunction(String uri, String localName, int arity) {
  String functionKey = XQueryFunction.getIdentificationKey(uri, localName, arity);
  XQueryFunction fd = (XQueryFunction)functions.get(functionKey);
  if (fd==null) {
    return null;
  }
  return fd.getUserFunction();
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
 * Get the function with a given name and arity. This method is provided so that XQuery functions
 * can be called directly from a Java application. Note that there is no type checking or conversion
 * of arguments when this is done: the arguments must be provided in exactly the form that the function
 * signature declares them.
 * @param uri the uri of the function name
 * @param localName the local part of the function name
 * @param arity the number of arguments.
 * @return the function identified by the URI, local name, and arity; or null if there is no such function
 */
public UserFunction getUserDefinedFunction(String uri, String localName, int arity) {
  String functionKey = XQueryFunction.getIdentificationKey(uri, localName, arity);
  XQueryFunction fd = (XQueryFunction)functions.get(functionKey);
  if (fd==null) {
    return null;
  }
  return fd.getUserFunction();
}

代码示例来源:origin: dsukhoroslov/bagri

private <R> List<R> lookupFunctions(FunctionLibraryList fll, FunctionExtractor<R> ext) {
  List<R> fl = new ArrayList<>();
  for (FunctionLibrary lib: fll.getLibraryList()) {
    logger.trace("lookupFunctions; function library: {}; class: {}", lib.toString(), lib.getClass().getName());
    if (lib instanceof FunctionLibraryList) {
      fl.addAll(lookupFunctions((FunctionLibraryList) lib, ext));
    //} else if (lib instanceof ExecutableFunctionLibrary) {
    //	ExecutableFunctionLibrary efl = (ExecutableFunctionLibrary) lib;
    //	Iterator<UserFunction> itr = efl.iterateFunctions();
    //	while (itr.hasNext()) {
    //		fl.add(getFunctionDeclaration(itr.next()));
    //	}
    } else if (lib instanceof XQueryFunctionLibrary) {
      XQueryFunctionLibrary xqfl = (XQueryFunctionLibrary) lib;
      Iterator<XQueryFunction> itr = xqfl.getFunctionDefinitions();
      while (itr.hasNext()) {
        XQueryFunction fn = itr.next();
        logger.trace("lookupFunctions; fn: {}", fn.getDisplayName());
        R result = ext.extractFunction(fn.getUserFunction());
        if (result != null) {
          fl.add(result);
        }
      }
    }
  }
  return fl;
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * Get the function with a given name and arity. This method is provided so that XQuery functions
 * can be called directly from a Java application. Note that there is no type checking or conversion
 * of arguments when this is done: the arguments must be provided in exactly the form that the function
 * signature declares them.
 *
 * @param uri       the uri of the function name
 * @param localName the local part of the function name
 * @param arity     the number of arguments.
 * @return the function identified by the URI, local name, and arity; or null if there is no such function
 */
/*@Nullable*/
public UserFunction getUserDefinedFunction(/*@NotNull*/ String uri, /*@NotNull*/ String localName, int arity) {
  SymbolicName functionKey = new SymbolicName.F(new StructuredQName("", uri, localName), arity);
  XQueryFunction fd = functions.get(functionKey);
  if (fd == null) {
    return null;
  }
  return fd.getUserFunction();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * Get the function with a given name and arity. This method is provided so that XQuery functions
 * can be called directly from a Java application. Note that there is no type checking or conversion
 * of arguments when this is done: the arguments must be provided in exactly the form that the function
 * signature declares them.
 *
 * @param uri       the uri of the function name
 * @param localName the local part of the function name
 * @param arity     the number of arguments.
 * @return the function identified by the URI, local name, and arity; or null if there is no such function
 */
/*@Nullable*/
public UserFunction getUserDefinedFunction(/*@NotNull*/ String uri, /*@NotNull*/ String localName, int arity) {
  SymbolicName functionKey = new SymbolicName.F(new StructuredQName("", uri, localName), arity);
  XQueryFunction fd = functions.get(functionKey);
  if (fd == null) {
    return null;
  }
  return fd.getUserFunction();
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * Declare an imported XQuery function
 *
 * @param function the imported function
 * @throws net.sf.saxon.trans.XPathException if an error occurs
 */
public void declareXQueryFunction(XQueryFunction function) throws XPathException {
  XQueryFunctionLibrary lib = getStylesheetPackage().getXQueryFunctionLibrary();
  if (getStylesheetPackage().getFunction(function.getUserFunction().getSymbolicName()) != null) {
    throw new XPathException("Duplication declaration of " +
                     function.getUserFunction().getSymbolicName(), "XQST0034");
  }
  lib.declareFunction(function);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * Declare an imported XQuery function
 *
 * @param function the imported function
 * @throws net.sf.saxon.trans.XPathException if an error occurs
 */
public void declareXQueryFunction(XQueryFunction function) throws XPathException {
  XQueryFunctionLibrary lib = getStylesheetPackage().getXQueryFunctionLibrary();
  if (getStylesheetPackage().getFunction(function.getUserFunction().getSymbolicName()) != null) {
    throw new XPathException("Duplication declaration of " +
                     function.getUserFunction().getSymbolicName(), "XQST0034");
  }
  lib.declareFunction(function);
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

XQueryFunction gf = fiter.next();
Expression body = gf.getUserFunction().getBody();
if (body != null) {
  List<Binding> vList = new ArrayList<>(10);

代码示例来源:origin: org.opengis.cite.saxon/saxon9

XQueryFunction gf = (XQueryFunction)fiter.next();
List list = new ArrayList(10);
Expression body = gf.getUserFunction().getBody();
if (body != null) {
  ExpressionTool.gatherReferencedVariables(body, list);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

XQueryFunction gf = fiter.next();
Expression body = gf.getUserFunction().getBody();
if (body != null) {
  List<Binding> vList = new ArrayList<>(10);

代码示例来源:origin: net.sourceforge.saxon/saxon

XQueryFunction gf = (XQueryFunction)fiter.next();
List list = new ArrayList(10);
Expression body = gf.getUserFunction().getBody();
if (body != null) {
  ExpressionTool.gatherReferencedVariables(body, list);

代码示例来源:origin: net.sf.saxon/Saxon-HE

ufc.setArguments(arguments);
ufc.setStaticType(fd.getResultType());
UserFunction fn = fd.getUserFunction();
if (fn == null) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

ufc.setArguments(arguments);
ufc.setStaticType(fd.getResultType());
UserFunction fn = fd.getUserFunction();
if (fn == null) {

代码示例来源:origin: org.opengis.cite.saxon/saxon9

ufc.setArguments(arguments);
ufc.setStaticType(fd.getResultType());
UserFunction fn = fd.getUserFunction();
if (fn == null) {

代码示例来源:origin: net.sourceforge.saxon/saxon

ufc.setArguments(arguments);
ufc.setStaticType(fd.getResultType());
UserFunction fn = fd.getUserFunction();
if (fn == null) {

代码示例来源:origin: com.helger/ph-schematron

new XPathFunctionFromUserFunction (aConfiguration,
                 aXQController,
                 aXQueryFunction.getUserFunction ()));

代码示例来源:origin: phax/ph-schematron

new XPathFunctionFromUserFunction (aConfiguration,
                 aXQController,
                 aXQueryFunction.getUserFunction ()));

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com