Examples of UserDefinedFunction


Examples of mondrian.spi.UserDefinedFunction

    public static UserDefinedFunction createUdf(
        Class<? extends UserDefinedFunction> udfClass,
        String functionName)
    {
        // Instantiate class with default constructor.
        UserDefinedFunction udf;
        String className = udfClass.getName();
        String functionNameOrEmpty =
            functionName == null
                ? ""
                : functionName;
View Full Code Here

Examples of mondrian.spi.UserDefinedFunction

    private void defineUdf(
        Builder builder,
        Class<UserDefinedFunction> udfClass)
    {
        // Instantiate class with default constructor.
        final UserDefinedFunction udf = Util.createUdf(udfClass, null);

        // Validate function.
        validateFunction(udf);

        // Define function.
View Full Code Here

Examples of mondrian.spi.UserDefinedFunction

                }
                expCalcs[i] = new CalcExp(calc, scalarCalc, listCalc, iterCalc);
            }

            // Clone the UDF, because some UDFs use member variables as state.
            UserDefinedFunction udf2 =
                Util.createUdf(
                    udf.getClass(), udf.getName());
            if (call.getType() instanceof SetType) {
                return new ListCalcImpl(call, calcs, udf2, expCalcs);
            } else {
View Full Code Here

Examples of mondrian.spi.UserDefinedFunction

    private void defineUdf(
        Builder builder,
        UdfResolver.UdfFactory udfFactory)
    {
        // Instantiate class with default constructor.
        final UserDefinedFunction udf = udfFactory.create();

        // Validate function.
        validateFunction(udf);

        // Define function.
View Full Code Here

Examples of mondrian.spi.UserDefinedFunction

    public static UserDefinedFunction createUdf(
        Class<? extends UserDefinedFunction> udfClass,
        String functionName)
    {
        // Instantiate class with default constructor.
        UserDefinedFunction udf;
        String className = udfClass.getName();
        String functionNameOrEmpty =
            functionName == null
                ? ""
                : functionName;
View Full Code Here

Examples of mondrian.spi.UserDefinedFunction

                expCalcs[i] = new CalcExp(calc, scalarCalc, listCalc, iterCalc);
            }

            // Create a new instance of the UDF, because some UDFs use member
            // variables as state.
            UserDefinedFunction udf2 = factory.create();
            if (call.getType() instanceof SetType) {
                return new ListCalcImpl(call, calcs, udf2, expCalcs);
            } else {
                return new ScalarCalcImpl(call, calcs, udf2, expCalcs);
            }
View Full Code Here

Examples of org.exist.xquery.UserDefinedFunction

        final ProcessMonitor pm = db.getProcessMonitor();

            //execute the XQuery
            try {
            final UserDefinedFunction function = context.resolveFunction(functionName, 0);
            if (function != null) {
                  context.getProfiler().traceQueryStart();
                  pm.queryStarted(context.getWatchDog());
                 
                  final FunctionCall call = new FunctionCall(context, function);
View Full Code Here

Examples of org.exist.xquery.UserDefinedFunction

            //look at each function
            final Iterator<UserDefinedFunction> itFunctions = compiled.getContext().localFunctions();

            final Set<URI> xqueryLocations = new HashSet<URI>();
            while(itFunctions.hasNext()) {
                final UserDefinedFunction function = itFunctions.next();
                final Annotation annotations[] = function.getSignature().getAnnotations();

                Set<org.exquery.xquery3.Annotation> functionRestAnnotations = null;

                //process the function annotations
                for(final Annotation annotation : annotations) {
View Full Code Here

Examples of org.exist.xquery.UserDefinedFunction

            Source query = new ClassLoaderSource(source);
           
            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());
           
View Full Code Here

Examples of org.exist.xquery.UserDefinedFunction

           
            //get a compiled query service from the cache
            xquery = cache.getCompiledQuery(broker, resourceFunction.getXQueryLocation());
           
            //find the function that we will execute
            final UserDefinedFunction fn = findFunction(xquery, resourceFunction.getFunctionSignature());
           
            final XQueryContext xqueryContext = xquery.getContext();
           
            //set the request object - can later be used by the EXQuery Request Module
            xqueryContext.setAttribute(EXQ_REQUEST_ATTR, request);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.