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

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


        return n ;
    }

    public static Hash hash(Node n)
    {
        Hash h = new Hash(LenNodeHash) ;
        setHash(h, n) ;
        return h ;
    }
View Full Code Here


        return nodeId ;
    }
   
    protected final NodeId accessIndex(Node node, boolean create)
    {
        Hash hash = new Hash(nodeHashToId.getRecordFactory().keyLength()) ;
        setHash(hash, node) ;
        byte k[] = hash.getBytes() ;       
        // Key only.
        Record r = nodeHashToId.getRecordFactory().create(k) ;
       
        synchronized (this// Pair to readNodeFromTable.
        {
View Full Code Here

        return n ;
    }

    public static Hash hash(Node n)
    {
        Hash h = new Hash(LenNodeHash) ;
        setHash(h, n) ;
        return h ;
    }
View Full Code Here

        return n ;
    }

    public static Hash hash(Node n)
    {
        Hash h = new Hash(LenNodeHash) ;
        setHash(h, n) ;
        return h ;
    }
View Full Code Here

        return nodeId ;
    }
   
    protected final NodeId accessIndex(Node node, boolean create)
    {
        Hash hash = new Hash(nodeHashToId.getRecordFactory().keyLength()) ;
        setHash(hash, node) ;
        byte k[] = hash.getBytes() ;       
        // Key only.
        Record r = nodeHashToId.getRecordFactory().create(k) ;
       
        synchronized (this// Pair to readNodeFromTable.
        {
View Full Code Here

                long x = Long.parseLong(id) ;
                NodeId nodeId = new NodeId(x) ;
                Node n = nodeTable.getNodeForNodeId(nodeId) ;
                //System.out.printf("%s [%d] => %s\n", id, x, n) ;

                Hash h = new Hash(SystemTDB.LenNodeHash) ;
                NodeLib.setHash(h, n) ;
                String str = Bytes.asHex(h.getBytes()) ;
                System.out.printf("%s %08d 0x%s # %s\n", id, x, str, n) ;
            } catch (Exception ex)
            {
                System.out.println("Failed to decode: "+id) ;
            }
View Full Code Here

        return nodeId ;
    }
   
    protected final NodeId accessIndex(Node node, boolean create)
    {
        Hash hash = new Hash(nodeHashToId.getRecordFactory().keyLength()) ;
        setHash(hash, node) ;
        byte k[] = hash.getBytes() ;       
        // Key only.
        Record r = nodeHashToId.getRecordFactory().create(k) ;
       
        synchronized (this// Pair to readNodeFromTable.
        {
View Full Code Here

        return nodeId ;
    }
   
    protected final NodeId accessIndex(Node node, boolean create)
    {
        Hash hash = new Hash(nodeHashToId.getRecordFactory().keyLength()) ;
        setHash(hash, node) ;
        byte k[] = hash.getBytes() ;       
        // Key only.
        Record r = nodeHashToId.getRecordFactory().create(k) ;
       
        synchronized (this// Pair to readNodeFromTable.
        {
View Full Code Here

                long x = Long.parseLong(id) ;
                NodeId nodeId = new NodeId(x) ;
                Node n = nodeTable.getNodeForNodeId(nodeId) ;
                //System.out.printf("%s [%d] => %s\n", id, x, n) ;

                Hash h = new Hash(SystemTDB.LenNodeHash) ;
                NodeLib.setHash(h, n) ;
                String str = Bytes.asHex(h.getBytes()) ;
                System.out.printf("%s %08d 0x%s # %s\n", id, x, str, n) ;
            } catch (Exception ex)
            {
                System.out.println("Failed to decode: "+id) ;
            }
View Full Code Here

                    curr = leftIn ;
                    // generate the node id
                    Node node = tdbloader3.parse(leftIn) ;
                    id = NodeLib.encodeStore(node, objects) ;
                    // add to hash|id
                    Hash hash = new Hash(SystemTDB.LenNodeHash);
                    setHash(hash, node);
                    sdb03.add (new Pair<byte[], byte[]>(hash.getBytes(), Bytes.packLong(id))) ;
                }
//                System.out.println ("< ( " + leftIn + ", " + rightIn + " )") ;
                String tokens[] = rightIn.split("\\|") ;
                String leftOut = tokens[0] ;
                String rightOut = id + "|" + tokens[1] ;
View Full Code Here

TOP

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

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.