Package com.hp.hpl.jena.sparql.sse

Examples of com.hp.hpl.jena.sparql.sse.Item$ItemHashCode


        if ( builder == null )
        {
            Log.warn(this, "Attempt to use OpFetch - need to enable first with a call to OpFetch.enable()") ;
            return OpLabel.create("fetch/"+serviceNode, OpTable.unit()) ;
        }
        Item item = Item.createNode(elt.getFetchNode()) ;
        ItemList args = new ItemList() ;
        args.add(item) ;
        return builder.make(args) ;
    }
View Full Code Here


    private static ExprList buildExprListUntagged(ItemList list, int idx)
    {
        ExprList exprList = new ExprList() ;
        for ( int i = idx ; i < list.size() ; i++ )
        {
            Item item = list.get(i) ;
            exprList.add(buildExpr(item)) ;
        }
        return exprList ;
    }
View Full Code Here

            ItemList list = item.getList() ;
           
            if ( list.size() == 0 )
                BuilderLib.broken(item, "Empty list for expression") ;
           
            Item head = list.get(0) ;
           
            if ( head.isNode() )
            {
                if ( head.getNode().isVariable() && list.size() == 1 )
                {
                    // The case of (?z)
                    return new ExprVar(Var.alloc(head.getNode())) ;
                }
                return buildFunctionCall(list) ;
            }
            else if ( head.isList() )
                BuilderLib.broken(item, "Head is a list") ;
            else if ( head.isSymbol() )
            {
                if ( item.isTagged(Tags.tagExpr) )
                {
                    BuilderLib.checkLength(2, list, "Wrong length: "+item.shortString()) ;
                    item = list.get(1) ;
View Full Code Here

    protected Expr buildKnownFunction(ItemList list)
    {
        if ( list.size() == 0 )
            BuilderLib.broken(list, "Empty list for expression") ;
   
        Item item = list.get(0) ;
        String tag = item.getSymbol() ;
        if ( tag == null )
            BuilderLib.broken(item, "Null tag") ;
   
        Build b = findBuild(tag) ;
        if ( b == null )
View Full Code Here

        return b.make(list) ;
    }

    protected static Expr buildFunctionCall(ItemList list)
    {
        Item head = list.get(0) ;
        Node node = head.getNode() ;
        if ( node.isBlank() )
            BuilderLib.broken(head, "Blank node for function call!") ;
        if ( node.isLiteral() )
            BuilderLib.broken(head, "Literal node for function call!") ;
        ExprList args = buildExprListUntagged(list, 1) ;
View Full Code Here

        // Restore state
       
        // Choose the result.
        if ( list.size() > 2 )
        {
            Item item = list.getLast() ;
            super.setFormResult(item) ;
        }
    }
View Full Code Here

    public void emitPName(int line, int column, String pname)
    {
        if ( inFormDecl() )
        {
            // Record a faked PName.  Works with BuilderPrefixMapping
            Item item = Item.createSymbol(pname, line, column) ;
            listAdd(item) ;
            return ;
        }
        String iriStr = resolvePrefixedName(pname, line, column) ;
        super.emitIRI(line, column, iriStr) ;
View Full Code Here

    @Override
    public void listFinish(int line, int column)
    {
        ItemList list = popList() ;
        Item item = Item.createList(list) ;
        listAdd(item) ;
    }
View Full Code Here

            var = varAllocND.allocVar()  ;
        else if ( varName.equals(ARQConstants.allocVarMarker))      // "?." -- Allocate a named variable
            var = varAllocIntern.allocVar()  ;
        else
            var = Var.alloc(varName) ;
        Item item = Item.createNode(var, line, column) ;
        listAdd(item) ;
    }
View Full Code Here

            RDFDatatype dType = TypeMapper.getInstance().getSafeTypeByName(datatypeIRI) ;
            n = Node.createLiteral(lexicalForm, null, dType) ;
        }
        else
            n = Node.createLiteral(lexicalForm, langTag, null) ;
        Item item = Item.createNode(n, line, column) ;
        listAdd(item) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.sse.Item$ItemHashCode

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.