protected OWLOntologyID handleOntology(OWLOntology ont, Set<AddImport> imports, Set<AddOntologyAnnotation> ontologyAnnotations) { OWLOntologyID ontologyID; ManchesterOWLSyntaxOntologyHeader header = parseOntologyHeader(false); for (OWLImportsDeclaration decl : header.getImportsDeclarations()) { assert decl != null; imports.add(new AddImport(ont, decl)); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl); if (imported != null) { imported.axioms(AxiomType.DECLARATION).forEach(this::processDeclaredEntities); } } for (OWLAnnotation anno : header.getAnnotations()) { ontologyAnnotations.add(new AddOntologyAnnotation(ont, anno)); } ontologyID = header.getOntologyID(); return ontologyID; }
protected OWLOntologyID handleOntology(OWLOntology ont, Set<AddImport> imports, Set<AddOntologyAnnotation> ontologyAnnotations) { OWLOntologyID ontologyID; ManchesterOWLSyntaxOntologyHeader header = parseOntologyHeader(false); for (OWLImportsDeclaration decl : header.getImportsDeclarations()) { assert decl != null; imports.add(new AddImport(ont, decl)); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl); if (imported != null) { imported.axioms(AxiomType.DECLARATION).forEach(this::processDeclaredEntities); } } for (OWLAnnotation anno : header.getAnnotations()) { ontologyAnnotations.add(new AddOntologyAnnotation(ont, anno)); } ontologyID = header.getOntologyID(); return ontologyID; }
protected OWLOntologyID handleOntology(OWLOntology ont, Set<AddImport> imports, Set<AddOntologyAnnotation> ontologyAnnotations) { OWLOntologyID ontologyID; ManchesterOWLSyntaxOntologyHeader header = parseOntologyHeader(false); for (OWLImportsDeclaration decl : header.getImportsDeclarations()) { assert decl != null; imports.add(new AddImport(ont, decl)); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl); if (imported != null) { imported.axioms(AxiomType.DECLARATION).forEach(this::processDeclaredEntities); } } for (OWLAnnotation anno : header.getAnnotations()) { ontologyAnnotations.add(new AddOntologyAnnotation(ont, anno)); } ontologyID = header.getOntologyID(); return ontologyID; }
private Set<OntologyAxiomPair> parseAnnotations(OWLAnnotationSubject s) { String header = consumeToken(); if (!ANNOTATIONS.matches(header)) { throw new ExceptionBuilder().withKeyword(ANNOTATIONS).build(); } Set<OWLOntology> onts = getOntologies(); Set<OntologyAxiomPair> pairs = new HashSet<>(); Set<OWLAnnotation> annos = parseAnnotationList(); for (OWLOntology ont : onts) { for (OWLAnnotation anno : annos) { if (getOntologyLoaderConfiguration().isLoadAnnotationAxioms()) { pairs.add( new OntologyAxiomPair(ont, df.getOWLAnnotationAssertionAxiom(s, anno))); } } } return pairs; }
private Set<OntologyAxiomPair> parseAnnotations(OWLAnnotationSubject s) { String header = consumeToken(); if (!ANNOTATIONS.matches(header)) { throw new ExceptionBuilder().withKeyword(ANNOTATIONS).build(); } Set<OWLOntology> onts = getOntologies(); Set<OntologyAxiomPair> pairs = new HashSet<>(); Set<OWLAnnotation> annos = parseAnnotationList(); for (OWLOntology ont : onts) { for (OWLAnnotation anno : annos) { if (getOntologyLoaderConfiguration().isLoadAnnotationAxioms()) { pairs.add( new OntologyAxiomPair(ont, df.getOWLAnnotationAssertionAxiom(s, anno))); } } } return pairs; }
protected OWLOntologyID handleOntology(OWLOntology ont, Set<AddImport> imports, Set<AddOntologyAnnotation> ontologyAnnotations) { OWLOntologyID ontologyID; ManchesterOWLSyntaxOntologyHeader header = parseOntologyHeader(false); for (OWLImportsDeclaration decl : header.getImportsDeclarations()) { assert decl != null; imports.add(new AddImport(ont, decl)); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl); if (imported != null) { imported.axioms(AxiomType.DECLARATION).forEach(this::processDeclaredEntities); } } for (OWLAnnotation anno : header.getAnnotations()) { ontologyAnnotations.add(new AddOntologyAnnotation(ont, anno)); } ontologyID = header.getOntologyID(); return ontologyID; }
private Set<OntologyAxiomPair> parseAnnotations(OWLAnnotationSubject s) { String header = consumeToken(); if (!ANNOTATIONS.matches(header)) { throw new ExceptionBuilder().withKeyword(ANNOTATIONS).build(); } Set<OWLOntology> onts = getOntologies(); Set<OntologyAxiomPair> pairs = new HashSet<>(); Set<OWLAnnotation> annos = parseAnnotationList(); for (OWLOntology ont : onts) { for (OWLAnnotation anno : annos) { if (getOntologyLoaderConfiguration().isLoadAnnotationAxioms()) { pairs.add( new OntologyAxiomPair(ont, df.getOWLAnnotationAssertionAxiom(s, anno))); } } } return pairs; }
private Set<OntologyAxiomPair> parseAnnotations(OWLAnnotationSubject s) { String header = consumeToken(); if (!ANNOTATIONS.matches(header)) { throw new ExceptionBuilder().withKeyword(ANNOTATIONS).build(); } Set<OWLOntology> onts = getOntologies(); Set<OntologyAxiomPair> pairs = new HashSet<>(); Set<OWLAnnotation> annos = parseAnnotationList(); for (OWLOntology ont : onts) { for (OWLAnnotation anno : annos) { if (getOntologyLoaderConfiguration().isLoadAnnotationAxioms()) { pairs.add( new OntologyAxiomPair(ont, df.getOWLAnnotationAssertionAxiom(s, anno))); } } } return pairs; }
OWLImportsDeclaration decl = parseImportsDeclaration(); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); imports.add(new AddImport(ont, decl)); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl);
OWLImportsDeclaration decl = parseImportsDeclaration(); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); imports.add(new AddImport(ont, decl)); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl);
OWLImportsDeclaration decl = parseImportsDeclaration(); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); imports.add(new AddImport(ont, decl)); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl);
OWLImportsDeclaration decl = parseImportsDeclaration(); ont.getOWLOntologyManager().makeLoadImportRequest(decl, getOntologyLoaderConfiguration()); imports.add(new AddImport(ont, decl)); OWLOntology imported = ont.getOWLOntologyManager().getImportedOntology(decl);