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

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


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


        if ( label.equals("") )
            // Fresh anonymous bNode
            n = NodeFactory.createAnon() ;
        else
            n = bNodeLabels.asNode(label) ;
        Item item = Item.createNode(n, line, column) ;
        listAdd(item) ;
    }
View Full Code Here

    @Override
    public void emitIRI(int line, int column, String iriStr)
    {
        Node n = NodeFactory.createURI(iriStr) ;
        Item item = Item.createNode(n, line, column) ;
        listAdd(item) ;
    }
View Full Code Here

        { Log.warn(Stats.class, "Problem when writing stats file", ex) ; }
    }
   
    static private void write(OutputStream output, Map<Node, Integer> predicateStats, Map<Node, Integer> typeStats, long statsTotal)
    {
        Item item = format(predicateStats, typeStats, statsTotal) ;
        ItemWriter.write(output, item) ;
    }
View Full Code Here

        return format(stats.getPredicates(), stats.getTypes(), stats.getCount()) ;
    }
   
    private static Item format(Map<Node, Integer> predicates, Map<Node, Integer> types, long count)
    {
        Item stats = Item.createList() ;
        ItemList statsList = stats.getList() ;
        statsList.add("stats") ;

        Item meta = createTagged(StatsMatcher.META) ;
        addPair(meta.getList(), "timestamp", NodeFactoryExtra.nowAsDateTime()) ;
        addPair(meta.getList(), "run@",  Utils.nowAsString()) ;
        if ( count >= 0 )
            addPair(meta.getList(), StatsMatcher.COUNT, NodeFactoryExtra.intToNode((int)count)) ;
        statsList.add(meta) ;
       
        for ( Entry<Node, Integer> entry : types.entrySet() )
        {
            Node type = entry.getKey() ;
View Full Code Here

        assertEquals(0, count);
    }

    private static Binding build(String string)
    {
        Item item = SSE.parse("(binding "+string+")") ;
        return BuilderBinding.build(item) ;
    }
View Full Code Here

    }
   

    private static Binding build(String string)
    {
        Item item = SSE.parse("(binding "+string+")") ;
        return BuilderBinding.build(item) ;
    }
View Full Code Here

        String x = p.toString(prologue) ;
        Path p2 = PathParser.parse(x, prologue) ;
        assertEquals(p, p2) ;
       
        String sse = WriterPath.asString(p, prologue) ;
        Item item = SSE.parseItem(sse, pmap) ;
        p2 = BuilderPath.buildPath(item) ;
        assertEquals(p, p2) ;
    }
View Full Code Here

    }


    private static Binding build(String string)
    {
        Item item = SSE.parse("(binding "+string+")") ;
        return BuilderBinding.build(item) ;
    }
View Full Code Here

        assertEquals(item.getList().get(1), item2) ;
    }

    private void testList(String str, Item item1, Item item2, Item item3)
    {
        Item item = parse(str) ;
        assertTrue(item.isList()) ;
        assertEquals(3, item.getList().size()) ;
        assertEquals(item.getList().get(0), item1) ;
        assertEquals(item.getList().get(1), item2) ;
        assertEquals(item.getList().get(2), item3) ;
    }
View Full Code Here

TOP

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

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.