Package com.hp.hpl.jena.tdb.nodetable

Examples of com.hp.hpl.jena.tdb.nodetable.NodeTable


       
        String pnNode2Id = params.prefixNode2Id ;
        String pnId2Node = params.prefixId2Node ;
       
        // No cache - the prefix mapping is a cache
        NodeTable prefixNodes = makeNodeTable(location, pnNode2Id, pnId2Node, -1, -1, -1;
       
        DatasetPrefixesTDB prefixes = new DatasetPrefixesTDB(prefixIndexes, prefixNodes, policy) ;
       
        log.debug("Prefixes: "+primary+" :: "+StrUtils.strjoin(",", indexes)) ;
       
View Full Code Here


        public NodeTable buildNodeTable(FileSet fsIndex, FileSet fsObjectFile, int sizeNode2NodeIdCache, int sizeNodeId2NodeCache, int sizeNodeMissCacheSize)
        {
            RecordFactory recordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId) ;
            Index idx = indexBuilder.buildIndex(fsIndex, recordFactory) ;
            ObjectFile objectFile = objectFileBuilder.buildObjectFile(fsObjectFile, Names.extNodeData) ;
            NodeTable nodeTable = new NodeTableNative(idx, objectFile) ;
            nodeTable = NodeTableCache.create(nodeTable, sizeNode2NodeIdCache, sizeNodeId2NodeCache, sizeNodeMissCacheSize) ;
            nodeTable = NodeTableInline.create(nodeTable) ;
            return nodeTable ;
        }
View Full Code Here

     */
    public static NodeId getNodeId(DatasetGraphTDB dsg, Node node)
    {
        if ( dsg == null )
            return null ;
        NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable() ;
        NodeId nodeId = nodeTable.getNodeIdForNode(node) ;
        return nodeId ;
    }
View Full Code Here

     */
    public static Node getNode(DatasetGraphTDB dsg, NodeId nodeId)
    {
        if ( dsg == null )
            return null ;
        NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable() ;
        Node node = nodeTable.getNodeForNodeId(nodeId) ;
        return node ;
    }
View Full Code Here

            if ( 4 != tupleLen )
                throw new TDBException("SolverLib: Graph node specified but tuples are of length "+tupleLen) ;
        }
       
        // Convert from a QueryIterator (Bindings of Var/Node) to BindingNodeId
        NodeTable nodeTable = nodeTupleTable.getNodeTable() ;
       
        Iterator<BindingNodeId> chain = Iter.map(input, SolverLib.convFromBinding(nodeTable)) ;
        List<Abortable> killList = new ArrayList<Abortable>() ;
       
        for ( Triple triple : triples )
View Full Code Here

    }

    public static Set<NodeId> convertToNodeIds(Collection<Node> nodes, DatasetGraphTDB dataset)
    {
        Set<NodeId> graphIds = new HashSet<NodeId>() ;
        NodeTable nt = dataset.getQuadTable().getNodeTupleTable().getNodeTable() ;
        for ( Node n : nodes )
            graphIds.add(nt.getNodeIdForNode(n)) ;
        return graphIds ;
    }
View Full Code Here

   
    /** Create a filter to exclude the graph http://example/g2 */
    private static Filter<Tuple<NodeId>> createFilter(Dataset ds)
    {
        DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
        final NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable() ;
        final NodeId target = nodeTable.getNodeIdForNode(NodeFactory.createURI(graphToHide)) ;
        Filter<Tuple<NodeId>> filter = new Filter<Tuple<NodeId>>() {
            @Override
            public boolean accept(Tuple<NodeId> item)
            {
                // Reverse the lookup as a demo
View Full Code Here

    {
        params = _params ;
        init(location) ;
        DatasetControl policy = createConcurrencyPolicy() ;
       
        NodeTable nodeTable = makeNodeTable(location,
                                            params.indexNode2Id, params.indexId2Node,
                                            params.Node2NodeIdCacheSize, params.NodeId2NodeCacheSize, params.NodeMissCacheSize) ;
       
        TripleTable tripleTable = makeTripleTable(location, nodeTable, policy) ;
        QuadTable quadTable = makeQuadTable(location, nodeTable, policy) ;
View Full Code Here

       
        String pnNode2Id = params.prefixNode2Id ;
        String pnId2Node = params.prefixId2Node ;
       
        // No cache - the prefix mapping is a cache
        NodeTable prefixNodes = makeNodeTable(location, pnNode2Id, pnId2Node, -1, -1, -1;
       
        DatasetPrefixesTDB prefixes = new DatasetPrefixesTDB(prefixIndexes, prefixNodes, policy) ;
       
        log.debug("Prefixes: "+primary+" :: "+StrUtils.strjoin(",", indexes)) ;
       
View Full Code Here

    protected NodeTable makeNodeTable(Location location, String indexNode2Id, String indexId2Node,
                                      int sizeNode2NodeIdCache, int sizeNodeId2NodeCache, int sizeNodeMissCache)
    {
        FileSet fsNodeToId = new FileSet(location, indexNode2Id) ;
        FileSet fsId2Node = new FileSet(location, indexId2Node) ;
        NodeTable nt = nodeTableBuilder.buildNodeTable(fsNodeToId, fsId2Node, sizeNode2NodeIdCache, sizeNodeId2NodeCache, sizeNodeMissCache) ;
        return nt ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.nodetable.NodeTable

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.