Package org.mindswap.pellet

Examples of org.mindswap.pellet.DependencySet


        return;
      }

      absorbedAxioms.addAll( explain );

      DependencySet ds = new DependencySet( explain );
      while( list.hasNext() ) {
        ATermAppl nominal = list.next();     
        ATermAppl ind = (ATermAppl) nominal.getArgument( 0 );

        if( log.isLoggable( Level.FINE ) )
View Full Code Here


                + ATermUtils.toString( c ) );

          absorbedAxioms.addAll( explanation );

          kb.addIndividual( ind );
          kb.addType( ind, allInvPC, new DependencySet( explanation ) );

          return true;
        }
      }
View Full Code Here

          log.finer( "Absorb into " + ind + " with inverse of " + p + " for " + c );
       
        tbox.getAbsorbedAxioms().addAll( explanation );

        kb.addIndividual( ind );
        kb.addType( ind, allInvPC, new DependencySet( explanation ) );

        return true;
      }
    }
View Full Code Here

    if( log.isLoggable( Level.FINE ) )
      log.fine( "Absorb nominals: " + ATermUtils.toString( c ) + " " +  list );

    tbox.getAbsorbedAxioms().addAll( explain );

    DependencySet ds = new DependencySet( explain );
    while( !list.isEmpty() ) {
      ATermAppl nominal = (ATermAppl) list.getFirst();
      ATermAppl ind = (ATermAppl) nominal.getArgument( 0 );
      kb.addIndividual( ind );
      kb.addType( ind, c, ds );
View Full Code Here

      if( log.isLoggable( Level.FINE ) )
        log.fine( inferred.size() + " inferred fact(s)" );
     
      //need to add the inferred facts back to the tableau
      DependencySet ds = DependencySet.INDEPENDENT;
      for ( Fact f : inferred ) {
        ATermAppl pred = f.getElements().get( Compiler.PRED );
        ATermAppl subj = f.getElements().get( Compiler.SUBJ );
        ATermAppl obj =  f.getElements().get( Compiler.OBJ );
       
View Full Code Here

   * translated.
   */
  public com.clarkparsia.pellet.rules.rete.Rule translateRule(Rule rule) {
    com.clarkparsia.pellet.rules.rete.Rule reteRule;

    DependencySet ds = DependencySet.INDEPENDENT; // TODO Make DS for rule
    List<TermTuple> head = translateAtoms(rule.getHead(), ds);
    List<TermTuple> body = translateAtoms(rule.getBody(), ds);

    if (head == null || body == null) {
      if( log.isLoggable( Level.FINE ) )
View Full Code Here

    }

    public void visit(ClassAtom atom) {
      Pair<ATermAppl, DependencySet> arg = translateAtomObject(atom
          .getArgument());
      DependencySet mergedDS = ds;
      if (arg.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg.second, abox.doExplanation());

      result = new TermTuple(mergedDS, Compiler.TYPE, arg.first, atom
          .getPredicate());
View Full Code Here

    public void visit(DatavaluedPropertyAtom atom) {
      Pair<ATermAppl, DependencySet> arg1 = translateAtomObject(atom
          .getArgument1());
      Pair<ATermAppl, DependencySet> arg2 = translateAtomObject(atom
          .getArgument2());
      DependencySet mergedDS = ds;
      if (arg1.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg1.second, abox.doExplanation());
      if (arg2.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg2.second, abox.doExplanation());
View Full Code Here

    public void visit(DifferentIndividualsAtom atom) {
      Pair<ATermAppl, DependencySet> arg1 = translateAtomObject(atom
          .getArgument1());
      Pair<ATermAppl, DependencySet> arg2 = translateAtomObject(atom
          .getArgument2());
      DependencySet mergedDS = ds;
      if (arg1.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg1.second, abox.doExplanation());
      if (arg2.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg2.second, abox.doExplanation());
View Full Code Here

    public void visit(IndividualPropertyAtom atom) {
      Pair<ATermAppl, DependencySet> arg1 = translateAtomObject(atom
          .getArgument1());
      Pair<ATermAppl, DependencySet> arg2 = translateAtomObject(atom
          .getArgument2());
      DependencySet mergedDS = ds;
      if (arg1.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg1.second, abox.doExplanation());
      if (arg2.second != DependencySet.INDEPENDENT)
        mergedDS = ds.union(arg2.second, abox.doExplanation());
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.DependencySet

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.