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

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


        // Prefixes
        if ( true )
        {
            System.out.print("## Prefix Table\n")
            DatasetPrefixesTDB prefixes = dsg.getPrefixes() ;

            NodeTupleTable pntt = prefixes.getNodeTupleTable() ;
            if ( ! dumpedNodeTables.contains(pntt.getNodeTable()))
            {
                dumpNodeTable(pntt.getNodeTable(), dumpedNodeTables) ;
                dumpedNodeTables.add(pntt.getNodeTable()) ;
            }
            dumpTupleIndexes(prefixes.getNodeTupleTable().getTupleTable().getIndexes()) ;
        }
    }
View Full Code Here


        // Prefixes
        if ( true )
        {
            System.out.print("## Prefix Table\n")
            DatasetPrefixesTDB prefixes = dsg.getPrefixes() ;

            NodeTupleTable pntt = prefixes.getNodeTupleTable() ;
            if ( ! dumpedNodeTables.contains(pntt.getNodeTable()))
            {
                dumpNodeTable(pntt.getNodeTable(), dumpedNodeTables) ;
                dumpedNodeTables.add(pntt.getNodeTable()) ;
            }
            dumpTupleIndexes(prefixes.getNodeTupleTable().getTupleTable().getIndexes()) ;
        }
    }
View Full Code Here

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

        return last.getPrefixMapping() ;
    }

    @Test public void multiple1()
    {
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.testing() ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
        PrefixMapping pmap2 = prefixes.getPrefixMapping("http://graph/") ;
        pmap1.setNsPrefix("x", "http://foo/") ;
        assertNull(pmap2.getNsPrefixURI("x")) ;
        assertNotNull(pmap1.getNsPrefixURI("x")) ;
    }
View Full Code Here

        assertNotNull(pmap1.getNsPrefixURI("x")) ;
    }
   
    @Test public void multiple2()
    {
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.testing() ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping("http://graph/") // Same
        PrefixMapping pmap2 = prefixes.getPrefixMapping("http://graph/") ;
        pmap1.setNsPrefix("x", "http://foo/") ;
        assertNotNull(pmap2.getNsPrefixURI("x")) ;
        assertNotNull(pmap1.getNsPrefixURI("x")) ;
    }
View Full Code Here

    @Test public void persistent1()
    {
        String dir = ConfigTest.getTestingDir() ;
        FileOps.clearDirectory(dir) ;
       
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
       
        String x = pmap1.getNsPrefixURI("x") ;
        assertNull(x) ;
        prefixes.close();
    }
View Full Code Here

    @Test public void persistent2()
    {
        String dir = ConfigTest.getTestingDir() ;
        FileOps.clearDirectory(dir) ;
       
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
       
        pmap1.setNsPrefix("x", "http://foo/") ;
        prefixes.close() ;
       
        prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        assertEquals("http://foo/", pmap1.getNsPrefixURI("x")) ;
        prefixes.close();
    }
View Full Code Here

        DatasetControl policy = new DatasetControlMRSW() ;
        @SuppressWarnings("deprecation")
        NodeTable nodeTable = NodeTableFactory.create(indexBuilder, location) ;
        TripleTable triples = createTripleTable(indexBuilder, nodeTable, location, graphIndexDesc, policy) ;
        QuadTable quads = createQuadTable(indexBuilder, nodeTable, location, quadIndexDesc, policy) ;
        @SuppressWarnings("deprecation")
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.create(indexBuilder, location, policy) ;
        return new DatasetGraphTDB(triples, quads, prefixes, chooseOptimizer(location), null) ;
    }
View Full Code Here

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

        // Prefixes
        if ( true )
        {
            System.out.print("## Prefix Table\n")
            DatasetPrefixesTDB prefixes = dsg.getPrefixes() ;

            NodeTupleTable pntt = prefixes.getNodeTupleTable() ;
            if ( ! dumpedNodeTables.contains(pntt.getNodeTable()))
            {
                dumpNodeTable(pntt.getNodeTable(), dumpedNodeTables) ;
                dumpedNodeTables.add(pntt.getNodeTable()) ;
            }
            dumpTupleIndexes(prefixes.getNodeTupleTable().getTupleTable().getIndexes()) ;
        }
    }
View Full Code Here

TOP

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

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.