Package org.semanticweb.owlapi.formats

Examples of org.semanticweb.owlapi.formats.TurtleDocumentFormat


        runTestOntologyContainsAxioms1(format);
    }

    @Nonnull
    private static TurtleDocumentFormat createTurtleOntologyFormat() {
        TurtleDocumentFormat format = new TurtleDocumentFormat();
        format.setAddMissingTypes(false);
        return format;
    }
View Full Code Here


        roundTripOntology(ont, new FunctionalSyntaxDocumentFormat());
    }

    @Test
    public void testTurtle() throws Exception {
        roundTripOntology(ont, new TurtleDocumentFormat());
    }
View Full Code Here

    public void testBlankNodes() throws OWLOntologyCreationException {
        m.loadOntologyFromOntologyDocument(new StringDocumentSource(
                "_:foo <http://example.com/> _:bar .",
                OWLOntologyDocumentSourceBase
                        .getNextDocumentIRI("string:ontology"),
                new TurtleDocumentFormat(), null));
    }
View Full Code Here

        OWLSubAnnotationPropertyOfAxiom annoAx4 = df
                .getOWLSubAnnotationPropertyOfAxiom(myComment, rdfsComment);
        m.addAxiom(ont, annoAx4);
        reload(ont, new RDFXMLDocumentFormat());
        reload(ont, new OWLXMLDocumentFormat());
        reload(ont, new TurtleDocumentFormat());
        reload(ont, new FunctionalSyntaxDocumentFormat());
    }
View Full Code Here

    }

    @Test
    public void shouldTURTLEBeEquivalent() {
        OWLOntology turt = loadOntologyFromString(TURTLE,
                IRI.create("urn:primer#turtle"), new TurtleDocumentFormat());
        assertTrue(profile.checkOntology(turt).getViolations().isEmpty());
        // XXX somehow the Turtle parser introduces a tautology: the inverse of
        // inverse(hasParent) is hasParent
        // dropping said tautology to assert equality of the rest of the axioms
        OWLObjectProperty hasParent = df.getOWLObjectProperty(IRI
View Full Code Here

    }

    @Test
    public void testIriEqualToPrefixShortenedInTurtle() throws Exception {
        OWLOntology o = createTestOntology();
        String output = saveOntology(o, new TurtleDocumentFormat()).toString();
        matchRegex(output, "rdf:\\s+rdf:type\\s+owl:NamedIndividual");
        matchRegex(output, "rdf:type\\s+rdf:type\\s+owl:NamedIndividual");
    }
View Full Code Here

TOP

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

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.