public void indexOntology(OntologyIterator ontologyIterator) throws IntactSolrException { if (ontologySolrServer == null) { throw new IllegalStateException("To index an ontology, an ontology SolrServer must be passed to the constructor"); } OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologySolrServer); ontologyIndexer.indexOntology(ontologyIterator); }
public void indexOntology(OntologyIterator ontologyIterator) throws IntactSolrException { if (ontologySolrServer == null) { throw new IllegalStateException("To index an ontology, an ontology SolrServer must be passed to the constructor"); } OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologySolrServer); ontologyIndexer.indexOntology(ontologyIterator); }
public void indexOntologies(OntologyMapping[] ontologyMappings) throws IntactSolrException { if (ontologySolrServer == null) { throw new IllegalStateException("To index an ontology, an ontology SolrServer must be passed to the constructor"); } if (log.isInfoEnabled()) log.info("Indexing ontologies: "+ Arrays.asList(ontologyMappings)); OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologySolrServer); ontologyIndexer.indexObo(ontologyMappings); }
public void indexOntologies(OntologyMapping[] ontologyMappings) throws IntactSolrException { if (ontologySolrServer == null) { throw new IllegalStateException("To index an ontology, an ontology SolrServer must be passed to the constructor"); } if (log.isInfoEnabled()) log.info("Indexing ontologies: "+ Arrays.asList(ontologyMappings)); OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologySolrServer); ontologyIndexer.indexObo(ontologyMappings); }
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { if (ontologiesSolrUrl == null) { throw new NullPointerException("ontologiesSolrUrl is null"); } HttpSolrServer ontologiesSolrServer = createSolrServer(); OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologiesSolrServer); if (taxonomyOntologyMappings != null) { indexUniprotTaxonomy = true; } if (indexUniprotTaxonomy) { if (taxonomyOntologyMappings == null) { ontologyIndexer.indexUniprotTaxonomy(); } else { for (OntologyMapping om : taxonomyOntologyMappings) { ontologyIndexer.indexOntology(new UniprotTaxonomyOntologyIterator(om.getUrl())); } } } ontologyIndexer.indexObo(oboOntologyMappings.toArray(new OntologyMapping[oboOntologyMappings.size()])); long count = countDocs(ontologiesSolrServer); contribution.getExitStatus().addExitDescription("Total docs in index: "+count); ontologiesSolrServer.shutdown(); return RepeatStatus.FINISHED; }