Search in sources :

Example 11 with StmtIterator

use of com.hp.hpl.jena.rdf.model.StmtIterator in project stanbol by apache.

the class JenaToClerezzaConverterTest method testGraphToJenaModel.

@Test
public void testGraphToJenaModel() {
    /*
		 * Convert the Graph to a Jena Model.
		 */
    Model model = JenaToClerezzaConverter.clerezzaGraphToJenaModel(mGraph);
    /*
		 * Print all the triples contained in the Jena Model.
		 */
    StmtIterator stmtIt = model.listStatements();
    while (stmtIt.hasNext()) {
        Statement statement = stmtIt.next();
        log.info(statement.toString());
    }
}
Also used : StmtIterator(com.hp.hpl.jena.rdf.model.StmtIterator) Statement(com.hp.hpl.jena.rdf.model.Statement) Model(com.hp.hpl.jena.rdf.model.Model) Test(org.junit.Test)

Aggregations

StmtIterator (com.hp.hpl.jena.rdf.model.StmtIterator)11 Statement (com.hp.hpl.jena.rdf.model.Statement)8 OWLOntologyCreationException (org.semanticweb.owlapi.model.OWLOntologyCreationException)7 OWLOntology (org.semanticweb.owlapi.model.OWLOntology)6 OntModel (com.hp.hpl.jena.ontology.OntModel)5 Resource (com.hp.hpl.jena.rdf.model.Resource)5 OWLAnnotationProperty (org.semanticweb.owlapi.model.OWLAnnotationProperty)4 OWLAxiom (org.semanticweb.owlapi.model.OWLAxiom)4 OWLNamedIndividual (org.semanticweb.owlapi.model.OWLNamedIndividual)4 OWLObjectProperty (org.semanticweb.owlapi.model.OWLObjectProperty)4 OWLAnnotationAssertionAxiom (org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom)3 OWLClass (org.semanticweb.owlapi.model.OWLClass)3 OWLDataProperty (org.semanticweb.owlapi.model.OWLDataProperty)3 OWLDatatype (org.semanticweb.owlapi.model.OWLDatatype)3 OWLLiteral (org.semanticweb.owlapi.model.OWLLiteral)3 OWLOntologyManager (org.semanticweb.owlapi.model.OWLOntologyManager)3 Literal (com.hp.hpl.jena.rdf.model.Literal)2 RDFNode (com.hp.hpl.jena.rdf.model.RDFNode)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2