Package com.hp.hpl.jena.tdb.store

Examples of com.hp.hpl.jena.tdb.store.NodeId


    public NodeId allocOffset()
    {
        if ( passthrough ) return base.allocOffset() ;
        // If we have done the append stage, this is invalid as the base may change under our feet
        // Would need to track base operations.
        NodeId x1 = nodeTableJournal.allocOffset() ;
        NodeId x2 = mapFromJournal(x1) ;
        return x2 ;
    }
View Full Code Here


           
            if ( firstPair == null )
                firstPair = x ;
            lastPair = x ;
           
            NodeId nodeId = x.getLeft() ;
            Node node = x.getRight() ;
            debug("  append: %s -> %s", x, mapFromJournal(nodeId)) ;
            // This does the write.
            NodeId nodeId2 = base.getAllocateNodeId(node) ;
            if ( ! nodeId2.equals(mapFromJournal(nodeId)) )
                inconsistent(node, nodeId, nodeId2) ;
        }
    }
View Full Code Here

        System.err.println("nodeTableJournal >>>") ;
        Iterator<Pair<NodeId, Node>> iter = nodeTableJournal.all() ;
        for ( ; iter.hasNext() ; )
        {
            Pair<NodeId, Node> x = iter.next() ;
            NodeId nodeId = x.getLeft() ;
            Node node = x.getRight() ;
            NodeId mapped = mapFromJournal(nodeId) ;
            //debug("append: %s -> %s", x, mapFromJournal(nodeId)) ;
            // This does the write.
            NodeId nodeId2 = base.getAllocateNodeId(node) ;
            System.err.println(x + "  mapped=" + mapped + " getAlloc="+nodeId2) ;
        }
       
        System.err.println("journal >>>") ;
        Iterator<Pair<Long, ByteBuffer>> iter1 = this.journalObjFile.all() ;
View Full Code Here

   
    @Override
    public NodeId getAllocateNodeId(Node node)
    {
        //info("getAllocateNodeId("+node+") =>") ;
        NodeId nId = nodeTable.getAllocateNodeId(node) ;
        info("getAllocateNodeId("+node+") => "+nId) ;
        return nId ;
    }
View Full Code Here

    @Override
    public NodeId getNodeIdForNode(Node node)
    {
        //info("getNodeIdForNode("+node+") =>") ;
        NodeId nId = nodeTable.getNodeIdForNode(node) ;
        info("getNodeIdForNode("+node+") => "+nId) ;
        return nId ;
    }
View Full Code Here

    }
   
    @Override
    public NodeId allocOffset()
    {
        NodeId nodeId = nodeTable.allocOffset() ;
        info("allocOffset() => "+nodeId) ;
        return nodeId ;
    }
View Full Code Here

        }

      
        private void process(Node g, Node s, Node p, Node o)
        {
            NodeId sId = nodeTable.getAllocateNodeId(s) ;
            NodeId pId = nodeTable.getAllocateNodeId(p) ;
            NodeId oId = nodeTable.getAllocateNodeId(o) ;
           
            if ( g != null )
            {
                NodeId gId = nodeTable.getAllocateNodeId(g) ;
                writerQuads.write(gId.getId()) ;
                writerQuads.write(sId.getId()) ;
                writerQuads.write(pId.getId()) ;
                writerQuads.write(oId.getId()) ;
                writerQuads.endOfRow() ;
                stats.record(gId, sId, pId, oId) ;
View Full Code Here

   
    public BindingNodeId getBindingId() { return idBinding ; }
   
    public NodeId getNodeId(Var var)
    {
        NodeId id = idBinding.get(var) ;
        if ( id != null )
            return id ;
       
        if ( parent == null )
            return null ;
View Full Code Here

        try {
            Node n = cacheGet(var) ;
            if ( n != null )
                return n ;
           
            NodeId id = idBinding.get(var) ;
            if ( id == null )
                return null ;
            n = nodeTable.getNodeForNodeId(id) ;
            // Update cache.
            cachePut(var, n) ;
View Full Code Here

    }
   
    @Override
    protected void format(StringBuffer sbuff, Var var)
    {
        NodeId id = idBinding.get(var) ;
        String extra = "" ;
        if ( id != null )
            extra = "/"+id ;
        Node node = get(var) ;
        String tmp = NodeFmtLib.displayStr(node) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.store.NodeId

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.