Examples of OWLOntologyDocumentSource


Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

    @Test
    public void shouldParseOBO12() throws OWLOntologyCreationException {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
        assertEquals(19, m.getOntologyParsers().size());
        @SuppressWarnings("null")
        OWLOntologyDocumentSource source = new StreamDocumentSource(getClass()
                .getResourceAsStream("/behavior.obo"),
                OWLOntologyDocumentSourceBase.getNextDocumentIRI("obo"),
                new OBO12DocumentFormat(), null);
        m.loadOntologyFromOntologyDocument(source);
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

    @SuppressWarnings("null")
    @Test
    public void shouldParseGenericOBO() throws OWLOntologyCreationException {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
        assertEquals(19, m.getOntologyParsers().size());
        OWLOntologyDocumentSource source = new StreamDocumentSource(getClass()
                .getResourceAsStream("/behavior.obo"));
        m.loadOntologyFromOntologyDocument(source);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

        if (configPath != null && !configPath.trim().isEmpty()) {
            OWLOntology oConf = null;
            OWLOntologyManager tempMgr = OWLOntologyManagerFactory.createOWLOntologyManager(offline
                    .getOntologySourceLocations().toArray(new IRI[0]));
            OWLOntologyDocumentSource oConfSrc = null;

            try {
                log.debug("Try to load the configuration ontology from a local bundle relative path");
                InputStream is = this.getClass().getResourceAsStream(configPath);
                oConfSrc = new StreamDocumentSource(is);
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

        // Load registries
        Set<OWLOntology> regOnts = new HashSet<OWLOntology>();
        for (String loc : locations) {
            try {
                IRI iri = IRI.create(loc);
                OWLOntologyDocumentSource src = null;
                OWLOntology o = null;
                if (iri.isAbsolute()) src = new IRIDocumentSource(iri);
                else {
                    // Relative IRI : use data file provider
                    log.debug("Found relative IRI {} . Will try to retrieve from data file providers.", iri);
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

        // Load registries
        Set<OWLOntology> regOnts = new HashSet<OWLOntology>();
        for (String loc : locations) {
            try {
                IRI iri = IRI.create(loc);
                OWLOntologyDocumentSource src = null;
                OWLOntology o = null;
                if (iri.isAbsolute()) src = new IRIDocumentSource(iri);
                else {
                    // Relative IRI : use data file provider
                    log.debug("Found relative IRI {} . Will try to retrieve from data file providers.", iri);
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLOntologyDocumentSource

        if (configPath != null && !configPath.trim().isEmpty()) {
            OWLOntology oConf = null;
            OWLOntologyManager tempMgr = OWLOntologyManagerFactory.createOWLOntologyManager(offline
                    .getOntologySourceLocations().toArray(new IRI[0]));
            OWLOntologyDocumentSource oConfSrc = null;

            try {
                log.debug("Try to load the configuration ontology from a local bundle relative path");
                InputStream is = this.getClass().getResourceAsStream(configPath);
                oConfSrc = new StreamDocumentSource(is);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.