@Test public void multiTermQuery() { assertThat(GeneSetUtil.matchesGeneSetCategoryOrGeneSetValue(GENE_QUERY_WITH_GENE_SET_CATEGORIES), is(false)); assertThat(GeneSetUtil.matchesGeneSetCategoryOrGeneSetValue(GENE_QUERY_WITH_GENE_SET_VALUES), is(false)); }
public static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery) { if (geneQuery.isEmpty() || geneQuery.size() > 1) { return false; } SemanticQueryTerm term = geneQuery.iterator().next(); return term.category().isPresent() ? hasGeneSetCategory(term.category().get()) : matchesGeneSetAccession(term.value()); }
GeneSetUtil { public static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery) { if (geneQuery.isEmpty() || geneQuery.size() > 1) { return false; } SemanticQueryTerm term = geneQuery.iterator().next(); return term.category().isPresent() ? hasGeneSetCategory(term.category().get()) : matchesGeneSetAccession(term.value()); } }
GeneSetUtil { public static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery) { if (geneQuery.isEmpty() || geneQuery.size() > 1) { return false; } SemanticQueryTerm term = geneQuery.iterator().next(); return term.category().isPresent() ? hasGeneSetCategory(term.category().get()) : matchesGeneSetAccession(term.value()); } protected  GeneSetUtil(); }
GeneSetUtil { public static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery) { if (geneQuery.isEmpty() || geneQuery.size() > 1) { return false; } SemanticQueryTerm term = geneQuery.iterator().next(); return term.category().isPresent() ? hasGeneSetCategory(term.category().get()) : matchesGeneSetAccession(term.value()); } protected  GeneSetUtil(); static boolean matchesInterProAccession(String identifier); static boolean matchesGeneOntologyAccession(String identifier); static boolean matchesPlantOntologyAccession(String identifier); static boolean matchesReactomeID(String identifier); static boolean matchesPlantReactomeID(String identifier); static boolean matchesGeneSetAccession(String identifier); static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery); }
GeneSetUtil { public static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery) { if (geneQuery.isEmpty() || geneQuery.size() > 1) { return false; } SemanticQueryTerm term = geneQuery.iterator().next(); return term.category().isPresent() ? hasGeneSetCategory(term.category().get()) : matchesGeneSetAccession(term.value()); } protected  GeneSetUtil(); static boolean matchesInterProAccession(String identifier); static boolean matchesGeneOntologyAccession(String identifier); static boolean matchesPlantOntologyAccession(String identifier); static boolean matchesReactomeID(String identifier); static boolean matchesPlantReactomeID(String identifier); static boolean matchesGeneSetAccession(String identifier); static boolean matchesGeneSetCategoryOrGeneSetValue(SemanticQuery geneQuery);  }