gpt4 book ai didi

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

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

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

XQueryFunctionLibrary.isAvailable介绍

[英]Test whether a function with a given name and arity is available. This supports the function-available() function in XSLT. This method may be called either at compile time or at run time.
[中]测试具有给定名称和arity的函数是否可用。这支持XSLT中的function-available()函数。此方法可以在编译时或运行时调用。

代码示例

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

/**
   * Test whether an extension function with a given name and arity is available. This supports
   * the function-available() function in XSLT. This method may be called either at compile time
   * or at run time. If the function library is to be used only in an XQuery or free-standing XPath
   * environment, this method may throw an UnsupportedOperationException.
   *
   * @param functionName the name of the function in question
   * @param arity       The number of arguments. This is set to -1 in the case of the single-argument
   *                    function-available() function; in this case the method should return true if there is some
   */

  public boolean isAvailable(StructuredQName functionName, int arity) {
    return namespaces.contains(functionName.getNamespaceURI()) &&
        baseLibrary.isAvailable(functionName, arity);
  }
}

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

/**
   * Test whether an extension function with a given name and arity is available. This supports
   * the function-available() function in XSLT. This method may be called either at compile time
   * or at run time. If the function library is to be used only in an XQuery or free-standing XPath
   * environment, this method may throw an UnsupportedOperationException.
   *
   * @param functionName the name of the function in question
   * @param arity       The number of arguments. This is set to -1 in the case of the single-argument
   *                    function-available() function; in this case the method should return true if there is some
   */

  public boolean isAvailable(StructuredQName functionName, int arity) {
    return namespaces.contains(functionName.getNamespaceURI()) &&
        baseLibrary.isAvailable(functionName, arity);
  }
}

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

/**
 * Test whether a function with a given name and arity is available. This supports
 * the function-available() function in XSLT. This method may be called either at compile time
 * or at run time.
 * @param functionName the QName identifying the function
 * @param arity The number of arguments. This is set to -1 in the case of the single-argument
 * function-available() function; in this case the method should return true if there is some
 */
public boolean isAvailable(StructuredQName functionName, int arity) {
  if (arity == -1) {
    // we'll just test arity 0..20. Since this method is supporting an XSLT-only interrogative
    // on an XQuery function library, the outcome isn't too important.
    for (int i=0; i<20; i++) {
      if (isAvailable(functionName, i)) {
        return true;
      }
    }
    return false;
  }
  return (functions.get(XQueryFunction.getIdentificationKey(functionName, arity)) != null);
}

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

/**
 * Test whether a function with a given name and arity is available. This supports
 * the function-available() function in XSLT. This method may be called either at compile time
 * or at run time.
 * @param functionName the QName identifying the function
 * @param arity The number of arguments. This is set to -1 in the case of the single-argument
 * function-available() function; in this case the method should return true if there is some
 */
public boolean isAvailable(StructuredQName functionName, int arity) {
  if (arity == -1) {
    // we'll just test arity 0..20. Since this method is supporting an XSLT-only interrogative
    // on an XQuery function library, the outcome isn't too important.
    for (int i=0; i<20; i++) {
      if (isAvailable(functionName, i)) {
        return true;
      }
    }
    return false;
  }
  return (functions.get(XQueryFunction.getIdentificationKey(functionName, arity)) != null);
}

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

/**
   * Test whether a function with a given name and arity is available
   * <p>This supports the function-available() function in XSLT.</p>
   *
   * @param functionName the qualified name of the function being called
   * @return true if a function of this name and arity is available for calling
   */
  public boolean isAvailable(SymbolicName.F functionName) {
    return namespaces.contains(functionName.getComponentName().getURI()) && baseLibrary.isAvailable(functionName);
  }
}

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

/**
   * Test whether a function with a given name and arity is available
   * <p>This supports the function-available() function in XSLT.</p>
   *
   * @param functionName the qualified name of the function being called
   * @return true if a function of this name and arity is available for calling
   */
  public boolean isAvailable(SymbolicName.F functionName) {
    return namespaces.contains(functionName.getComponentName().getURI()) && baseLibrary.isAvailable(functionName);
  }
}

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