robot-core/src/test/java/org/obolibrary/robot/TemplateTest.java
@Test
  public void testLegacyTemplate() throws Exception {
    Map<String, String> options = TemplateOperation.getDefaultOptions();
    IOHelper ioHelper = new IOHelper();
    ioHelper.addPrefix("ex", "http://example.com/");

    Map<String, List<List<String>>> tables = new LinkedHashMap<>();
    String path = "/docs-template.csv";
    tables.put(path, TemplateHelper.readCSV(this.getClass().getResourceAsStream(path)));

    OWLOntology template = TemplateOperation.template(null, ioHelper, tables, options);

    OntologyHelper.setOntologyIRI(
        template, IRI.create("https://github.com/ontodev/robot/examples/template.owl"), null);
    assertIdentical("/docs-template.owl", template);
  }
/**
   * Test legacy doc template example.
   *
   * @throws Exception on any issue
   */
Test legacy doc template example.
@throws Exception on any issue
Test legacy doc template example . @throws Exception on any issue
@Test
  public void testLegacyTemplate() throws Exception {
    Map<String, String> options = TemplateOperation.getDefaultOptions();
    IOHelper ioHelper = new IOHelper();
    ioHelper.addPrefix("ex", "http://example.com/");
    Map<String, List<List<String>>> tables = new LinkedHashMap<>();
    String path = "/docs-template.csv";
    tables.put(path, TemplateHelper.readCSV(this.getClass().getResourceAsStream(path)));
    OWLOntology template = TemplateOperation.template(null, ioHelper, tables, options);
    OntologyHelper.setOntologyIRI(
        template, IRI.create("https://github.com/ontodev/robot/examples/template.owl"), null);
    assertIdentical("/docs-template.owl", template);
  }
@ Test public void testLegacyTemplate ( ) throws Exception { Map < String , String > options = TemplateOperation . getDefaultOptions ( ) ; IOHelper ioHelper = new IOHelper ( ) ; ioHelper . addPrefix ( "ex" , "http://example.com/" ) ; Map < String , List < List < String > > > tables = new LinkedHashMap < > ( ) ; String path = "/docs-template.csv" ; tables . put ( path , TemplateHelper . readCSV ( this . getClass ( ) . getResourceAsStream ( path ) ) ) ; OWLOntology template = TemplateOperation . template ( null , ioHelper , tables , options ) ; OntologyHelper . setOntologyIRI ( template , IRI . create ( "https://github.com/ontodev/robot/examples/template.owl" ) , null ) ; assertIdentical ( "/docs-template.owl" , template ) ; }
Test legacy doc template example.
Test legacy doc template example .