TemplateHelper { public static Set<OWLDataPropertyExpression> getDataPropertyExpressions( String tableName, QuotedEntityChecker checker, String template, String value, int rowNum, int column) throws RowParseException { String split = getSplit(template); template = getTemplate(template); ManchesterOWLSyntaxParser parser = new ManchesterOWLSyntaxParserImpl( OWLOntologyLoaderConfiguration::new, OWLManager.getOWLDataFactory()); parser.setOWLEntityChecker(checker); List<String> allValues = getAllValues(value, split); Set<OWLDataPropertyExpression> expressions = new HashSet<>(); if (template.startsWith("PI")) { for (String v : allValues) { String content = QuotedEntityChecker.wrap(v); OWLDataProperty property = checker.getOWLDataProperty(content); expressions.add(property); } } else { for (String v : allValues) { String content = QuotedEntityChecker.wrap(v); String sub = template.substring(template.indexOf(" ")).trim().replaceAll("%", content); parser.setStringToParse(sub); try { expressions.addAll(parser.parseDataPropertyList()); } catch (OWLParserException e) { String cause = getManchesterErrorCause(e); throw new RowParseException( String.format(manchesterParseError, sub, rowNum, column + 1, tableName, cause), rowNum, column + 1, v); } } } return expressions; }  static Set<OWLAnnotationProperty> getAnnotationProperties(
      QuotedEntityChecker checker, String value, String split, int column); static OWLAnnotationProperty getAnnotationProperty(
      QuotedEntityChecker checker, String name, int column); static Set<OWLAnnotation> getAnnotations(
      String tableName,
      QuotedEntityChecker checker,
      String template,
      String value,
      int rowNum,
      int column); static Set<OWLClassExpression> getClassExpressions(
      String tableName,
      ManchesterOWLSyntaxClassExpressionParser parser,
      String template,
      String value,
      int rowNum,
      int col); static Set<OWLDataPropertyExpression> getDataPropertyExpressions(
      String tableName,
      QuotedEntityChecker checker,
      String template,
      String value,
      int rowNum,
      int column); static OWLDatatype getDatatype(
      String tableName, QuotedEntityChecker checker, String name, int rowNum, int column); static OWLDatatype getDatatype(QuotedEntityChecker checker, String name); static Set<OWLDatatype> getDatatypes(
      String tableName,
      QuotedEntityChecker checker,
      String value,
      String split,
      int rowNum,
      int column); static Set<OWLIndividual> getIndividuals(
      QuotedEntityChecker checker, String value, String split); static OWLAnnotation getIRIAnnotation(
      QuotedEntityChecker checker, String template, String value, int column); static OWLAnnotation getIRIAnnotation(
      QuotedEntityChecker checker, String template, IRI value, int column); static List<IRI> getIRIs(Map<String, List<List<String>>> tables, IOHelper ioHelper); static List<IRI> getIRIs(String tableName, List<List<String>> rows, IOHelper ioHelper); static Set<OWLAnnotation> getLanguageAnnotations(
      QuotedEntityChecker checker, String template, String split, String value, int column); static Set<OWLLiteral> getLiterals(
      String tableName,
      QuotedEntityChecker checker,
      String value,
      String split,
      int rowNum,
      int column); static Set<OWLObjectPropertyExpression> getObjectPropertyExpressions(
      String tableName,
      QuotedEntityChecker checker,
      String template,
      String value,
      int rowNum,
      int column); static Set<OWLAnnotation> getStringAnnotations(
      QuotedEntityChecker checker, String template, String split, String value, int column); static Set<OWLAnnotation> getTypedAnnotations(
      String tableName,
      QuotedEntityChecker checker,
      String template,
      String split,
      String value,
      int rowNum,
      int column); static Set<IRI> getValueIRIs(QuotedEntityChecker checker, String value, String split); static List<List<String>> readCSV(String path); static List<List<String>> readCSV(InputStream stream); static List<List<String>> readCSV(Reader reader); static List<List<String>> readTable(String path); static List<List<String>> readTSV(String path); static List<List<String>> readTSV(InputStream stream); static List<List<String>> readTSV(Reader reader); static boolean validateTemplateString(String template); @Deprecated static OWLAnnotation getAnnotation(
      String tableName,
      QuotedEntityChecker checker,
      IOHelper ioHelper,
      String template,
      String value); @Deprecated static OWLAnnotation getAnnotation(
      QuotedEntityChecker checker, String template, String value); @Deprecated static OWLAnnotation getAnnotation(
      QuotedEntityChecker checker, IOHelper ioHelper, String template, String value); @Deprecated static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms(
      OWLEntity entity,
      Set<OWLAnnotation> annotations,
      Map<OWLAnnotation, Map<OWLAnnotation, Set<OWLAnnotation>>> nested); @Deprecated static Set<OWLAnnotationProperty> getAnnotationProperties(
      QuotedEntityChecker checker, String value, String split); @Deprecated static OWLAnnotationProperty getAnnotationProperty(
      QuotedEntityChecker checker, String name); @Deprecated static String getCellContent(List<List<String>> rows, int row, Integer column); @Deprecated static OWLEntity getEntity(
      QuotedEntityChecker checker, IRI type, String id, String label); @Deprecated static OWLAnnotation getIRIAnnotation(
      QuotedEntityChecker checker, String template, String value); @Deprecated static OWLAnnotation getIRIAnnotation(
      QuotedEntityChecker checker, String template, IRI value); @Deprecated static OWLAnnotation getLanguageAnnotation(
      QuotedEntityChecker checker, String template, String value); @Deprecated static Set<OWLAnnotation> getLanguageAnnotations(
      QuotedEntityChecker checker, String template, String split, String value); @Deprecated static Set<OWLAxiom> getLogicalAxioms(
      OWLClass cls,
      String classType,
      Set<OWLClassExpression> classExpressions,
      Map<OWLClassExpression, Set<OWLAnnotation>> annotatedExpressions); @Deprecated static OWLAnnotation getStringAnnotation(
      QuotedEntityChecker checker, String template, String value); @Deprecated static Set<OWLAnnotation> getStringAnnotations(
      QuotedEntityChecker checker, String template, String split, String value); @Deprecated static OWLAnnotation getTypedAnnotation(
      QuotedEntityChecker checker, String template, String value); @Deprecated static String processSplit(String template, String cell, List<String> values);  }
@Test public void testGetDataPropertyExpressions() throws Exception { String template = "P %"; String value = "UBERON:8888888"; Set<OWLDataPropertyExpression> expressions = TemplateHelper.getDataPropertyExpressions("", checker, template, value, 0, 0); OWLDataProperty p = checker.getOWLDataProperty("height"); if (p == null) { fail("'height' property not found by checker"); } if (expressions.size() != 1) { fail(String.format("Expected exactly 1 expression, got %d", expressions.size())); } for (OWLDataPropertyExpression expr : expressions) { assertEquals(p.toString(), expr.toString()); } }