Examples of listIndividuals()


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

    }
   

    if ( model instanceof OntModel ) {
      OntModel ontModel = (OntModel) model;
      ExtendedIterator<Individual> iter = ontModel.listIndividuals(termRes);
      if ( iter.hasNext() ) {
        while ( iter.hasNext() ) {
          Resource idv = (Resource) iter.next();

          termModel.add(idv, RDF.type, termRes);
View Full Code Here

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

    }
   

    if ( model instanceof OntModel ) {
      OntModel ontModel = (OntModel) model;
      ExtendedIterator<Individual> iter = ontModel.listIndividuals(termRes);
      if ( iter.hasNext() ) {
        out.println("<br/>");
        out.println("<table class=\"inline\" width=\"100%\">");
        out.printf("<tr>%n");
        out.printf("<th>Individuals</th>");
View Full Code Here

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

    stats.add(new StatTO(OWL.Restriction.getURI(),
        String.valueOf(ontModel.listRestrictions().toList().size())));
    stats.add(new StatTO(OWL.OntologyProperty.getURI(),
        String.valueOf(ontModel.listOntProperties().toList().size())));
    stats.add(new StatTO(TypeHierarchy.INSTANCE.name(),
        String.valueOf(ontModel.listIndividuals().toList().size())));
    return stats.toArray(new StatTO[stats.size()]);
  }

}
View Full Code Here

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

    // add options here termporarily
    List<Option> list = new ArrayList<Option>();
   
    Resource classRes = ResourceFactory.createResource(classMmiUri.getTermUri());
   
    ExtendedIterator<Individual> iter = ontModel.listIndividuals(classRes);
    while ( iter.hasNext() ) {
      Resource idv = (Resource) iter.next();
      String idvName = idv.getLocalName();
      String idvUri = idv.getURI();
     
View Full Code Here

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

    model.prepare();

    // check that the update occurred and that the incremental consistency
    // was used
    assertTrue( graph.getKB().timers.getTimer( "isIncConsistent" ) == null );
    assertIteratorValues( model.listIndividuals(), new Resource[] { i1, i2, i3, i4 } );

    i4.addRDFType( C );
    model.prepare();
    assertTrue( !PelletOptions.USE_INCREMENTAL_CONSISTENCY || graph.getKB().timers.getTimer( "isIncConsistent" ).getCount() == 1 );
  }
View Full Code Here

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

    model.prepare();

    // check that the update occurred and that the incremental consistency
    // was used
    assertTrue( graph.getKB().timers.getTimer( "isIncConsistent" ).getCount() > 0 );
    assertIteratorValues( model.listIndividuals(), new Resource[] { i1, i2, i3, i4 } );

    i4.addRDFType( model.createCardinalityRestriction( null, p, 1 ) );
    graph.getKB().timers.getTimer( "isIncConsistent" ).reset();

    model.prepare();
View Full Code Here

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

    ontModel.prepare();
   
 
    Property uncle = ontModel.getProperty( ns + "hasUncle" );
    int i = 0;
    for ( Resource ind : ontModel.listIndividuals( OWL.Thing ).toList() ) {
      i++;
      System.out.println( ind.toString() + ": " + ontModel.getProperty( ind, uncle ) );
    }
   
    ((PelletInfGraph) ontModel.getGraph()).getKB().timers.print();
View Full Code Here

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

    ontModel.prepare();   

    Property exposedTo = ontModel.getProperty( ns + "is_exposed_to" );

    int i = 0;
    for ( Resource ind : ontModel.listIndividuals( OWL.Thing ).toList() ) {
      i++;
      System.out.println( ind.toString() + ": " + ontModel.getProperty( ind, exposedTo ) );
    }
   
    ((PelletInfGraph) ontModel.getGraph()).getKB().timers.print()
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.