public ComplexSolrConverter ( SolrServer solrServer ) { this ( new OntologySearcher ( solrServer ) ) ; }
public IntactSolrIndexer(SolrServer solrServer, HttpSolrServer ontologySolrServer) { this(solrServer); this.ontologySolrServer = ontologySolrServer; this.converter = new SolrDocumentConverter(solrServer, new OntologySearcher(ontologySolrServer)); }
public IntactSolrIndexer(SolrServer solrServer, StreamingUpdateSolrServer ontologySolrServer) { this(solrServer); this.ontologySolrServer = ontologySolrServer; this.converter = new SolrDocumentConverter(solrServer, new IntactDocumentDefinition(), new OntologySearcher(ontologySolrServer)); }
public InteractionOntologyLuceneIndexer(String ontologySolrUrl, String interactionOntologyUrl) { if (ontologySolrUrl == null){ throw new IllegalArgumentException("The ontology solr url cannot bet null"); } if (interactionOntologyUrl == null){ throw new IllegalArgumentException("The interaction solr url cannot bet null"); } this.ontologySearcher = new OntologySearcher(createSolrServer(ontologySolrUrl)); this.interactionSearcher = new IntactSolrSearcher(createSolrServer(interactionOntologyUrl)); this.processedTerms = new HashMap<InteractionOntologyTerm, InteractionOntologyTermResults>(); }
@Override public void open(ExecutionContext executionContext) throws ItemStreamException { super.open(executionContext); // create ontologySearcher if (ontologiesSolrUrl != null) { HttpSolrServer ontologiesSolrServer = createOntologySolrServer(); ontologySearcher = new OntologySearcher(ontologiesSolrServer); } // create new SolrDocumentConverter this.solrConverter = new SolrDocumentConverter(solrServer, ontologySearcher); }
public BinaryInteraction process(BinaryInteraction item) throws Exception { if (enricher == null) { if (ontologiesSolrUrl == null) { throw new ItemStreamException("ontologiesSolrUrl is null"); } HttpSolrServer ontologiesSolrServer = createSolrServer(); OntologySearcher ontologySearcher = new OntologySearcher(ontologiesSolrServer); enricher = new OntologyCrossReferenceEnricher(ontologySearcher); } if (!processOnlyInteractors){ enricher.enrich(item); } else { if (item.getInteractorA() != null){ enricher.enrich(item.getInteractorA()); } if (item.getInteractorB() != null){ enricher.enrich(item.getInteractorB()); } } return item; }