Examples of IndexBuilderString


Examples of org.apache.jena.larq.IndexBuilderString

    }
   
    static IndexLARQ buildTitleIndex(Model model, String datafile)
    {
        // ---- Read and index just the title strings.
        IndexBuilderString larqBuilder = new IndexBuilderString(DC.title) ;
       
        // Index statements as they are added to the model.
        model.register(larqBuilder) ;
       
        // To just build the index, create a model that does not store statements
        // Model model2 = ModelFactory.createModelForGraph(new GraphSink()) ;
       
        FileManager.get().readModel(model, datafile) ;
       
        // ---- Alternatively build the index after the model has been created.
        // larqBuilder.indexStatements(model.listStatements()) ;
       
        // ---- Finish indexing
        larqBuilder.closeWriter() ;
        model.unregister(larqBuilder) ;
       
        // ---- Create the access index 
        IndexLARQ index = larqBuilder.getIndex() ;
        return index ;
    }
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderString

    @Test
    public void test_concurrent_larq_query() throws InterruptedException, ExecutionException {
        endTime = startTime + duration * 1000;
        model = ModelFactory.createDefaultModel();
       
          IndexBuilderString larqBuilder = new IndexBuilderString() ;
          IndexLARQ index = larqBuilder.getIndex() ;
          LARQ.setDefaultIndex(index) ;

        ExecutorService executorService = Executors.newCachedThreadPool()
       
        Future<?>[] future = new Future<?>[numThreads];
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderString

    }

    static IndexLARQ buildIndex(Model model, String datafile)
    {
        // ---- Read and index all literal strings.
        IndexBuilderString larqBuilder = new IndexBuilderString() ;
       
        // Index statements as they are added to the model.
        model.register(larqBuilder) ;
       
        // To just build the index, create a model that does not store statements
        // Model model2 = ModelFactory.createModelForGraph(new GraphSink()) ;
       
        FileManager.get().readModel(model, datafile) ;
       
        // ---- Alternatively build the index after the model has been created.
        // larqBuilder.indexStatements(model.listStatements()) ;
       
        // ---- Finish indexing
        larqBuilder.closeWriter() ;
        model.unregister(larqBuilder) ;
       
        // ---- Create the access index 
        IndexLARQ index = larqBuilder.getIndex() ;
        return index ;
    }
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderString

    }
   
    static IndexLARQ buildTitleIndex(Model model, String datafile)
    {
        // ---- Read and index just the title strings.
        IndexBuilderString larqBuilder = new IndexBuilderString(DC.title) ;
       
        // Index statements as they are added to the model.
        model.register(larqBuilder) ;
       
        // To just build the index, create a model that does not store statements
        // Model model2 = ModelFactory.createModelForGraph(new GraphSink()) ;
       
        FileManager.get().readModel(model, datafile) ;
       
        // ---- Alternatively build the index after the model has been created.
        // larqBuilder.indexStatements(model.listStatements()) ;
       
        // ---- Finish indexing
        larqBuilder.closeWriter() ;
        model.unregister(larqBuilder) ;
       
        // ---- Create the access index 
        IndexLARQ index = larqBuilder.getIndex() ;
        return index ;
    }
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderString

        if ( dataset != null )
        {
            try
            {
                IndexWriter indexWriter = IndexWriterFactory.create(directory);
                IndexBuilderModel larqBuilder = new IndexBuilderString(indexWriter) ;
                dataset.getDefaultModel().register(larqBuilder);
                for ( Iterator<String> iter = dataset.listNames() ; iter.hasNext() ; ) {
                    String g = iter.next() ;
                    dataset.getNamedModel(g).register(larqBuilder) ;
                }
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderString

        IndexWriter indexWriter = null ;
        IndexBuilderModel larqBuilder = null ;
        try {
            directory = FSDirectory.open(path) ;
            indexWriter = IndexWriterFactory.create(directory);
            larqBuilder = new IndexBuilderString(indexWriter) ;
            larqBuilder.setAvoidDuplicates(false) ;
            index(larqBuilder, dataset.getDefaultModel()) ;
            for ( Iterator<String> iter = dataset.listNames() ; iter.hasNext() ; )
            {
                String g = iter.next() ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.