private void collectFacetCountsFor(Collection<FieldCount> facetFieldCounts, List<FacetField.Count> facetCounts, String searchFieldName, String prefix) { if (facetCounts != null && !facetCounts.isEmpty()){ for (FacetField.Count count : facetCounts){ if (prefix == null || (prefix != null && count.getName().startsWith(prefix+":"))){ FieldCount fieldCount = new FieldCount(count.getName(), count.getCount(), searchFieldName); facetFieldCounts.add(fieldCount); } } } }
private void registerOntologyTermResults(FieldCount fieldCount, String db, InteractionOntologyTerm interactionTerm) { if (this.processedTerms.containsKey(interactionTerm)){ this.processedTerms.get(interactionTerm).addToCount(fieldCount.getCount()); } else { InteractionOntologyTermResults results = new InteractionOntologyTermResults(db, fieldCount.getSearchFieldName(), fieldCount.getCount()); this.processedTerms.put(interactionTerm, results); } }
try{ if (fieldCount.getSearchFieldName().equals(FieldNames.INTERACTOR_FEATURE) || fieldCount.getSearchFieldName().equals(FieldNames.INTERACTION_ANNOTATIONS)){ term = new LazyLoadedOntologyTerm(ontologySearcher, null, fieldCount.getType()); term = new LazyLoadedOntologyTerm(ontologySearcher, fieldCount.getValue()); Thread.sleep(4000); try{ if (fieldCount.getSearchFieldName().equals(FieldNames.INTERACTOR_FEATURE) || fieldCount.getSearchFieldName().equals(FieldNames.INTERACTION_ANNOTATIONS)){ term = new LazyLoadedOntologyTerm(ontologySearcher, null, fieldCount.getType()); term = new LazyLoadedOntologyTerm(ontologySearcher, fieldCount.getValue());
private void collectFacetCountsFor(Collection<FieldCount> facetFieldCounts, List<FacetField.Count> facetCounts, String searchFieldName, String[] prefixes) { if (facetCounts != null && !facetCounts.isEmpty()){ for (FacetField.Count count : facetCounts){ if (prefixes == null){ FieldCount fieldCount = new FieldCount(count.getName(), count.getCount(), searchFieldName); facetFieldCounts.add(fieldCount); } else { for (String prefix : prefixes){ if (prefix != null && count.getName().startsWith(prefix+":")){ FieldCount fieldCount = new FieldCount(count.getName(), count.getCount(), searchFieldName); facetFieldCounts.add(fieldCount); break; } } } } } }
private void collectFacetCountsFor(Collection<FieldCount> facetFieldCounts, List<FacetField.Count> facetCounts, String searchFieldName) { if (facetCounts != null && !facetCounts.isEmpty()){ for (FacetField.Count count : facetCounts){ FieldCount fieldCount = new FieldCount(count.getName(), count.getCount(), searchFieldName); facetFieldCounts.add(fieldCount); } } }