SynonymGenerationTools implements TermGenieScriptFunctionsSynonyms { protected Pair<Boolean, String> matchScopes(ISynonym s1, ISynonym s2) { return matchScopes(s1.getScope(), s2.getScope()); } SynonymGenerationTools(boolean filterNonAsciiSynonyms); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x,
			OWLGraphWrapper ontology,
			String suffix,
			String defaultScope,
			String label); @Override List<ISynonym> synonyms(String[] prefixes,
			String[] scopes,
			OWLObject x,
			OWLGraphWrapper ontology,
			String[] suffixes,
			String label); @Override List<ISynonym> addSynonym(String label,
			List<ISynonym> results,
			String prefix,
			String infix,
			String suffix,
			String scope); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x1,
			OWLGraphWrapper ontology1,
			String infix,
			OWLObject x2,
			OWLGraphWrapper ontology2,
			String suffix,
			String defaultScope,
			String label); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x1,
			OWLGraphWrapper ontology1,
			String infix,
			OWLObject x2,
			OWLGraphWrapper ontology2,
			String suffix,
			String defaultScope,
			String label,
			String requiredPrefixLeft,
			boolean ignoreSynonymsRight); @Override List<ISynonym> synonyms(String prefix,
			OWLObject[] terms,
			String[] defaultScopes,
			OWLGraphWrapper ontology,
			String infix,
			String suffix,
			String label); @Override void setSynonymFilters(boolean requireCategories,
			boolean removeCategories,
			String[] categories); @Override void resetSynonymFilters();  }
@Test public void testMatchScopes() { assertScopeMatch(OboFormatTag.TAG_RELATED, match(null, null)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_RELATED, OboFormatTag.TAG_RELATED)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_RELATED, null)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(null, OboFormatTag.TAG_RELATED)); assertScopeMatch(OboFormatTag.TAG_BROAD, match(OboFormatTag.TAG_BROAD, OboFormatTag.TAG_BROAD)); assertFalse(match(OboFormatTag.TAG_BROAD, null).getOne()); assertFalse(match(null, OboFormatTag.TAG_BROAD).getOne()); assertFalse(match(OboFormatTag.TAG_BROAD, OboFormatTag.TAG_RELATED).getOne()); assertFalse(match(OboFormatTag.TAG_BROAD, OboFormatTag.TAG_NARROW).getOne()); assertFalse(match(OboFormatTag.TAG_BROAD, OboFormatTag.TAG_EXACT).getOne()); assertScopeMatch(OboFormatTag.TAG_NARROW, match(OboFormatTag.TAG_NARROW, OboFormatTag.TAG_NARROW)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_NARROW, null)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(null, OboFormatTag.TAG_NARROW)); assertScopeMatch(OboFormatTag.TAG_NARROW, match(OboFormatTag.TAG_NARROW, OboFormatTag.TAG_NARROW)); assertScopeMatch(OboFormatTag.TAG_NARROW, match(OboFormatTag.TAG_NARROW, OboFormatTag.TAG_EXACT)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_NARROW, OboFormatTag.TAG_RELATED)); assertScopeMatch(OboFormatTag.TAG_EXACT, match(OboFormatTag.TAG_EXACT, OboFormatTag.TAG_EXACT)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_EXACT, null)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(null, OboFormatTag.TAG_EXACT)); assertScopeMatch(OboFormatTag.TAG_NARROW, match(OboFormatTag.TAG_EXACT, OboFormatTag.TAG_NARROW)); assertScopeMatch(OboFormatTag.TAG_RELATED, match(OboFormatTag.TAG_EXACT, OboFormatTag.TAG_RELATED)); }