use of com.hp.hpl.jena.rdf.model.ResIterator in project lucene-skos by behas.
the class SKOSEngineImpl method indexSKOSModel.
/**
* Creates the synonym index
*
* @throws IOException
*/
private void indexSKOSModel() throws IOException {
IndexWriterConfig cfg = new IndexWriterConfig(analyzer);
IndexWriter writer = new IndexWriter(indexDir, cfg);
writer.getConfig().setRAMBufferSizeMB(48);
/* iterate SKOS concepts, create Lucene docs and add them to the index */
ResIterator concept_iter = skosModel.listResourcesWithProperty(RDF.type, SKOS.Concept);
while (concept_iter.hasNext()) {
Resource skos_concept = concept_iter.next();
Document concept_doc = createDocumentsFromConcept(skos_concept);
writer.addDocument(concept_doc);
}
writer.close();
}
Aggregations