Package com.hp.hpl.jena.sparql

Examples of com.hp.hpl.jena.sparql.ARQInternalErrorException


        String lex = node.getLiteralLexicalForm() ;
        String lang = node.getLiteralLanguage() ;
        RDFDatatype dt = node.getLiteralDatatype() ;
       
        if ( ! lex.startsWith("-") && ! lex.startsWith("+") )
            throw new ARQInternalErrorException("Literal does not start with a sign: "+lex) ;
       
        lex = lex.substring(1) ;
        return NodeFactory.createLiteral(lex, lang, dt) ;
    }
View Full Code Here


            add(var) ;
            return ;
        }

        if ( var == null )
            throw new ARQInternalErrorException("Attempt to add a named expression with a null variable") ;
        if ( exprs.containsKey(var) )
            throw new ARQInternalErrorException("Attempt to assign an expression again") ;
        add(var) ;
        exprs.put(var, expr) ;
    }
View Full Code Here

            return super.transform(funcOp, args, opArg) ;
        if ( funcOp instanceof E_Exists )
            return new E_Exists(opArg2) ;
        if ( funcOp instanceof E_NotExists )
            return new E_NotExists(opArg2) ;
        throw new ARQInternalErrorException("Unrecognized ExprFunctionOp: \n"+funcOp) ;
    }
View Full Code Here

                    if ( n2.equals(n) )
                        Log.warn(this, "Binding already for "+v+" (same value)" ) ;
                    else
                    {
                        Log.fatal(this, "Binding already for "+v+" (different values)" ) ;
                        throw new ARQInternalErrorException("Incompatible bindings for "+v) ;
                    }
                }
                b2.add(v, n) ;
            }
            return b2 ;
View Full Code Here

        // Create the iterator - or return null if there can't be any results.
        protected static QueryIterator buildIterator(Binding binding, Node graphNode, OpGraph opGraph, ExecutionContext outerCxt)
        {
            if ( !graphNode.isURI() )
                // e.g. variable bound to a literal or blank node.
                throw new ARQInternalErrorException("QueryIterGraphInner.buildIterator") ;
           
            // Think about avoiding substitution.
            // If the subpattern does not involve the vars from the binding, avoid the substitute. 
            Op op = QC.substitute(opGraph.getSubOp(), binding) ;
           
View Full Code Here

    private void checkAdd(Var var, Node node)
    {
        if ( ! CHECKING )
            return ;
        if ( var == null )
            throw new ARQInternalErrorException("check("+var+", "+node+"): null var" ) ;
        if ( node == null )
            throw new ARQInternalErrorException("check("+var+", "+node+"): null node value" ) ;
        if ( UNIQUE_NAMES_CHECK && contains(var) )
            throw new ARQInternalErrorException("Attempt to reassign '"+var+
                                                "' from '"+FmtUtils.stringForNode(get(var))+
                                                "' to '"+FmtUtils.stringForNode(node)+"'") ;
        // Let the implementation do a check as well.
        checkAdd1(var, node) ;
    }
View Full Code Here

                // WRONG
            { return new TableEmpty() ; }
        }

        if ( ! Var.isVar(graphNode) )
            throw new ARQInternalErrorException("OpDatasetNames: Not a URI or variable: "+graphNode) ;

        DatasetGraph dsg = evaluator.getExecContext().getDataset() ;
        Iterator<Node> iter = dsg.listGraphNodes() ;
        List<Binding> list = new ArrayList<Binding>((int)dsg.size()) ;
        for ( ; iter.hasNext(); )
View Full Code Here

        BasicPattern pattern = opQuad.getBasicPattern() ;
       
        if ( ! opQuad.getGraphNode().isVariable() )
        {
            if ( ! opQuad.getGraphNode().isURI() )
            { throw new ARQInternalErrorException("Not a URI or variable: "+opQuad.getGraphNode()) ;}
            Graph g = null ;
           
            if ( opQuad.isDefaultGraph() )
                g = ds.getDefaultGraph() ;
            else
View Full Code Here

                                                 ExecutionContext execCxt)
    {
        List<Binding> results = new ArrayList<Binding>() ;
       
        if (! Var.isVar(endNode))
            throw new ARQInternalErrorException("Non-variable endnode in _execTriplePath") ;
       
        Var var = Var.alloc(endNode) ;
        // Assign.
        for (; iter.hasNext();)
        {
View Full Code Here

    }
   
    private static int existsPath(Graph graph, Node subject, Path path, final Node object)
    {
        if ( ! subject.isConcrete() || !object.isConcrete() )
            throw new ARQInternalErrorException("Non concrete node for existsPath evaluation") ;
        Iterator<Node> iter = PathEval.eval(graph, subject, path) ;
        Filter<Node> filter = new Filter<Node>() { @Override public boolean accept(Node node) { return Lib.equal(node,  object) ; } } ;
        // See if we got to the node we're interested in finishing at.
        iter = Iter.filter(iter, filter) ;
        long x = Iter.count(iter) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.ARQInternalErrorException

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.