Examples of OntModelSpec


Examples of com.hp.hpl.jena.ontology.OntModelSpec

    assertIteratorContains( i2.listProperties(), model.createStatement( i2, prop, "test" ) );
  }

  @Test
  public void testSameAs3() {
    OntModelSpec ontModelSpec = new OntModelSpec( OntModelSpec.OWL_DL_MEM_RULE_INF );
    ontModelSpec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( ontModelSpec );
    Individual i1 = model.createIndividual( "http://test#i1", OWL.Thing );
    Individual i2 = model.createIndividual( "http://test#i2", OWL.Thing );
    OntClass c = model.createEnumeratedClass( "http://test#C", model.createList( new RDFNode[] {
        i1, i2 } ) );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModelSpec

  }

  @Test
  public void testHasValueReasoning() {
    String ns = "urn:test:";
    OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM );
    spec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( spec, null );
    OntClass HomeOwner = model.createClass( ns + "HomeOwner" );
    Individual bob = model.createIndividual( ns + "bob", HomeOwner );
    ObjectProperty hasNeighbor = model.createObjectProperty( ns + "hasNeighbor" );
    OntClass NeighborOfBob = model.createClass( ns + "NeighborOfBob" );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModelSpec

    Individual d = cls.createIndividual( ns + "d" );
    Individual e = cls.createIndividual( ns + "e" );
    Individual f = cls.createIndividual( ns + "f" );
    Individual g = cls.createIndividual( ns + "g" );

    OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM );
    // spec.setReasoner( ReasonerRegistry.getDIGReasoner() );
    spec.setReasoner( PelletReasonerFactory.theInstance().create() );
    model = ModelFactory.createOntologyModel( spec, model );

    // This is the ABox data used in this example:
    //
    // hasParent hasParent hasRelative
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModelSpec

    public void run() {
      try {
        log.info("Initializing gemet...");

        OntDocumentManager ontManager = new OntDocumentManager();
        OntModelSpec s = new OntModelSpec(OntModelSpec.OWL_MEM);
        OntModel model = ontManager.getOntology(gemetFilePath, s);
       
        context.setModel(model);

        log.info("Gemet initialized.");
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.