Package org.mindswap.pellet

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


            disj = new HashSet<Literal>();
            ne.put( l, disj );
            nePresent = true;
          }
          disj.add( k );
          ds = ds.union( l.getDifferenceDependency( n ), strategy.getABox().doExplanation() );
        }
        else {
          throw new IllegalStateException();
        }
      }
View Full Code Here


    if( nePresent ) {
      try {
        if( !strategy.getABox().getDatatypeReasoner().isSatisfiable( nodes, ne ) ) {
          for( Node n : nodes ) {
            for( DependencySet typeDep : n.getDepends().values() )
              ds = ds.union( typeDep, strategy.getABox().doExplanation() );
          }
          /*
           * TODO: More descriptive clash
           */
          strategy.getABox().setClash( Clash.unexplained( ind, ds ) );
View Full Code Here

            + e.getMessage();
        if( PelletOptions.INVALID_LITERAL_AS_INCONSISTENCY ) {
          log.fine( msg );
          for( Node n : nodes ) {
            for( DependencySet typeDep : n.getDepends().values() )
              ds = ds.union( typeDep, strategy.getABox().doExplanation() );
          }
          strategy.getABox().setClash( Clash.invalidLiteral( ind, ds ) );
        }
        else {
          log.severe( msg );
View Full Code Here

            Node succ = y[c1];
            DependencySet finalDS = ds;

            strategy.addEdge( x, r, succ, ds );
            if( succ.isPruned() ) {
                finalDS = finalDS.union( succ.getMergeDependency( true ), strategy.getABox().doExplanation() );
                succ = succ.getMergedTo();
            }

            strategy.addType( succ, c, finalDS );
            for( int c2 = 0; c2 < c1; c2++ )
View Full Code Here

                    return;
                }

                if( hasMore ) {
                    // subsequent merges depend on the previous merge
                    ds = ds.union( new DependencySet( strategy.getABox().getBranches().size() ), strategy.getABox().doExplanation() );
                }
            }
        }  
    }
   
View Full Code Here

            Node y = nodes.get( i );
            for( int j = i + 1; j < nodes.size(); j++ ) {
                Node x = nodes.get( j );

                if( y.isDifferent( x ) ) {
                  ds = ds.union( y.getDifferenceDependency( x ), strategy.getABox().doExplanation() );
                    continue;
                }

                // 1. if x is a nominal node (of lower level), then Merge(y, x)
                if( x.getNominalLevel() < y.getNominalLevel() )
View Full Code Here

              continue;
            }

            if( pred.isSubRoleOf( s ) ) {
                DependencySet finalDS = subj.getDepends( av );
        finalDS = finalDS.union( ds, strategy.getABox().doExplanation() );
        finalDS = finalDS.union( s.getExplainSubOrInv( pred ), strategy.getABox().doExplanation() );
                if( roleChain.isEmpty() )
                    applyAllValues( subj, s, obj, c, finalDS );
                else if (obj.isIndividual()) {
                    ATermAppl allRC = ATermUtils.makeAllValues( roleChain, c );
View Full Code Here

            }

            if( pred.isSubRoleOf( s ) ) {
                DependencySet finalDS = subj.getDepends( av );
        finalDS = finalDS.union( ds, strategy.getABox().doExplanation() );
        finalDS = finalDS.union( s.getExplainSubOrInv( pred ), strategy.getABox().doExplanation() );
                if( roleChain.isEmpty() )
                    applyAllValues( subj, s, obj, c, finalDS );
                else if (obj.isIndividual()) {
                    ATermAppl allRC = ATermUtils.makeAllValues( roleChain, c );
View Full Code Here

                    if( !pred.isSubRoleOf( firstRole ) )
                        continue;

                    ATermAppl allRC = ATermUtils.makeAllValues( chain.getNext(), c );

                    applyAllValues( subj, pred, obj, allRC, finalDS.union(
                        firstRole.getExplainSub(pred.getName()), strategy.getABox().doExplanation()).union(
                            s.getExplainSub(chain), strategy.getABox().doExplanation() ) );

                    if( subj.isMerged() || strategy.getABox().isClosed() )
                        return;
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

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.