Package org.semanticweb.owl.io

Examples of org.semanticweb.owl.io.StringInputSource


        + "@prefix owl: <http://www.w3.org/2002/07/owl#> .\r\n" + "\r\n"
        + "ex:C rdfs:subClassOf ex:D .\r\n" + "[] a ex:C .";

    Reasoner pellet = new Reasoner( OWL.manager );

    OWLOntology ont = OWL.manager.loadOntology( new StringInputSource( src ) );
    pellet.loadOntology( ont );

    OWLClass D = OWL.Class( ns + "D" );

    assertTrue( pellet.getIndividuals( D, true ).size() == 0 );
View Full Code Here


  private OWLOntologyInputSource convertN3(String fileURI) {
    StringWriter ontologySrc = new StringWriter();
    Model model = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );
    model.read( fileURI, fileURI, "Turtle" );
    model.write( ontologySrc, "RDF/XML" );
    return new StringInputSource( ontologySrc.toString() );
  }
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.io.StringInputSource

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.