Package org.mindswap.pellet.exceptions

Examples of org.mindswap.pellet.exceptions.InternalReasonerException


    d.accept( visitor );

    ATermAppl a = visitor.result();

    if( a == null )
      throw new InternalReasonerException( "Cannot create ATerm from description " + d );

    return a;
  }
View Full Code Here


    case OWL2_AllDisjointProperties:
      naryDisjoints.put( s, builtinTerm );
      break;

    default:
      throw new InternalReasonerException( "Unexpected term: " + o );
    }
  }
View Full Code Here

      defineIndividual( st );
      kb.addPropertyValue( node2term(p), st, ot );
      break;
   
    default:
      throw new InternalReasonerException( "Unrecognized term: " + p );

    }
  }
View Full Code Here

          log.fine( msg );
          canonical = literal;
        }
        else {
          log.severe( msg );
          throw new InternalReasonerException( msg, e );
        }
      } catch( UnrecognizedDatatypeException e ) {
        final String msg = format(
            "Unrecognized datatype in literal appearing (%s) in SWRL data constant: %s",
            literal, e.getMessage() );
        log.severe( msg );
        throw new InternalReasonerException( msg, e );
      }
      result = canonical;
    }
View Full Code Here

      Rule rule = ruleVarPair.first;
      List<AtomVariable> vars = ruleVarPair.second;
      List<ATermAppl> constants = fact.getElements().subList( VARSTARTPOS, fact.getElements().size() );

      if( vars.size() != constants.size() )
        throw new InternalReasonerException( "Variable list doesn't match constants!" );

      VariableBinding binding = new VariableBinding( abox );
      for( int i = 0; i < vars.size(); i++ )
        vars.get( i ).accept( new BindingSetter( binding, constants.get( i ) ) );
View Full Code Here

  }
   
    public ATermAppl getValue( int i ) {
        switch( status ) {
            case NO_VALUES: 
                throw new InternalReasonerException( "This datatype is empty!" );
            case ONLY_TRUE:
                if( i == 0 )
                    return ATermUtils.makeTypedLiteral( "true", name.getName());
                else
                    throw new InternalReasonerException( "No more values!" );
            case ONLY_FALSE:
                if( i == 0 )
                    return ATermUtils.makeTypedLiteral( "false", name.getName());
                else
                    throw new InternalReasonerException( "No more values!" );
            case BOTH_VALUES:
                if( i == 0 )
                    return ATermUtils.makeTypedLiteral( "true", name.getName());
                else if( i == 1 )
                    return ATermUtils.makeTypedLiteral( "false", name.getName());
                else
                    throw new InternalReasonerException( "No more values!" );
        }
       
        throw new InternalReasonerException( "Invalid status!" );
    }
View Full Code Here

          Literal current = newBinding.get( arg );
         
          if ( current != null && !current.equals( result ) ) {
            // Oops, we overwrote an argument.
            if ( newBinding.get( arg ) != null )
              throw new InternalReasonerException( "General Function implementation overwrote one of its arguments!" );
            ABox.log.info( "Function results in multiple simultaneous values for variable" );
            return;
          }
          if ( current == null ) {
            newBinding.set( arg, result );
View Full Code Here

        if( element.equals( t ) ) {
          iter.remove();
          changed = true;
          for( AlphaNode a : rete.alphaIndex.match( fact ) ) {
            if( !a.remove( fact ) )
              throw new InternalReasonerException( "Could not remove fact" );

            dirtyAlphas.add( a );
          }
          break;
        }
View Full Code Here

      if( fact.getDependencySet().getBranch() > branch ) {
        factIter.remove();
        for( AlphaNode a : rete.alphaIndex.match( fact ) ) {
          if( !a.remove( fact ) )
            throw new InternalReasonerException( "Couldn't remove fact: " + fact );

          dirtyAlphas.add( a );
          changed = true;
        }
      }
View Full Code Here

  private void addToldSubsumer(ATermAppl c, ATermAppl d, Set<ATermAppl> explanation) {
    TaxonomyNode<ATermAppl> cNode = toldTaxonomy.getNode( c );
    TaxonomyNode<ATermAppl> dNode = toldTaxonomy.getNode( d );

    if( cNode == null ) {
          throw new InternalReasonerException( c + " is not in the definition order" );
        }

    if( dNode == null ) {
          throw new InternalReasonerException( d + " is not in the definition order" );
        }

    if( cNode.equals( dNode ) ) {
          return;
        }
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.exceptions.InternalReasonerException

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.