Package org.semanticweb.owlapi.formats

Examples of org.semanticweb.owlapi.formats.PrefixDocumentFormat


            OWLOntologyStorageException, IllegalAccessException,
            InstantiationException {
        OWLOntology o = makeOwlOntologyWithDeclarationsAndAnnotationAssertions(
                annotationProperty, entities);
        for (int i = 0; i < 10; i++) {
            PrefixDocumentFormat format = formatClass.newInstance();
            format.setPrefixManager(new DefaultPrefixManager(null, null,
                    "http://localhost#"));
            o = roundTrip(o);
        }
        assertEquals("annotationCount", entities.length,
                o.getAxioms(AxiomType.ANNOTATION_ASSERTION).size());
View Full Code Here


                defaultPrefix = ontologyIRIString + '#';
            }
            pm.setDefaultPrefix(defaultPrefix);
        }
        if (format instanceof PrefixDocumentFormat) {
            PrefixDocumentFormat prefixFormat = (PrefixDocumentFormat) format;
            pm.copyPrefixesFrom(prefixFormat);
            pm.setPrefixComparator(prefixFormat.getPrefixComparator());
        }
        base = "";
    }
View Full Code Here

        OWLOntology ont2 = super.roundTripOntology(ont, format);
        OWLDocumentFormat ont2Format = ont2.getOWLOntologyManager()
                .getOntologyFormat(ont2);
        if (format instanceof PrefixDocumentFormat
                && ont2Format instanceof PrefixDocumentFormat) {
            PrefixDocumentFormat prefixFormat = (PrefixDocumentFormat) format;
            prefixFormat.getPrefixName2PrefixMap();
            PrefixDocumentFormat prefixFormat2 = (PrefixDocumentFormat) ont2Format;
            for (String prefixName : prefixFormat.getPrefixNames()) {
                assert prefixName != null;
                assertTrue(prefixFormat2.containsPrefixMapping(prefixName));
                assertEquals(prefixFormat.getPrefix(prefixName),
                        prefixFormat2.getPrefix(prefixName));
            }
        }
        return ont2;
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.formats.PrefixDocumentFormat

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.