@Test void testReplaceIllegalChars() { assertEquals( "area density kg/m^2 ", unitResolverImpl.replaceIllegalChars("area density (kg/m^2)")); assertEquals( "area density kg/m2 ", unitResolverImpl.replaceIllegalChars("area density (kg/m²)")); }
String replaceIllegalChars(String term) { return UnitHelper.superscriptToNumber(term).replaceAll("[^a-zA-Z0-9 /\\^]", " "); }
UnitResolverImpl implements UnitResolver { String replaceIllegalChars(String term) { return UnitHelper.superscriptToNumber(term).replaceAll("[^a-zA-Z0-9 /\\^]", " "); } }
UnitResolverImpl implements UnitResolver { String replaceIllegalChars(String term) { return UnitHelper.superscriptToNumber(term).replaceAll("[^a-zA-Z0-9 /\\^]", " "); } UnitResolverImpl(OntologyService ontologyService); }
UnitResolverImpl implements UnitResolver { String replaceIllegalChars(String term) { return UnitHelper.superscriptToNumber(term).replaceAll("[^a-zA-Z0-9 /\\^]", " "); } UnitResolverImpl(OntologyService ontologyService); @Override Unit<? extends Quantity> resolveUnit(Attribute attr); }
UnitResolverImpl implements UnitResolver { String replaceIllegalChars(String term) { return UnitHelper.superscriptToNumber(term).replaceAll("[^a-zA-Z0-9 /\\^]", " "); } UnitResolverImpl(OntologyService ontologyService); @Override Unit<? extends Quantity> resolveUnit(Attribute attr);  }