Package org.semanticweb.owlapi.util

Examples of org.semanticweb.owlapi.util.OWLOntologyMerger


      OWLOntology rootOntology) throws OWLOntologyCreationException,
      OWLOntologyChangeException {

    OWLOntologyImportsClosureSetProvider importClosureSetProvider = new OWLOntologyImportsClosureSetProvider(
        manager, rootOntology );
    OWLOntologyMerger merger = new OWLOntologyMerger( importClosureSetProvider );
    return merger.createMergedOntology( manager, MERGED_ONTOLOGY_URI );
  }
View Full Code Here


      OWLOntology rootOntology) throws OWLOntologyCreationException,
      OWLOntologyChangeException {

    OWLOntologyImportsClosureSetProvider importClosureSetProvider = new OWLOntologyImportsClosureSetProvider(
        manager, rootOntology );
    OWLOntologyMerger merger = new OWLOntologyMerger( importClosureSetProvider );
    return merger.createMergedOntology( manager, MERGED_ONTOLOGY_URI );
  }
View Full Code Here

            if (session != null) {
                set.add(session.export(OWLOntology.class, true));
            }

            if (set.size() == 1) return set.iterator().next();
            OWLOntologyMerger merger = new OWLOntologyMerger(new OWLOntologySetProvider() {
                @Override
                public Set<OWLOntology> getOntologies() {
                    return set;
                }
            });
            return merger.createMergedOntology(createOWLOntologyManager(),
                IRI.create("reasoners:input-" + System.currentTimeMillis()));
        } catch (OWLOntologyCreationException e) {
            String message = "The network for scope/session cannot be retrieved";
            log.error(message + ":", e);
            throw new IllegalArgumentException(message);
View Full Code Here

                    @Override
                    public Set<OWLOntology> getOntologies() {
                        return set;
                    }
                };
                OWLOntologyMerger merger = new OWLOntologyMerger(provider);
                try {
                    ont = merger.createMergedOntology(OWLManager.createOWLOntologyManager(),
                        IRI.create(getNamespace() + getID()));
                } catch (OWLOntologyCreationException e) {
                    log.error("Failed to merge imports for ontology.", e);
                    ont = null;
                }
View Full Code Here

                    @Override
                    public Set<OWLOntology> getOntologies() {
                        return set;
                    }
                };
                OWLOntologyMerger merger = new OWLOntologyMerger(provider);
                try {
                    root = merger.createMergedOntology(OWLManager.createOWLOntologyManager(), iri);
                } catch (OWLOntologyCreationException e) {
                    log.error("Failed to merge imports for ontology " + iri, e);
                    root = null;
                }
View Full Code Here

                @Override
                public Set<OWLOntology> getOntologies() {
                    return set;
                }
            };
            OWLOntologyMerger merger = new OWLOntologyMerger(provider);
            try {
                o = merger.createMergedOntology(OWLManager.createOWLOntologyManager(), ontologyIri);
            } catch (OWLOntologyCreationException e) {
                log.error("Failed to merge imports for ontology " + ontologyIri, e);
                // do not reassign the root ontology
            }
        } else {
View Full Code Here

            }

            if (refactoredOntologyIRI == null) {
                refactoredOntologyIRI = IRI.create(URIGenerator.createID("urn://", fingerPrint.getBytes()));
            }
            OWLOntologyMerger merger = new OWLOntologyMerger(ontologyManager);

            try {

                refactoredOntology = merger.createMergedOntology(ontologyManager, refactoredOntologyIRI);

                /* ontologyStorage. */store(refactoredOntology);

            } catch (OWLOntologyCreationException e) {
                // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.util.OWLOntologyMerger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.