Package com.hp.hpl.jena.sparql.expr

Examples of com.hp.hpl.jena.sparql.expr.NodeValue


                    BindingMap b = BindingFactory.create(k) ;
                   
                    for ( Pair<Var, Accumulator> pair : accs )
                    {
                        Var v = pair.getLeft() ;
                        NodeValue value = pair.getRight().getValue() ;
                        Node n = (value==null) ? null : value.asNode() ;
                        if ( v == null || n == null )
                        {}
                        else
                            b.add(v, n) ;
                    }
View Full Code Here


    {
        if ( args.size() > 3 )
            throw new ExprEvalException("substring: Wrong number of arguments: "+
                                        args.size()+" : [wanted 2 or 3]") ;
       
        NodeValue v1 = args.get(0) ;
        NodeValue v2 = args.get(1) ;
        NodeValue v3 = null ;
       
        if ( args.size() == 3 )
        {
            v3 = args.get(2) ;
            return XSDFuncOp.javaSubstring(v1, v2, v3) ;
View Full Code Here

            // Cache if the pattern is fixed and the flags are fixed or non-existant
            if ( e1 instanceof NodeValue && ( e2 == null || e2 instanceof NodeValue ) )
                regex = regexEval ;
        }

        NodeValue nv = regexEval.eval(binding, env) ;
        return nv ;
    }
View Full Code Here

        {
            SortCondition sc = iter.next() ;
            if ( sc.expression == null )
                throw new QueryExecException("Broken sort condition") ;

            NodeValue nv1 = null ;
            NodeValue nv2 = null ;
           
            try { nv1 = sc.expression.eval(bind1, env) ; }
            catch (VariableNotBoundException ex) {}
            catch (ExprEvalException ex)
            { Log.warn(this, ex.getMessage()) ; }
View Full Code Here

       
        Node n = (Node)obj ;
//        if ( n == null )
//            throw new ExprEvalException("No value for system variable: "+systemSymbol) ; 
        // NodeValue.makeNode could have a cache.
        NodeValue nv = NodeValue.makeNode(n) ;
        return nv ;
    }
View Full Code Here

    {
        Node n = v.asNode() ;
        if ( ! n.isBlank() )
            throw new ExprEvalException("bnode: not a blank node") ;
       
        NodeValue nv = NodeValue.makeString(n.getBlankNodeId().getLabelString()) ;
        return nv ;
    }
View Full Code Here

    {
        if ( args.size() > 3 )
            throw new ExprEvalException("substring: Wrong number of arguments: "+
                                        args.size()+" : [wanted 2 or 3]") ;
       
        NodeValue v1 = args.get(0) ;
        NodeValue v2 = args.get(1) ;
        NodeValue v3 = null ;
       
        if ( args.size() == 3 )
        {
            v3 = args.get(2) ;
            return XSDFuncOp.substring(v1, v2, v3) ;
View Full Code Here

            throw new ExprEvalException("date: argument not in date format: "+v) ;
        }
       
        lexicalForm=lexicalForm+"T00:00:00Z" ;
       
        NodeValue nv = NodeValue.makeNode(lexicalForm, XSDDatatype.XSDdateTime) ;
        return nv ;
    }
View Full Code Here

        if ( args.size() != 1 )
            throw new ARQInternalErrorException("function eval: Arg list not of size 1") ;
       
        Expr ex = args.get(0) ;
        try {
            NodeValue v = ex.eval(binding, env) ;
            return v ;
        } catch (ExprEvalException evalEx)
        {
            return NodeValue.FALSE ;
        }
View Full Code Here

        String sep = iter.next().asString() ;

        List<String> x = new ArrayList<String>() ;
        for ( ; iter.hasNext() ; )
        {
            NodeValue arg = iter.next();
            x.add( arg.asString() ) ;
        }
       
        return NodeValue.makeString(StrUtils.strjoin(sep, x)) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.expr.NodeValue

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.