public CandidateSet<ATermAppl> getObviousInstances(ATermAppl c, Collection<ATermAppl> individuals) { c = ATermUtils.normalize( c ); Set<ATermAppl> subs = (kb.isClassified() && kb.getTaxonomy().contains( c )) ? kb.getTaxonomy().getFlattenedSubs( c, false ) : Collections.<ATermAppl>emptySet(); subs.remove( ATermUtils.BOTTOM ); CandidateSet<ATermAppl> cs = new CandidateSet<ATermAppl>(); for( ATermAppl x : individuals ) { Bool isType = isKnownType( x, c, subs ); cs.add( x, isType ); } return cs; }
public CandidateSet<ATermAppl> getObviousSubjects(ATermAppl p, ATermAppl o) { CandidateSet<ATermAppl> candidates = new CandidateSet<ATermAppl>( kb.getIndividuals() ); getObviousSubjects( p, o, candidates ); return candidates; }
public void update( T obj, Bool isCandidate ) { if( isCandidate.isTrue() ) { // do nothing } else if( isCandidate.isFalse() ) { remove( obj ); } else { if( knowns.contains( obj ) ) { knowns.remove( obj ); unknowns.add( obj ); } } }
for( final Object o : set.getKnowns() ) { map.put( (ATermAppl) o, true ); for( final Object o : set.getUnknowns() ) { map.put( (ATermAppl) o, false );
public CandidateSet<ATermAppl> getObviousInstances(ATermAppl c, Collection<ATermAppl> individuals) { c = ATermUtils.normalize( c ); Set<ATermAppl> subs = (kb.isClassified() && kb.getTaxonomy().contains( c )) ? kb.getTaxonomy().getFlattenedSubs( c, false ) : Collections.<ATermAppl>emptySet(); subs.remove( ATermUtils.BOTTOM ); CandidateSet<ATermAppl> cs = new CandidateSet<ATermAppl>(); for( ATermAppl x : individuals ) { Bool isType = isKnownType( x, c, subs ); cs.add( x, isType ); } return cs; }
public CandidateSet<ATermAppl> getObviousSubjects(ATermAppl p, ATermAppl o) { CandidateSet<ATermAppl> candidates = new CandidateSet<ATermAppl>( kb.getIndividuals() ); getObviousSubjects( p, o, candidates ); return candidates; }
public void update( T obj, Bool isCandidate ) { if( isCandidate.isTrue() ) { // do nothing } else if( isCandidate.isFalse() ) { remove( obj ); } else { if( knowns.contains( obj ) ) { knowns.remove( obj ); unknowns.add( obj ); } } }
public void getObviousSubjects(ATermAppl p, ATermAppl o, CandidateSet<ATermAppl> candidates) { Iterator<ATermAppl> i = candidates.iterator(); while( i.hasNext() ) { ATermAppl s = i.next(); Bool hasObviousValue = hasObviousPropertyValue( s, p, o ); if( hasObviousValue.isFalse() ) { i.remove(); } else { candidates.update( s, hasObviousValue ); } } }
public void getObviousSubjects(ATermAppl p, ATermAppl o, CandidateSet<ATermAppl> candidates) { Iterator<ATermAppl> i = candidates.iterator(); while( i.hasNext() ) { ATermAppl s = i.next(); Bool hasObviousValue = hasObviousPropertyValue( s, p, o ); if( hasObviousValue.isFalse() ) { i.remove(); } else { candidates.update( s, hasObviousValue ); } } }
public void getObviousObjects(ATermAppl p, CandidateSet<ATermAppl> candidates) { p = getRole( p ).getInverse().getName(); Iterator<ATermAppl> i = candidates.iterator(); while( i.hasNext() ) { ATermAppl s = i.next(); Bool hasObviousValue = hasObviousObjectPropertyValue( s, p, null ); candidates.update( s, hasObviousValue ); } }
public void getObviousObjects(ATermAppl p, CandidateSet<ATermAppl> candidates) { p = getRole( p ).getInverse().getName(); Iterator<ATermAppl> i = candidates.iterator(); while( i.hasNext() ) { ATermAppl s = i.next(); Bool hasObviousValue = hasObviousObjectPropertyValue( s, p, null ); candidates.update( s, hasObviousValue ); } }