private void createAndRegisterInteractionTerm(FieldCount fieldCount, String db, LazyLoadedOntologyTerm term) { // register the term InteractionOntologyTerm interactionTerm = new InteractionOntologyTerm(term.getName(), term.getId()); registerOntologyTermResults(fieldCount, db, interactionTerm); // register synonyms if (term.getSynonymsStr() != null){ for (String synonym : term.getSynonymsStr()){ InteractionOntologyTerm termSynonym = new InteractionOntologyTerm(synonym, term.getId()); registerOntologyTermResults(fieldCount, db, termSynonym); } } }
private String findNameAndSynonyms(OntologySearcher searcher, String id, String defaultValue) throws SolrServerException { OntologyNames ontologyNames = searcher.findNameAndSynonyms(id, defaultValue); String childName = null; if (ontologyNames != null) { childName = ontologyNames.getName(); synonymsStr = ontologyNames.getSynonyms(); if (this.id == null){ this.id = ontologyNames.getId(); } } return childName == null ? defaultValue : childName; }
public void index(OntologyDocument ontologyDocument) throws IntactSolrException { index(ontologyDocument, new DefaultDocumentFilter()); }
public void indexObo(OntologyMapping[] ontologyMappings) throws IntactSolrException { indexObo(ontologyMappings, new DefaultDocumentFilter()); }
public void indexOntology(OntologyIterator ontologyIterator) { indexOntology(ontologyIterator, new DefaultDocumentFilter()); }
public OntologyNames findNameAndSynonyms(String termId, String termName) throws SolrServerException { OntologyNames names = null; if (termId != null){ names = searchOntologyNamesByChildId(termId, 0, 1); } else if (termName != null){ names = searchOntologyNamesByChildName(termName, 0, 1); } return names; }
/** * Search by child id so return parent relationship. * * @param id * @param firstResult * @param maxResults * @return * @throws SolrServerException */ public QueryResponse searchByChildId(String id, Integer firstResult, Integer maxResults) throws SolrServerException { return searchById( id, firstResult, maxResults, OntologyFieldNames.CHILD_ID, childSearchesMap ); }
public LazyLoadedOntologyTerm(OntologySearcher searcher, String id, String name) throws SolrServerException { this.searcher = searcher; this.id = id; this.name = findNameAndSynonyms(searcher, id, name); }
protected OntologyTerm newInternalOntologyTerm(OntologySearcher searcher, String id, String name, Set<OntologyTerm> synonyms) throws SolrServerException { return new LazyLoadedOntologyTerm( searcher, id, name, synonyms ); }
/** * Search by parent Id so returns children relationship. * * @param id * @param firstResult * @param maxResults * @return * @throws SolrServerException */ public List<OntologyTerm> searchByParentId(String id, Integer firstResult, Integer maxResults) throws SolrServerException { return searchAndCacheById(id, firstResult, maxResults, OntologyFieldNames.PARENT_ID, parentSearchesMap); }
private List<OntologyTerm> processParentsHits(QueryResponse queryResponse, String id) throws SolrServerException { return processOntologyTermHits( queryResponse, id, OntologyFieldNames.PARENT_ID, OntologyFieldNames.PARENT_NAME, OntologyFieldNames.PARENT_SYNONYMS); }
private List<OntologyTerm> processChildrenHits(QueryResponse queryResponse, String id) throws IOException, SolrServerException { return processOntologyTermHits( queryResponse, id, OntologyFieldNames.CHILD_ID, OntologyFieldNames.CHILD_NAME, OntologyFieldNames.CHILDREN_SYNONYMS); }
public void indexObo(String ontologyName, URL oboUrl) throws IntactSolrException { indexObo(ontologyName, oboUrl, new DefaultDocumentFilter()); }
public void indexOntology(OntologyIterator ontologyIterator) { indexOntology(ontologyIterator, new DefaultDocumentFilter()); }
public void index(OntologyDocument ontologyDocument) throws IntactSolrException { index(ontologyDocument, new DefaultDocumentFilter()); }
/** * Search by child id so return parent relationship. * * @param id * @param firstResult * @param maxResults * @return * @throws SolrServerException */ public List<OntologyTerm> searchByChildId(String id, Integer firstResult, Integer maxResults) throws SolrServerException { return searchAndCacheById(id, firstResult, maxResults, OntologyFieldNames.CHILD_ID, childSearchesMap); }
private List<OntologyTerm> processChildrenHits(QueryResponse queryResponse, String id) throws SolrServerException { return processOntologyTermHits( queryResponse, id, OntologyFieldNames.CHILD_ID, OntologyFieldNames.CHILD_NAME, OntologyFieldNames.CHILDREN_SYNONYMS); }
private List<OntologyTerm> processParentsHits(QueryResponse queryResponse, String id) throws IOException, SolrServerException { return processOntologyTermHits( queryResponse, id, OntologyFieldNames.PARENT_ID, OntologyFieldNames.PARENT_NAME, OntologyFieldNames.PARENT_SYNONYMS); }
public void indexObo(OntologyMapping[] ontologyMappings) throws IntactSolrException { indexObo(ontologyMappings, new DefaultDocumentFilter()); }
public void indexObo(String ontologyName, URL oboUrl) throws IntactSolrException { indexObo(ontologyName, oboUrl, new DefaultDocumentFilter()); }