@Test void testLoadEctoSubset() { Path ectoPath = Paths.get("src/test/resources/ecto.obo"); Ontology ecto = OntologyLoader.loadOntology(ectoPath.toFile(), "ECTO"); ecto.getRelationMap() .values() .forEach(relationship -> assertEquals(RelationshipType.IS_A, relationship.getRelationshipType())); Term rootT = ecto.getTermMap().get(ecto.getRootTermId()); assertEquals("artificial root term", rootT.getName()); assertEquals(TermId.of("owl:Thing"), ecto.getRootTermId()); Set<String> termPrefixes = ecto.getAllTermIds().stream().map(TermId::getPrefix).collect(toSet()); assertFalse(termPrefixes.contains("NCIT")); assertFalse(termPrefixes.contains("CHEBI")); assertFalse(termPrefixes.contains("GO")); assertEquals(2271, ecto.countNonObsoleteTerms()); assertEquals(0, ecto.countAlternateTermIds()); }
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);  }