Package org.exist.xquery

Examples of org.exist.xquery.FunctionSignature


        //get the entry-filter function and check its types
        if(!(args[1].itemAt(0) instanceof FunctionReference))
            throw new XPathException("No entry-filter function provided.");
        entryFilterFunction = (FunctionReference)args[1].itemAt(0);
        FunctionSignature entryFilterFunctionSig = entryFilterFunction.getSignature();
        if(entryFilterFunctionSig.getArgumentCount() < 3)
            throw new XPathException("entry-filter function must take at least 3 arguments.");

        filterParam = args[2];
       
        //get the entry-data function and check its types
        if(!(args[3].itemAt(0) instanceof FunctionReference))
            throw new XPathException("No entry-data function provided.");
        entryDataFunction = (FunctionReference)args[3].itemAt(0);
        FunctionSignature entryDataFunctionSig = entryDataFunction.getSignature();
        if(entryDataFunctionSig.getArgumentCount() < 3)
            throw new XPathException("entry-data function must take at least 3 arguments");

        storeParam = args[4];
       
        BinaryValue compressedData = ((BinaryValue)args[0].itemAt(0));
View Full Code Here


           
            CompiledXQuery compiledQuery = xquery.compile(context, query);
           
      for(Iterator<UserDefinedFunction> i = context.localFunctions(); i.hasNext(); ) {
        UserDefinedFunction func = i.next();
        FunctionSignature sig = func.getSignature();
       
        for (Annotation ann : sig.getAnnotations()) {
          if ("http://exist-db.org/xquery/xUnit".equals( ann.getName().getNamespaceURI())) {
            System.out.println(ann.getName().getLocalName());
           
            FunctionCall call = new FunctionCall(context, func);
            call.eval(Sequence.EMPTY_SEQUENCE);
View Full Code Here

        if(!(args[2].itemAt(0) instanceof FunctionReference))
            throw new XPathException("No chat listener function provided.");
       
        FunctionReference chatListenerFunctionRef = (FunctionReference)args[2].itemAt(0);
       
        FunctionSignature chatListenerFunctionSig = chatListenerFunctionRef.getSignature();
        if(chatListenerFunctionSig.getArgumentCount() < 3)
            throw new XPathException("Chat listener function must take at least 3 arguments.");
        chatListenerFunctionRef.setContext(context.copyContext());
       
        Sequence listenerParam = args[3];
       
View Full Code Here

    final AttributesImpl attribs = new AttributesImpl();
    attribs.addAttribute("", "name", "name", "CDATA", qname.getStringValue());
    attribs.addAttribute("", "module", "module", "CDATA", uri);
    final int nodeNr = builder.startElement("", "function", "function", attribs);
   
    FunctionSignature signature;
    final Module module = context.getModule(uri);
    if(module != null) {
      final Iterator<FunctionSignature> i = module.getSignaturesForFunction(qname);
      while(i.hasNext()) {
        signature = i.next();
View Full Code Here

TOP

Related Classes of org.exist.xquery.FunctionSignature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.