c = ATermUtils.makeTermAppl( filterClass.getIRI().toString() );
filter = true;
}
POTaxonomyBuilder builder = null;
// Test first the individuals parameter, as per default the --classes
// option is true
if( options.getOption( "individuals" ).getValueAsBoolean() ) {
// Parts for individuals
builder = new POTaxonomyBuilder( kb, new PartIndividualsComparator( kb, p ) );
Set<ATermAppl> individuals;
if(filter)
individuals = kb.getInstances(c);
else
individuals = kb.getIndividuals(); // Note: this is not an optimal solution
for( ATermAppl individual : individuals)
if (!ATermUtils.isBnode( individual ))
builder.classify( individual );
}
else {
builder = new POTaxonomyBuilder( kb, new PartClassesComparator( kb, p ) );
if(filter)
{
for(ATermAppl cl: getDistinctSubclasses(kb, c))
builder.classify(cl);
}
else
builder.classify();
}
Taxonomy<ATermAppl> taxonomy = builder.getTaxonomy();
ClassTreePrinter printer = new ClassTreePrinter();
printer.print( taxonomy );
publicTaxonomy = taxonomy;