@Test void testLoadEctoAll() { Path ectoPath = Paths.get("src/test/resources/ecto.obo"); Ontology permissiveOntology = OntologyLoader.loadOntology(ectoPath.toFile()); assertEquals(TermId.of("owl:Thing"), permissiveOntology.getRootTermId()); assertEquals(8343, permissiveOntology.countNonObsoleteTerms()); assertEquals(4, permissiveOntology.countAlternateTermIds()); Set<String> prefixes = permissiveOntology.getAllTermIds() .stream() .map(TermId::getPrefix) .collect(toSet()); assertTrue(prefixes.contains("NCIT")); assertTrue(prefixes.contains("CHEBI")); assertTrue(prefixes.contains("GO")); long ectoTermCount = permissiveOntology.getTermMap().values(). stream(). filter(term -> term.getId().getPrefix().equals("ECTO")). count(); assertEquals(2270, ectoTermCount); }
public static Ontology loadOntology(File file) { return loadOntology(file, CurieUtilBuilder.defaultCurieUtil()); }
OntologyLoader { public static Ontology loadOntology(File file) { return loadOntology(file, CurieUtilBuilder.defaultCurieUtil()); } }
OntologyLoader { public static Ontology loadOntology(File file) { return loadOntology(file, CurieUtilBuilder.defaultCurieUtil()); } private  OntologyLoader(); }
OntologyLoader { public static Ontology loadOntology(File file) { return loadOntology(file, CurieUtilBuilder.defaultCurieUtil()); } private  OntologyLoader(); static Ontology loadOntology(File file); static Ontology loadOntology(File file, String... termIdPrefixes); static Ontology loadOntology(File file, CurieUtil curieUtil, String... termIdPrefixes); static Ontology loadOntology(InputStream inputStream); static Ontology loadOntology(InputStream inputStream, String... termIdPrefixes); static Ontology loadOntology(InputStream inputStream, CurieUtil curieUtil, String... termIdPrefixes); static Ontology loadOntology(GraphDocument graphDocument, CurieUtil curieUtil, String... termIdPrefixes); }
OntologyLoader { public static Ontology loadOntology(File file) { return loadOntology(file, CurieUtilBuilder.defaultCurieUtil()); } private  OntologyLoader(); static Ontology loadOntology(File file); static Ontology loadOntology(File file, String... termIdPrefixes); static Ontology loadOntology(File file, CurieUtil curieUtil, String... termIdPrefixes); static Ontology loadOntology(InputStream inputStream); static Ontology loadOntology(InputStream inputStream, String... termIdPrefixes); static Ontology loadOntology(InputStream inputStream, CurieUtil curieUtil, String... termIdPrefixes); static Ontology loadOntology(GraphDocument graphDocument, CurieUtil curieUtil, String... termIdPrefixes);  }