Package com.hp.hpl.jena.ontology

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


    Property sibling = ontModel.createProperty( "family:sibling" );
    Resource bob = ontModel.createResource( "family:bob" );
    assertTrue( ontModel.contains( alice, sibling, bob ) );
    assertTrue( ontModel.contains( bob, sibling, alice ) );

    assertEquals( Collections.singletonList(bob), ontModel.listObjectsOfProperty( alice, sibling ).toList() );
    assertEquals( Collections.singletonList(alice), ontModel.listObjectsOfProperty( bob, sibling ).toList() );
  }

  @Test
  public void testRepeatedVars() throws Exception {
View Full Code Here


    Resource bob = ontModel.createResource( "family:bob" );
    assertTrue( ontModel.contains( alice, sibling, bob ) );
    assertTrue( ontModel.contains( bob, sibling, alice ) );

    assertEquals( Collections.singletonList(bob), ontModel.listObjectsOfProperty( alice, sibling ).toList() );
    assertEquals( Collections.singletonList(alice), ontModel.listObjectsOfProperty( bob, sibling ).toList() );
  }

  @Test
  public void testRepeatedVars() throws Exception {
    StringDocumentSource source = new StringDocumentSource("Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\n" +
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.