@Test void testMONDOLoad() { Path mondoPath = Paths.get("src", "test", "resources", "mondo_module.owl"); Ontology ontology = OntologyLoader.loadOntology(mondoPath.toFile(), "MONDO"); List<String> xrefs = Arrays.asList( "DOID:0060111", "ICD10:D28.2", "MedDRA:10053865", "NCIT:C4517", "Orphanet:180237", "SCTID:92100009", "UMLS:C0346190"); for (Term gt : ontology.getTerms()) { for (Dbxref xref : gt.getXrefs()) { boolean containFlag = false; for (String xrefStr : xrefs) { if (xref.getName().contains(xrefStr)) { containFlag = true; break; } } if (!containFlag) fail("Xref " + xref.getName() + " is not available."); } } assertEquals(TermId.of("MONDO:0000624"), ontology.getRootTermId()); }
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);  }