Package com.hp.hpl.jena.ontology

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


    s1.addProperty( p1, o1 );
    s2.addProperty( p2, o2 );
    s3.addProperty( p3, o3 );

    Statement stmt = ont.createStatement( o1, p3, s1 );
    assertIteratorContains( o1.listPropertyValues( p3 ), s1 );
    assertTrue( ont.contains( stmt ) );
    assertIteratorContains( ont.listStatements( null, p3, (RDFNode) null ), stmt );
    assertIteratorContains( ont.listStatements( o1, null, (RDFNode) null ), stmt );
    assertIteratorContains( ont.listStatements(), stmt );
View Full Code Here


    Individual x = model.createIndividual( ns + "x", c );

    model.contains( OWL.Nothing, RDF.type, OWL.Class );
   
    assertIteratorValues( model.listStatements( x, RDF.type, (Resource) null ), new Object[] {
      model.createStatement( x, RDF.type, OWL.Thing ),
      model.createStatement( x, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( anon, RDF.type, (Resource) null ), new Object[] {
View Full Code Here

    model.contains( OWL.Nothing, RDF.type, OWL.Class );
   
    assertIteratorValues( model.listStatements( x, RDF.type, (Resource) null ), new Object[] {
      model.createStatement( x, RDF.type, OWL.Thing ),
      model.createStatement( x, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( anon, RDF.type, (Resource) null ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
View Full Code Here

      model.createStatement( x, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( anon, RDF.type, (Resource) null ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
      model.createStatement( anon, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, OWL.Thing ), new Object[] {
View Full Code Here

     
    });
   
    assertIteratorValues( model.listStatements( anon, RDF.type, (Resource) null ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
      model.createStatement( anon, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, OWL.Thing ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
View Full Code Here

      model.createStatement( anon, RDF.type, c )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, OWL.Thing ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
      model.createStatement( x, RDF.type, OWL.Thing )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, c ), new Object[] {
View Full Code Here

     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, OWL.Thing ), new Object[] {
      model.createStatement( anon, RDF.type, OWL.Thing ),
      model.createStatement( x, RDF.type, OWL.Thing )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, c ), new Object[] {
      model.createStatement( anon, RDF.type, c ),
View Full Code Here

      model.createStatement( x, RDF.type, OWL.Thing )
     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, c ), new Object[] {
      model.createStatement( anon, RDF.type, c ),
      model.createStatement( x, RDF.type, c )
     
    });

  }
View Full Code Here

     
    });
   
    assertIteratorValues( model.listStatements( null, RDF.type, c ), new Object[] {
      model.createStatement( anon, RDF.type, c ),
      model.createStatement( x, RDF.type, c )
     
    });

  }
View Full Code Here

    OntProperty higher = model.getOntProperty( ns + "higher" );

    assertIteratorValues( model.listStatements( null, higher, (RDFNode) null ),
        new Statement[] {
            model.createStatement( a, higher, b ),
            model.createStatement( b, higher, c ),
            model.createStatement( c, higher, a ), } );
  }

  @Test
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.