OntGenerationConfig { public boolean isPreferredForJavaDoc(CharSequence s, CharSequence other) { return isStringPreferred(s, other, javadocLangPreference); } OntGenerationConfig(); void setIdentifierLanguagePreference(List<String> preference); void setIdentifierLanguagePreference(String... preference); void setJavaDocLanguagePreference(List<String> preference); void setJavaDocLanguagePreference(String... preference); ValidatorChain getValidators(); void setValidators(ValidatorChain validators); boolean isIdentifierLanguagePreferred(String lang, String otherLang); boolean isPreferredForIdentifiers(CharSequence s, CharSequence other); boolean isJavaDocLanguagePreferred(String lang, String otherLang); boolean isPreferredForJavaDoc(CharSequence s, CharSequence other); Collection<DatatypeMapper> getDatatypeMappers(); void setDatatypeMappers(Collection<DatatypeMapper> datatypeMappers); void setDatatypeMappers(DatatypeMapper... datatypeMappers); boolean isRDFSLabelAmbiguityChecked(); void setRDFSLabelAmbiguityChecking(boolean checkRDFSLabelAmbiguity); boolean isFileOrFragmentAmbiguityChecked(); void setFileOrFragmentAmbiguityChecking(boolean checkFileOrFragmentAmbiguity); String getBasePackage(); void setBasePackage(String basePackage); boolean areAdderMethodsGenerated(); void useAdderMethodGeneration(boolean doGenerateAdder); boolean areAdderAllMethodsGenerated(); void useAdderAllMethodGeneration(boolean doGenerateAdderAll); boolean areRemoverMethodsGenerated(); void useRemoverMethodGeneration(boolean doGenerateRemover); boolean areRemoverAllMethodsGenerated(); void useRemoverAllMethodGeneration(boolean doGenerateRemoverAll); static final String UNTYPED_LITERAL; }
@Test public void isPreferredForJavaDoc() throws Exception { LangString english = new LangString("This is a test.", "en"); String untyped = "This is a test."; LangString german = new LangString("Das ist ein Test.", "de"); LangString french = new LangString("Ceci est un test", "fr"); assertTrue(config.isPreferredForJavaDoc(german, english)); assertTrue(config.isPreferredForJavaDoc(german, untyped)); assertFalse(config.isPreferredForJavaDoc(untyped, english)); assertTrue(config.isPreferredForJavaDoc(english, null)); assertFalse(config.isPreferredForJavaDoc(french, null)); }