gpt4 book ai didi

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

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

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

XQueryFunction.getIdentificationKey介绍

[英]Get an identifying key for this function, which incorporates the URI and local part of the function name plus the arity
[中]获取此函数的标识键,该键包含函数名的URI和本地部分以及arity

代码示例

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

/**
 * Get the function declaration corresponding to a given function name and arity
 * @return the XQueryFunction if there is one, or null if not.
 */
public XQueryFunction getDeclaration(StructuredQName functionName, Expression[] staticArgs) {
  String functionKey = XQueryFunction.getIdentificationKey(
      functionName, staticArgs.length);
  return (XQueryFunction)functions.get(functionKey);
}

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

/**
 * Get the function declaration corresponding to a given function name and arity
 *
 * @return the XQueryFunction if there is one, or null if not.
 */
public XQueryFunction getDeclaration(StructuredQName functionName, int staticArgs) {
  SymbolicName functionKey = XQueryFunction.getIdentificationKey(
      functionName, staticArgs);
  return functions.get(functionKey);
}

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

/**
 * Get the function declaration corresponding to a given function name and arity
 * @return the XQueryFunction if there is one, or null if not.
 */
public XQueryFunction getDeclaration(StructuredQName functionName, Expression[] staticArgs) {
  String functionKey = XQueryFunction.getIdentificationKey(
      functionName, staticArgs.length);
  return (XQueryFunction)functions.get(functionKey);
}

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

/**
 * Get the function declaration corresponding to a given function name and arity
 *
 * @return the XQueryFunction if there is one, or null if not.
 */
public XQueryFunction getDeclaration(StructuredQName functionName, int staticArgs) {
  SymbolicName functionKey = XQueryFunction.getIdentificationKey(
      functionName, staticArgs);
  return functions.get(functionKey);
}

代码示例来源: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.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: org.opengis.cite.saxon/saxon9

/**
 * Register a user-defined XQuery function
 * @param function the function to be registered
 * @throws XPathException if there is an existing function with the same name and arity
 */
public void declareFunction(XQueryFunction function) throws XPathException {
  String keyObj = function.getIdentificationKey();
  XQueryFunction existing = (XQueryFunction)functions.get(keyObj);
  if (existing != null) {
    XPathException err = new XPathException("Duplicate definition of function " +
        function.getDisplayName() +
        " (see line " + existing.getLineNumber() + " in " + existing.getSystemId() + ')');
    err.setErrorCode("XQST0034");
    err.setIsStaticError(true);
    err.setLocator(function);
    throw err;
  }
  functions.put(keyObj, function);
}

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

/**
 * Register a user-defined XQuery function
 * @param function the function to be registered
 * @throws XPathException if there is an existing function with the same name and arity
 */
public void declareFunction(XQueryFunction function) throws XPathException {
  String keyObj = function.getIdentificationKey();
  XQueryFunction existing = (XQueryFunction)functions.get(keyObj);
  if (existing != null) {
    XPathException err = new XPathException("Duplicate definition of function " +
        function.getDisplayName() +
        " (see line " + existing.getLineNumber() + " in " + existing.getSystemId() + ')');
    err.setErrorCode("XQST0034");
    err.setIsStaticError(true);
    err.setLocator(function);
    throw err;
  }
  functions.put(keyObj, function);
}

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

/**
 * Register a user-defined XQuery function
 *
 * @param function the function to be registered
 * @throws XPathException if there is an existing function with the same name and arity
 */
public void declareFunction(/*@NotNull*/ XQueryFunction function) throws XPathException {
  SymbolicName keyObj = function.getIdentificationKey();
  XQueryFunction existing = functions.get(keyObj);
  if (existing == function) {
    return;
  }
  if (existing != null) {
    XPathException err = new XPathException("Duplicate definition of function " +
        function.getDisplayName() +
        " (see line " + existing.getLineNumber() + " in " + existing.getSystemId() + ')');
    err.setErrorCode("XQST0034");
    err.setIsStaticError(true);
    err.setLocator(function);
    throw err;
  }
  functions.put(keyObj, function);
}

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

/**
 * Register a user-defined XQuery function
 *
 * @param function the function to be registered
 * @throws XPathException if there is an existing function with the same name and arity
 */
public void declareFunction(/*@NotNull*/ XQueryFunction function) throws XPathException {
  SymbolicName keyObj = function.getIdentificationKey();
  XQueryFunction existing = functions.get(keyObj);
  if (existing == function) {
    return;
  }
  if (existing != null) {
    XPathException err = new XPathException("Duplicate definition of function " +
        function.getDisplayName() +
        " (see line " + existing.getLineNumber() + " in " + existing.getSystemId() + ')');
    err.setErrorCode("XQST0034");
    err.setIsStaticError(true);
    err.setLocator(function);
    throw err;
  }
  functions.put(keyObj, function);
}

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

String functionKey = XQueryFunction.getIdentificationKey(
    functionName, arguments.length);
XQueryFunction fd = (XQueryFunction)functions.get(functionKey);

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

String functionKey = XQueryFunction.getIdentificationKey(
    functionName, arguments.length);
XQueryFunction fd = (XQueryFunction)functions.get(functionKey);

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