Package org.exist.xquery.value

Examples of org.exist.xquery.value.StringValue


                   

                    for(final Entry param : params.entrySet()) {
                        final String key = (String)param.getKey();
                        final String value = (String)param.getValue();
                        context.declareVariable( bindingPrefix + ":" + key, new StringValue(value));
                    }
                }

                xquery.execute(compiled, null);
View Full Code Here


    {
        String dataType = isDirectory ? "folder" : "resource";

        //call the entry-filter function
        Sequence filterParams[] = new Sequence[3];
        filterParams[0] = new StringValue(name);
        filterParams[1] = new StringValue(dataType);
        filterParams[2] = filterParam;
        Sequence entryFilterFunctionResult = entryFilterFunction.evalFunction(contextSequence, null, filterParams);

        if(BooleanValue.FALSE == entryFilterFunctionResult.itemAt(0))
        {
View Full Code Here

                result = defaultValues;
            } else {
                result = Sequence.EMPTY_SEQUENCE;
            }
        } else {
            result = new StringValue(cookieValue);
        }
       
        return result;
    }
View Full Code Here

        final Sequence result;
       
        if(isCalledAs(qnParameterNames.getLocalName())) {
            result = new ValueSequence();
            for(final String parameterName : request.getParameterNames()) {
                result.add(new StringValue(parameterName));
            }
        } else if(isCalledAs(qnParameter.getLocalName())) {
            final String paramName = args[0].getStringValue();
           
            if(getSignature().getArgumentCount() == 1) {
View Full Code Here

            }
        } else {
            result = new ValueSequence();
            if(queryParamValues instanceof List) {
                for(final Object value : (List)queryParamValues) {
                    result.add(new StringValue(value.toString()));
                }
            } else {
                result.add(new StringValue(queryParamValues.toString()));
            }
        }
       
        return result;
    }
View Full Code Here

        } else if(target.isAssignableFrom(Node.class)) {
            return (T)this;
        } else if(target == Object.class) {
            return (T)this;
        } else {
            final StringValue v = new StringValue( getStringValue() );
            return v.toJavaObject(target);
        }
    }
View Full Code Here

    @Override
    public Sequence eval(final Sequence[] args, final HttpRequest request) throws XPathException {
        final Sequence result;
       
        if(isCalledAs(qnScheme.getLocalName())) {
            result = new StringValue(request.getScheme());
       
        } else if(isCalledAs(qnHostname.getLocalName())) {
            result = new StringValue(request.getHostname());
       
        } else if(isCalledAs(qnPort.getLocalName())) {
            result = new IntegerValue(request.getPort());

        } else if(isCalledAs(qnPath.getLocalName())) {
            result = new StringValue(request.getPath());
           
        } else if(isCalledAs(qnQuery.getLocalName())) {
            final String query = request.getQuery();
            if(query == null) {
                result = Sequence.EMPTY_SEQUENCE;
            } else {
                result = new StringValue(query);
            }
        } else if(isCalledAs(qnUri.getLocalName())) {
            result = new StringValue(request.getURI());
           
        } else {
            throw new XPathException(this, "Unknown function call: " + getSignature());
        }
       
View Full Code Here

    @Override
    public Sequence eval(final Sequence[] args, final HttpRequest request) throws XPathException {
        final Sequence result;
       
        if(isCalledAs(qnAddress.getLocalName())) {
            result = new StringValue(request.getAddress());
       
        } else if(isCalledAs(qnRemoteHostname.getLocalName())) {
            result = new StringValue(request.getRemoteHostname());
       
        } else if(isCalledAs(qnRemoteAddress.getLocalName())) {
            result = new StringValue(request.getRemoteAddress());

        } else if(isCalledAs(qnRemotePort.getLocalName())) {
            result = new IntegerValue(request.getRemotePort());
              
        } else {
View Full Code Here

        super(context, signature);
    }
   
    @Override
    public Sequence eval(final Sequence[] args, final HttpRequest request) throws XPathException {
        return new StringValue(request.getMethod().name());
    }
View Full Code Here

        final Sequence result;
       
        if(isCalledAs(qnHeaderNames.getLocalName())) {
            result = new ValueSequence();
            for(final String parameterName : request.getHeaderNames()) {
                result.add(new StringValue(parameterName));
            }
        } else if(isCalledAs(qnHeader.getLocalName())) {
            final String headerName = args[0].getStringValue();
           
            if(getSignature().getArgumentCount() == 1) {
View Full Code Here

TOP

Related Classes of org.exist.xquery.value.StringValue

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.