Package org.mindswap.pellet

Examples of org.mindswap.pellet.DependencySet.union()


        // and there are some conflicting edges
        if(abox.isClosed())
          clashDepends = abox.getClash().getDepends();
      }
      else {
          clashDepends = clashDepends.union(ds, abox.doExplanation());
      }
     
      // if there is a clash
      if(clashDepends != null) {       
        if( log.isLoggable( Level.FINE ) ) {
View Full Code Here


        }
        else {
            // set the clash only if we are returning from the function
          if(abox.doExplanation()) {
              ATermAppl positive = (ATermUtils.isNot(notD) ? d : notD);
              abox.setClash(Clash.atomic(node, clashDepends.union(ds, abox.doExplanation()), positive));
          }
          else
              abox.setClash(Clash.atomic(node, clashDepends.union(ds, abox.doExplanation())));

          //CHW - added for inc reasoning
View Full Code Here

          if(abox.doExplanation()) {
              ATermAppl positive = (ATermUtils.isNot(notD) ? d : notD);
              abox.setClash(Clash.atomic(node, clashDepends.union(ds, abox.doExplanation()), positive));
          }
          else
              abox.setClash(Clash.atomic(node, clashDepends.union(ds, abox.doExplanation())));

          //CHW - added for inc reasoning
          if(PelletOptions.USE_INCREMENTAL_DELETION)
            abox.getKB().getDependencyIndex().addCloseBranchDependency(this, abox.getClash().getDepends());
View Full Code Here

        log.fine( "RULE: " + fact + " " + ds );

      ATermAppl pred = fact.getElements().get( Compiler.PRED );
      Individual subj = abox.getIndividual( fact.getElements().get( Compiler.SUBJ ) );
      if( subj.isMerged() ) {
        ds = ds.union( subj.getMergeDependency( true ), abox.doExplanation() );
        subj = subj.getSame();
      }

      ATermAppl objTerm = fact.getElements().get( Compiler.OBJ );
View Full Code Here

      ATermAppl[] factParts = new ATermAppl[permutation.length];
      for( int i = 0; i < permutation.length; i++ )
        factParts[permutation[i]] = constants.get( i );

      DependencySet ds = match.first.getDependencySet();
      ds = ds.union( match.second.getDependencySet(), doExplanation );

      List<ATermAppl> orderedConstants = Arrays.asList( factParts );
      Fact fact = new Fact( ds, orderedConstants );
      facts.add( fact );
      index.add( orderedConstants, fact );
View Full Code Here

          constants.add( getVar( term, f.getElements() ) );
        else
          constants.add( term );
      }
      DependencySet ds = f.getDependencySet();
      ds = ds.union( rhs.getDependencySet(), doExplanation );
      if( rule != null && rule.explain != null )
        ds = ds.union( rule.explain, doExplanation );
      results.add( new Fact( ds, constants ) );
    }
    return results;
View Full Code Here

          constants.add( term );
      }
      DependencySet ds = f.getDependencySet();
      ds = ds.union( rhs.getDependencySet(), doExplanation );
      if( rule != null && rule.explain != null )
        ds = ds.union( rule.explain, doExplanation );
      results.add( new Fact( ds, constants ) );
    }
    return results;
  }
 
View Full Code Here

      DependencySet ds = x.getDepends( allDesc );
      if (existing == null) {
        existing = new ArrayList<ATermAppl>();
        dataranges.put( r, existing );
      } else {
        ds = ds.union( rangeDepends.get( r ), strategy.getABox().doExplanation() );
      }
      existing.add( (ATermAppl) allDesc.getArgument(1) );
      rangeDepends.put( r, ds );

    }
View Full Code Here

           * TODO: Verify the dependency set handling here. The old
           * implementation just used independent (thus could avoid
           * this loop and call addAll)
           */
          existing.add( dataRange );
          ds = ds.union( role.getExplainRange( dataRange ), strategy.getABox().doExplanation() );
          rangeDepends.put( r, ds );
        }
      }
    }

View Full Code Here

      for (Role superRole : role.getSuperRoles()) {
        final ATermAppl s = superRole.getName();
        Collection<ATermAppl> inherited = dataranges.get( s );
        if( inherited != null ) {
          drs.addAll( inherited );
          ds = ds.union( rangeDepends.get( s ), strategy.getABox().doExplanation() ).union(
              role.getExplainSuper( s ), strategy.getABox().doExplanation() );
        }
      }

      if( !drs.isEmpty() ) {
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.