gpt4 book ai didi

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

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

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

XQueryFunctionLibrary.getDeclarationByKey介绍

[英]Get the function declaration corresponding to a given function name and arity, supplied in the form "{uri}local/arity"
[中]获取对应于给定函数名和arity的函数声明,以“{uri}local/arity”的形式提供

代码示例

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

/**
 * Look for cyclic variable references that go via one or more function calls
 * @param f a used-defined function
 * @param referees a list of variables and functions that refer directly or indirectly to this variable
 * @param globalFunctionLibrary the library containing all global functions
 */
private static void lookForFunctionCycles(
    XQueryFunction f, Stack referees, XQueryFunctionLibrary globalFunctionLibrary) throws XPathException {
  Expression body = f.getBody();
  referees.push(f);
  List list = new ArrayList(10);
  ExpressionTool.gatherReferencedVariables(body, list);
  for (int i=0; i<list.size(); i++) {
    Binding b = (Binding)list.get(i);
    if (b instanceof GlobalVariable) {
      ((GlobalVariable)b).lookForCycles(referees, globalFunctionLibrary);
    }
  }
  list.clear();
  ExpressionTool.gatherCalledFunctionNames(body, list);
  for (int i=0; i<list.size(); i++) {
    XQueryFunction qf = globalFunctionLibrary.getDeclarationByKey((String)list.get(i));
    if (!referees.contains(qf)) {
      // recursive function calls are allowed
      lookForFunctionCycles(qf, referees, globalFunctionLibrary);
    }
  }
  referees.pop();
}

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

/**
 * Look for cyclic variable references that go via one or more function calls
 * @param f a used-defined function
 * @param referees a list of variables and functions that refer directly or indirectly to this variable
 * @param globalFunctionLibrary the library containing all global functions
 */
private static void lookForFunctionCycles(
    XQueryFunction f, Stack referees, XQueryFunctionLibrary globalFunctionLibrary) throws XPathException {
  Expression body = f.getBody();
  referees.push(f);
  List list = new ArrayList(10);
  ExpressionTool.gatherReferencedVariables(body, list);
  for (int i=0; i<list.size(); i++) {
    Binding b = (Binding)list.get(i);
    if (b instanceof GlobalVariable) {
      ((GlobalVariable)b).lookForCycles(referees, globalFunctionLibrary);
    }
  }
  list.clear();
  ExpressionTool.gatherCalledFunctionNames(body, list);
  for (int i=0; i<list.size(); i++) {
    XQueryFunction qf = globalFunctionLibrary.getDeclarationByKey((String)list.get(i));
    if (!referees.contains(qf)) {
      // recursive function calls are allowed
      lookForFunctionCycles(qf, referees, globalFunctionLibrary);
    }
  }
  referees.pop();
}

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

/**
 * Look for cyclic variable references that go via one or more function calls
 *
 * @param f                     a used-defined function
 * @param referees              a list of variables and functions that refer directly or indirectly to this variable
 * @param globalFunctionLibrary the library containing all global functions
 * @throws XPathException if an error occurs during evaluation
 */
private static void lookForFunctionCycles(
    XQueryFunction f, Stack<Object> referees, XQueryFunctionLibrary globalFunctionLibrary) throws XPathException {
  Expression body = f.getBody();
  referees.push(f);
  List<Binding> list = new ArrayList<>(10);
  ExpressionTool.gatherReferencedVariables(body, list);
  for (Binding b : list) {
    if (b instanceof GlobalVariable) {
      ((GlobalVariable) b).lookForCycles(referees, globalFunctionLibrary);
    }
  }
  List<SymbolicName> flist = new ArrayList<>();
  ExpressionTool.gatherCalledFunctionNames(body, flist);
  for (SymbolicName s : flist) {
    XQueryFunction qf = globalFunctionLibrary.getDeclarationByKey(s);
    if (!referees.contains(qf)) {
      // recursive function calls are allowed
      lookForFunctionCycles(qf, referees, globalFunctionLibrary);
    }
  }
  referees.pop();
}

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

/**
 * Look for cyclic variable references that go via one or more function calls
 *
 * @param f                     a used-defined function
 * @param referees              a list of variables and functions that refer directly or indirectly to this variable
 * @param globalFunctionLibrary the library containing all global functions
 * @throws XPathException if an error occurs during evaluation
 */
private static void lookForFunctionCycles(
    XQueryFunction f, Stack<Object> referees, XQueryFunctionLibrary globalFunctionLibrary) throws XPathException {
  Expression body = f.getBody();
  referees.push(f);
  List<Binding> list = new ArrayList<>(10);
  ExpressionTool.gatherReferencedVariables(body, list);
  for (Binding b : list) {
    if (b instanceof GlobalVariable) {
      ((GlobalVariable) b).lookForCycles(referees, globalFunctionLibrary);
    }
  }
  List<SymbolicName> flist = new ArrayList<>();
  ExpressionTool.gatherCalledFunctionNames(body, flist);
  for (SymbolicName s : flist) {
    XQueryFunction qf = globalFunctionLibrary.getDeclarationByKey(s);
    if (!referees.contains(qf)) {
      // recursive function calls are allowed
      lookForFunctionCycles(qf, referees, globalFunctionLibrary);
    }
  }
  referees.pop();
}

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

ExpressionTool.gatherCalledFunctionNames(select, flist);
for (SymbolicName s : flist) {
  XQueryFunction f = globalFunctionLibrary.getDeclarationByKey(s);
  if (!referees.contains(f)) {

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

ExpressionTool.gatherCalledFunctionNames(select, flist);
for (SymbolicName s : flist) {
  XQueryFunction f = globalFunctionLibrary.getDeclarationByKey(s);
  if (!referees.contains(f)) {

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

ExpressionTool.gatherCalledFunctionNames(select, list);
for (int i=0; i<list.size(); i++) {
  XQueryFunction f = globalFunctionLibrary.getDeclarationByKey((String)list.get(i));
  if (!referees.contains(f)) {

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

ExpressionTool.gatherCalledFunctionNames(select, list);
for (int i=0; i<list.size(); i++) {
  XQueryFunction f = globalFunctionLibrary.getDeclarationByKey((String)list.get(i));
  if (!referees.contains(f)) {

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