Examples of listObjectsOfProperty()


Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    Property p = model.createAnnotationProperty( ns + "p" );
    model.prepare();

    assertTrue(model.contains(p, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );

    assertTrue(model.contains(RDFS.label, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, null ), OWL.AnnotationProperty );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    Property p = model.createAnnotationProperty( ns + "p" );
    model.prepare();

    assertTrue(model.contains(p, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );

    assertTrue(model.contains(RDFS.label, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, null ), OWL.AnnotationProperty );
  }
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    assertTrue(model.contains(p, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );

    assertTrue(model.contains(RDFS.label, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, null ), OWL.AnnotationProperty );
  }
 
  @Test
  public void testTopBottomPropertyAssertion() throws MalformedURLException {
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );

    assertTrue(model.contains(RDFS.label, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( RDFS.label, null ), OWL.AnnotationProperty );
  }
 
  @Test
  public void testTopBottomPropertyAssertion() throws MalformedURLException {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

      m.add(a, RDF.type, A);
      m.add(b, RDF.type, B);
     
      OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, m );

      assertIteratorValues( model.listObjectsOfProperty(a, RDF.type), A, C, OWL.Thing );

      assertIteratorValues( model.getIndividual(b.getURI()).listRDFTypes(true), B );
    }
    finally {
      PelletOptions.setOptions(oldOptions);
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    OntModel model = ModelFactory.createOntologyModel(fixedSchemaSpec);

    PelletInfGraph graph = (PelletInfGraph) model.getGraph();
   
    assertFalse(graph.isClassified());
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.add(a, RDF.type, A);
   
    graph.prepare();
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    model.add(a, RDF.type, A);
   
    graph.prepare();
    assertTrue(graph.isClassified());
    assertTrue(model.contains(a, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    Model subModel = ModelFactory.createDefaultModel();
    subModel.add(b, RDF.type, B);
    model.addSubModel(subModel);
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    graph.prepare();
    assertTrue(graph.isClassified());
    assertTrue(model.contains(a, RDF.type, C));
    assertTrue(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.remove(a, RDF.type, A);

    graph.prepare();
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    graph.prepare();
    assertTrue(graph.isClassified());
    assertFalse(model.contains(a, RDF.type, C));
    assertTrue(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.removeSubModel(subModel);

    graph.prepare();
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.listObjectsOfProperty()

    graph.prepare();
    assertTrue(graph.isClassified());
    assertFalse(model.contains(a, RDF.type, C));
    assertFalse(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());
  }

}
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.