Package org.mindswap.pellet.tbox

Examples of org.mindswap.pellet.tbox.TBox


    Timer t = kb.timers.startTimer( "computeToldInformation" );

    toldTaxonomy = new Taxonomy<ATermAppl>( classes, ATermUtils.TOP, ATermUtils.BOTTOM );

    // compute told subsumers for each concept
    TBox tbox = kb.getTBox();
    Collection<ATermAppl> axioms = tbox.getAxioms();
    for( ATermAppl axiom : axioms ) {
      ATermAppl c1 = (ATermAppl) axiom.getArgument( 0 );
      ATermAppl c2 = (ATermAppl) axiom.getArgument( 1 );

      boolean equivalent = axiom.getAFun().equals( ATermUtils.EQCLASSFUN );
      Set<ATermAppl> explanation = tbox.getAxiomExplanation( axiom );

      boolean reverseArgs = !ATermUtils.isPrimitive( c1 ) && ATermUtils.isPrimitive( c2 );
      if( equivalent && reverseArgs ) {
              addToldRelation( c2, c1, equivalent, explanation );
            }
View Full Code Here


    /*
     * Iterate over the post-absorption unfolded class descriptions to set
     * concept flags The iteration needs to be over classes to include
     * orphans
     */
    TBox tbox = kb.getTBox();
    for( ATermAppl c : definitionOrder ) {

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

      if( !tbox.isPrimitive( c )
        || definitionOrder.isCyclic( c )
        || toldTaxonomy.getAllEquivalents( c ).size() > 1 ) {
        conceptFlags.put( c, ConceptFlag.NONPRIMITIVE );
        while( unfoldingList.hasNext() ) {
          Unfolding unf = unfoldingList.next();
View Full Code Here

 
  protected abstract List<ATermAppl> computeDefinitionOrder();
 
  protected void processDefinitions() {
    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 ) )
View Full Code Here

      }
    }
  }

  private void processClasses() {
    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

    Timer t = kb.timers.startTimer( "computeToldInformation" );

    toldTaxonomy = new Taxonomy<ATermAppl>( classes, ATermUtils.TOP, ATermUtils.BOTTOM );

    // compute told subsumers for each concept
    TBox tbox = kb.getTBox();
    Collection<ATermAppl> axioms = tbox.getAxioms();
    for( ATermAppl axiom : axioms ) {
      ATermAppl c1 = (ATermAppl) axiom.getArgument( 0 );
      ATermAppl c2 = (ATermAppl) axiom.getArgument( 1 );

      boolean equivalent = axiom.getAFun().equals( ATermUtils.EQCLASSFUN );
      Set<ATermAppl> explanation = tbox.getAxiomExplanation( axiom );

      boolean reverseArgs = !ATermUtils.isPrimitive( c1 ) && ATermUtils.isPrimitive( c2 );
      if( equivalent && reverseArgs ) {
              addToldRelation( c2, c1, equivalent, explanation );
            }
View Full Code Here

    /*
     * Iterate over the post-absorption unfolded class descriptions to set
     * concept flags The iteration needs to be over classes to include
     * orphans
     */
    TBox tbox = kb.getTBox();
    for( ATermAppl c : definitionOrder ) {

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

      if( !tbox.isPrimitive( c )
        || definitionOrder.isCyclic( c )
        || toldTaxonomy.getAllEquivalents( c ).size() > 1 ) {
        conceptFlags.put( c, ConceptFlag.NONPRIMITIVE );
        while( unfoldingList.hasNext() ) {
          Unfolding unf = unfoldingList.next();
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.tbox.TBox

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.