OwlapiUtils { public static OWLLiteral createOWLLiteralFromValue(Object value, String lang) { return DatatypeTransformer.transform(value, lang); } private  OwlapiUtils(); static OWLLiteral createOWLLiteralFromValue(Object value, String lang); static Object owlLiteralToValue(final OWLLiteral literal); static boolean doesLanguageMatch(OWLLiteral literal, Assertion assertion); static String getAssertionLanguage(Assertion assertion); static OWLNamedIndividual getIndividual(NamedResource subject, OWLDataFactory dataFactory); static boolean isIndividualIri(Object value);  }
@Test void createOwlLiteralFromValueCreatesSimpleLiteralFromStringWithoutLanguageTag() { final OWLLiteral result = OwlapiUtils.createOWLLiteralFromValue("test", null); assertFalse(result.hasLang()); assertEquals(OWL2Datatype.XSD_STRING.getDatatype(dataFactory), result.getDatatype()); }
@Test void createOwlLiteralFromValueCreatesLangStringFromStringWithLanguageTag() { final OWLLiteral result = OwlapiUtils.createOWLLiteralFromValue("test", LANG); assertTrue(result.hasLang()); assertEquals(OWL2Datatype.RDF_LANG_STRING.getDatatype(dataFactory), result.getDatatype()); }