Package org.mindswap.pellet

Examples of org.mindswap.pellet.Individual


      // note that we do not need to enforce the guess rule for
      // datatype properties because we may only have inverse
      // functional datatype properties which will be handled
      // inside applyPropertyRestrictions
      if (subj.isBlockable() && obj.isNominal() && !obj.isLiteral() && pred.isInverseFunctional()) {
        Individual o = (Individual) obj;
        int max = 1;
        if (!o.hasDistinctRNeighborsForMin(pred.getInverse(), max, ATermUtils.TOP, true)) {
          int guessMin = o.getMinCard(pred.getInverse(), ATermUtils.TOP);
          if (guessMin == 0) {
            guessMin = 1;
          }

          if (guessMin > max) {
View Full Code Here


    monitor.setProgressLength( kb.getIndividuals().size() );
    monitor.taskStarted();

    Iterator<Individual> i = kb.getABox().getIndIterator();
    for( int count = 0; i.hasNext(); count++ ) {
      Individual x = i.next();

      monitor.incrementProgress();
     
      kb.timers.getTimer( "realize" ).check();
     
      if( monitor.isCanceled() ) {
              return false;
            }

      if( log.isLoggable( Level.FINER ) ) {
              log.finer( count + ") Realizing " + format( x.getName() ) + " " );
            }

      realize(x);
    }
View Full Code Here

    this.minGuess = minGuess;
    this.qualification = q;
  }   
   
  public IndividualBranch copyTo(ABox abox) {
      Individual x = abox.getIndividual(ind.getName());
      IndividualBranch b = new GuessBranch(abox, null, x, r, minGuess, minGuess + getTryCount() - 1, qualification, getTermDepends());
      b.setAnonCount( getAnonCount() );
      b.setNodeCount( nodeCount );
      b.setBranch( branch );
      b.setStrategy( strategy );
View Full Code Here

      m_Expressivity.setHasIndividual(true);
    }
   
    Iterator<Individual> i = m_KB.getABox().getIndIterator();
    while( i.hasNext() ) {
      Individual ind = i.next();
      ATermAppl nominal = ATermUtils.makeValue( ind.getName() );
      Iterator<ATermAppl> j = ind.getTypes().iterator();
      while( j.hasNext() ) {
        ATermAppl term = j.next();

        if( term.equals( nominal ) )
          continue;
View Full Code Here

        // importantly restore clears the clash info causing exceptions
        if( tryNext < tryCount - 1 && clashDepends.contains( getBranch() ) ) {
          AtomIObject obj = (AtomIObject) (atom instanceof UnaryAtom
            ? ((UnaryAtom) atom).getArgument()
            : ((BinaryAtom) atom).getArgument1());
          Individual ind = binding.get( obj );

          strategy.restoreLocal( ind, this );

          // global restore sets the branch number to previous
          // value so we need to
View Full Code Here

      if( result != null )
        return result;
    }

    if( bothNamedIndividuals ) {
      Individual ind1 = (Individual) root1;
      Individual ind2 = (Individual) root2;
      DependencySet ds = ind1.getDifferenceDependency( ind2 );
      if( ds != null ) {
        return ds.isIndependent()
          ? Bool.FALSE
          : Bool.UNKNOWN;
View Full Code Here

          neighbors = new HashSet<ATermAppl>();
          kb.getABox().getObjectPropertyValues( pNode.getName(), role, neighbors,
              neighbors, false );
        }
       
        Individual ind = kb.getABox().getIndividual( val ).getSame();
        Set<ATermAppl> samesAndMaybes = new HashSet<ATermAppl>();
        kb.getABox().getSames( ind, samesAndMaybes, samesAndMaybes );
       
        found = SetUtils.intersects( samesAndMaybes, neighbors );
      }
View Full Code Here

  /**
   * @param val
   * @return
   */
  private boolean isRootNominal(KnowledgeBase kb, ATermAppl val) {
    Individual ind = kb.getABox().getIndividual( val );
   
    return ind != null && ind.isRootNominal();
  }
View Full Code Here

    this.qualification = qualification;
        this.prevDS = new DependencySet[mergePairs.size()];
  }   
   
  public IndividualBranch copyTo(ABox abox) {
      Individual x = abox.getIndividual(ind.getName());
      MaxBranch b = new MaxBranch(abox, null, x, r, n, qualification, mergePairs, getTermDepends());
      b.setAnonCount( getAnonCount() );
      b.setNodeCount( nodeCount );
      b.setBranch( branch );
      b.setStrategy( strategy );
View Full Code Here

      t.stop();
    }
  }
 
  public boolean isIndirectlyBlocked(Individual blocked) {
    Individual parent = blocked.getParent();
    if( parent == null )
      return false;
    blocked.setBlocked( isBlocked( parent ) );
    return blocked.isBlocked();
  }
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.Individual

Copyright © 2018 www.massapicom. 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.