Package org.mindswap.pellet.tbox.impl

Examples of org.mindswap.pellet.tbox.impl.Unfolding$Unconditional


      return;            
       
        Iterator<Unfolding> unfoldingList = strategy.getTBox().unfold( c );

        while( unfoldingList.hasNext() ) {
      Unfolding unfolding = unfoldingList.next();
          ATermAppl unfoldingCondition = unfolding.getCondition();
          DependencySet finalDS = node.getDepends( unfoldingCondition );
         
          if( finalDS == null )
            continue;
         
      Set<ATermAppl> unfoldingDS = unfolding.getExplanation()
          finalDS = finalDS.union( ds, strategy.getABox().doExplanation() );
          finalDS = finalDS.union( unfoldingDS, strategy.getABox().doExplanation() );
         
      ATermAppl unfoldedConcept = unfolding.getResult();           
         
            if( log.isLoggable( Level.FINE ) && !node.hasType( unfoldedConcept ) )
                log.fine( "UNF : " + node + ", " + ATermUtils.toString(c) + " -> " + ATermUtils.toString( unfoldedConcept ) + " - " + finalDS );

            strategy.addType( node, unfoldedConcept, finalDS );
View Full Code Here


      if( !tbox.isPrimitive( c )
        || definitionOrder.isCyclic( c )
        || toldTaxonomy.getAllEquivalents( c ).size() > 1 ) {
        conceptFlags.put( c, ConceptFlag.NONPRIMITIVE );
        while( unfoldingList.hasNext() ) {
          Unfolding unf = unfoldingList.next();
          for( ATermAppl d : ATermUtils.findPrimitives( unf.getResult() ) ) {
            ConceptFlag current = conceptFlags.get( d );
            if( current == null || current == ConceptFlag.COMPLETELY_DEFINED ) {
                          conceptFlags.put( d, ConceptFlag.PRIMITIVE );
                        }
          }
View Full Code Here

    markedNodes.clear();
  }

  private boolean isCDDesc(Iterator<Unfolding> unfoldingList) {   
    while( unfoldingList.hasNext() ) {
      Unfolding unf = unfoldingList.next();
      if( !isCDDesc( unf.getResult() ) ) {
              return false;
            }     
    }

    return true;
View Full Code Here

    boolean hasInverses = kb.getExpressivity().hasInverse();
    TBox tbox = kb.getTBox();
    for( ATermAppl c : kb.getClasses() ) {
      Iterator<Unfolding> unfoldingList = tbox.unfold( c );   
      while( unfoldingList.hasNext() ) {
        Unfolding unf = unfoldingList.next();
        Set<ATermAppl> usedByC = ATermUtils.findPrimitives( unf.getResult(), !hasInverses, true );
        for( ATermAppl used : usedByC ) {
          if( !kb.getClasses().contains( used ) )
            continue;
               
          addUses( c, used );
View Full Code Here

    TBox tbox = m_KB.getTBox();

    for( ATermAppl c : m_KB.getAllClasses() ) {
      Iterator<Unfolding> unfoldC = tbox.unfold( c );
      while( unfoldC.hasNext() ) {
        Unfolding unf = unfoldC.next();
        m_Visitor.visit( unf.getResult() );
      }
    }
  }
View Full Code Here

 
  private Bool checkBinaryClash(KnowledgeBase kb, ATermAppl c, CachedNode root, CachedNode otherRoot) {
        Iterator<Unfolding> unfoldingList = kb.getTBox().unfold( c );

        while( unfoldingList.hasNext() ) {
      Unfolding unfolding = unfoldingList.next();
          ATermAppl unfoldingCondition = unfolding.getCondition();
         
          if( !unfoldingCondition.equals( TOP )
            && otherRoot.getDepends().containsKey( unfoldingCondition ) ) {
            return Bool.UNKNOWN;
          }
View Full Code Here

      if( !tbox.isPrimitive( c )
        || definitionOrder.isCyclic( c )
        || toldTaxonomy.getAllEquivalents( c ).size() > 1 ) {
        conceptFlags.put( c, ConceptFlag.NONPRIMITIVE );
        while( unfoldingList.hasNext() ) {
          Unfolding unf = unfoldingList.next();
          for( ATermAppl d : ATermUtils.findPrimitives( unf.getResult() ) ) {
            ConceptFlag current = conceptFlags.get( d );
            if( current == null || current == ConceptFlag.COMPLETELY_DEFINED ) {
                          conceptFlags.put( d, ConceptFlag.PRIMITIVE );
                        }
          }
View Full Code Here

    markedNodes.clear();
  }

  private boolean isCDDesc(Iterator<Unfolding> unfoldingList) {   
    while( unfoldingList.hasNext() ) {
      Unfolding unf = unfoldingList.next();
      if( !isCDDesc( unf.getResult() ) ) {
              return false;
            }     
    }

    return true;
View Full Code Here

 
  private Bool checkBinaryClash(KnowledgeBase kb, ATermAppl c, CachedNode root, CachedNode otherRoot) {
        Iterator<Unfolding> unfoldingList = kb.getTBox().unfold( c );

        while( unfoldingList.hasNext() ) {
      Unfolding unfolding = unfoldingList.next();
          ATermAppl unfoldingCondition = unfolding.getCondition();
         
          if( !unfoldingCondition.equals( TOP )
            && otherRoot.getDepends().containsKey( unfoldingCondition ) ) {
            return Bool.UNKNOWN;
          }
View Full Code Here

      assertTrue( tbox.addAxiom( axiom1 ) );

      ATermAppl axiom2 = makeSub( A, B );
      assertTrue( tbox.addAxiom( axiom2 ) );

      Unfolding unfoldForAxiom2 = Unfolding.create( B, Collections.singleton( axiom2 ) );

      prepareTBox();

      /*
       * At this stage the TBox does not *directly* contain A [= B , but
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.tbox.impl.Unfolding$Unconditional

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.