Package de.fzi.herakles.commons

Examples of de.fzi.herakles.commons.Result


   */
  @Override
  public Object fetch(CacheKey key) throws Exception {
    Query query = (Query) key;
//    Result result = new SynchronousResult( manager );
    Result result = new Result();
    executionStrategy.execute( query, result );
   
    return result;
  }
View Full Code Here


      startReasonerThreads( reasoners, this.task );
    } catch( NoReasonerException e ) {
      throw new HeraklesException( e.getMessage(), e );
    }
   
    Result result = null;
    Throwable[] exceptions = new Throwable[reasoners.length]// default init values: null

    // will be set to false, while any reasoner is still running
    // if no reasoner thread is available this is also a valid statement
    boolean allFinished = true;
View Full Code Here

    if( this.task == null )
      throw new HeraklesException( "No task to execute." );
   
    startReasonerThreads( reasoners, this.task );

    Result result = null;
   
    boolean allFinished;
    boolean anySucceeded = false;
    do {
      allFinished = true;
View Full Code Here

        logger.error("Error! The setQuery-Method should be invoked before the run-Method!");
        System.err
            .println("Error! The setQuery-Method should be invoked before the run-Method!");
      } else {
        try {
          Result result = this.reasoner.doOperation(query);
          Set<OWLNamedIndividual> resultSet = (Set<OWLNamedIndividual>) result.getResult();
          pool.writeData(reasoner.getReasonerProperties().getProperty("anytime_name"), resultSet);

        } catch (SecurityException e) {
          e.printStackTrace();
        } catch (IllegalArgumentException e) {
View Full Code Here

  @Override
  @Deprecated
  public Object execute( String taskName, Class<?>[] paramTypes, Object[] params )
      throws HeraklesException {

        Result result = null;
    Query query;
        try {
            query = QueryFactory.getQuery( taskName, paramTypes, params );
            this.execute( query, result );
        } catch( IllegalArgumentException e ) {
View Full Code Here

        logger.error("Error! The setQuery-Method should be invoked before the run-Method!");
        System.err
            .println("Error! The setQuery-Method should be invoked before the run-Method!");
      } else {
        try {
          Result result = this.reasoner.doOperation(query);
//          Set<OWLNamedIndividual> resultSet = (Set<OWLNamedIndividual>) result.getDeserialisedResult();
          Set<OWLNamedIndividual> resultSet = (Set<OWLNamedIndividual>) result.getResult();

          pool.writeData(reasoner.getReasonerProperties()
              .getProperty("name"), resultSet);

        } catch (SecurityException e) {
View Full Code Here

   * @see de.fzi.herakles.strategy.ExecutionStrategy#execute(de.fzi.herakles.util.cache.Query)
   */
  @Override
  public void execute( Query query, Result result ) throws HeraklesException {

    Result currentResult = (Result) execute( query.getTask(), query.getParamTypes(), query.getParams() );
//    result.setSerialisedResult(currentResult.getSerializedResult());
    result.setResult(currentResult.getResult());
  }
View Full Code Here

        logger.error("Error! The setQuery-Method should be invoked before the run-Method!");
        System.err
            .println("Error! The setQuery-Method should be invoked before the run-Method!");
      } else {
        try {
          Result result = this.reasoner.doOperation(query);
//          Set<OWLNamedIndividual> resultSet = (Set<OWLNamedIndividual>) result.getDeserialisedResult();
          Set<OWLNamedIndividual> resultSet = (Set<OWLNamedIndividual>) result.getResult();

          pool.writeData(reasoner.getReasonerProperties()
              .getProperty("name"), resultSet);

        } catch (SecurityException e) {
View Full Code Here

  @Override
  @Deprecated
  public Object execute( String taskName, Class<?>[] paramTypes, Object[] params )
      throws HeraklesException {

        Result result = null;
    Query query;
        try {
            query = QueryFactory.getQuery( taskName, paramTypes, params );
            this.execute( query, result );
        } catch( IllegalArgumentException e ) {
View Full Code Here

  @Override
  @Deprecated
  public Object execute( String taskName, Class<?>[] paramTypes,
      Object[] params ) throws HeraklesException {
   
        Result result = null;
    Query query;
        try {
            query = QueryFactory.getQuery( taskName, paramTypes, params );
            this.execute( query, result );
        } catch( IllegalArgumentException e ) {
View Full Code Here

TOP

Related Classes of de.fzi.herakles.commons.Result

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.