Examples of listObjectsOfProperty()


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

    JohnDoe.addProperty( livesIn, USA );
    JohnDoe.addProperty( livesIn, UnitedStates );

    assertTrue( model.contains( JohnDoe, RDF.type, Person ) );
    assertTrue( model.contains( USA, OWL.sameAs, UnitedStates ) );
    assertIteratorValues( model.listObjectsOfProperty( JohnDoe, livesIn ), new Resource[] {
        USA, UnitedStates } );
  }

  @Test
  public void testESG() {
View Full Code Here

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

    Individual USDA = model.getIndividual( ns + "USDA" );

    assertTrue( "Forest_Service, comprises, Executive", model.contains( Forest_Service,
        comprises, Executive ) );

    assertIteratorValues( model.listObjectsOfProperty( Forest_Service, comprises ),
        new Resource[] { USDA, Executive } );

    assertIteratorValues( model.listSubjectsWithProperty( comprises, Executive ),
        new Resource[] {
            model.getIndividual( ns + "USDA" ),
View Full Code Here

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

    assertTrue( !model.contains( a, knows, g ) );

    assertTrue( !model.contains( a, hasRelative, g ) );

    // checking get functions
    assertIteratorValues( model.listObjectsOfProperty( a, hasRelative ), new Resource[] {
        b, c, f } );

    assertIteratorValues( model.listObjectsOfProperty( a, knows ),
        new Resource[] { b, c, d, f } );
View Full Code Here

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

    // checking get functions
    assertIteratorValues( model.listObjectsOfProperty( a, hasRelative ), new Resource[] {
        b, c, f } );

    assertIteratorValues( model.listObjectsOfProperty( a, knows ),
        new Resource[] { b, c, d, f } );

    assertIteratorValues( model.listObjectsOfProperty( b, knows ), new Resource[] { c, e, f } );

    assertIteratorValues( model.listSubjectsWithProperty( knows, e ), new Resource[] { b, d } );
View Full Code Here

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

        b, c, f } );

    assertIteratorValues( model.listObjectsOfProperty( a, knows ),
        new Resource[] { b, c, d, f } );

    assertIteratorValues( model.listObjectsOfProperty( b, knows ), new Resource[] { c, e, f } );

    assertIteratorValues( model.listSubjectsWithProperty( knows, e ), new Resource[] { b, d } );

    assertIteratorValues( model.listSubjectsWithProperty( hasRelative, f ), new Resource[] {
        a, b, c } );
View Full Code Here

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

    model.prepare();

    assertTrue( ((PelletInfGraph) model.getGraph()).getKB().isConsistent() );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasParent ), new Resource[] {
        Mom, Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasFather ), new Object[] { Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasMother ), new Object[] { Mom } );
View Full Code Here

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

    assertTrue( ((PelletInfGraph) model.getGraph()).getKB().isConsistent() );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasParent ), new Resource[] {
        Mom, Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasFather ), new Object[] { Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasMother ), new Object[] { Mom } );

    assertIteratorValues( model.listStatements( null, hasParent, (Resource) null ),
        new Statement[] {
View Full Code Here

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

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasParent ), new Resource[] {
        Mom, Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasFather ), new Object[] { Dad } );

    assertIteratorValues( model.listObjectsOfProperty( hasMother ), new Object[] { Mom } );

    assertIteratorValues( model.listStatements( null, hasParent, (Resource) null ),
        new Statement[] {
            ResourceFactory.createStatement( Bob, hasParent, Mom ),
            ResourceFactory.createStatement( Bob, hasParent, Dad ) } );
View Full Code Here

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

    assertIteratorValues( model.listStatements( Bob, null, Dad ), new Statement[] {
        ResourceFactory.createStatement( Bob, topObjProp, Dad ),
        ResourceFactory.createStatement( Bob, hasParent, Dad ),
        ResourceFactory.createStatement( Bob, hasFather, Dad ) } );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasFather ), new Resource[] { Dad } );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasMother ), new Resource[] { Mom } );
  }

  @Test
View Full Code Here

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

        ResourceFactory.createStatement( Bob, hasParent, Dad ),
        ResourceFactory.createStatement( Bob, hasFather, Dad ) } );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasFather ), new Resource[] { Dad } );

    assertIteratorValues( model.listObjectsOfProperty( Bob, hasMother ), new Resource[] { Mom } );
  }

  @Test
  public void testTeams() {
    String ns = "http://owl.man.ac.uk/2005/sssw/teams#";
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.