Package org.cishell.framework.algorithm

Examples of org.cishell.framework.algorithm.AlgorithmExecutionException


  throws AlgorithmExecutionException {
    try {
      return connection.createStatement(
        resultSetType, resultSetConcurrency, resultSetHoldability);
    } catch (SQLException e) {
      throw new AlgorithmExecutionException(messageIfError, e);
    }
  }
View Full Code Here


                Data dm = new BasicData(file, "file:text/plain");
                dm.getMetadata().put(DataProperty.LABEL, "File of "+label);
               
                return new Data[]{dm};
            } catch (IOException e) {
                throw new AlgorithmExecutionException(e);
            }
        }
View Full Code Here

      }
      monitor.worked(i);
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        throw new AlgorithmExecutionException(e);
      }
    }
   
    monitor.done();
      return null;
View Full Code Here

                       
                    this.logger.log(LogService.LOG_WARNING, warningMessage, e);
                       
                        return convertedData;
                      } else {                     
                         throw new AlgorithmExecutionException(
                           createErrorMessage(serviceReferences.get(ii), e), e);
                      }
                    }
                } else {
                    throw new AlgorithmExecutionException(
                        "Missing subconverter: "
                            + serviceReferences.get(ii).getProperty(Constants.SERVICE_PID));
                }
            }
           
View Full Code Here

      try {
        dataSourceConnection = dataSource.getConnection();
        sqlStatement = dataSourceConnection.createStatement();
      }
      catch (SQLException e) {
        throw new AlgorithmExecutionException(e);
      }
     
      String sqlStatementString = null;
     
      // Attempt to form our SQL query and update.
      try {
        sqlStatementString = formSQL();
      }
      catch (SQLFormationException sqlFormationException) {
        throw new AlgorithmExecutionException(sqlFormationException);
      }
     
      // Success at this point (with forming the SQL), so execute it if it is not
      // empty.
      if (!sqlStatement.equals("")) {
        try {
          // If execute returns true, there is at least one result set.  So,
          // let's get those and turn them into data sources for our out-data
          // YAY!
          if (sqlStatement.execute(sqlStatementString)) {
            // Used to store the list of
            // result-sets-converted-to-new-databases that we're working on.
            ArrayList resultSetsConvertedToNewDatabases = new ArrayList();
           
            do {
              // Get the current result set.
              ResultSet resultSet = sqlStatement.getResultSet();
             
              // Construct the new database out of the result set.
             
              DataSource newDatabase = null;
             
              /* try {
                newDatabase = null;
                  // this.databaseService.createDatabase(resultSet);
              }
              catch (DatabaseCreationException e) {
                throw new AlgorithmExecutionException(e);
              } */
             
              // Wrap the new database.
              Data newDatabaseData = createOutDataFromDataSource(newDatabase);
             
              // Add the new out-data entry to our working list.
              resultSetsConvertedToNewDatabases.add(newDatabaseData);
            }
            while (sqlStatement.getMoreResults());
           
            // Convert the ArrayList to a Data[].
            Data[] finalResultSetsConvertedToNewDatabasesData =
              new Data[resultSetsConvertedToNewDatabases.size()];
             
            finalResultSetsConvertedToNewDatabasesData =
              (Data[])resultSetsConvertedToNewDatabases.toArray
                (finalResultSetsConvertedToNewDatabasesData);
             
            return manipulateFinalOutData
              (finalResultSetsConvertedToNewDatabasesData);
          }
        }
        catch (SQLException sqlException) {
          throw new AlgorithmExecutionException(sqlException);
        }
      }
     
      //
      return null;
View Full Code Here

                    Data dm = new BasicData(outString, String.class.getName());
                    dm.getMetadata().put(DataProperty.LABEL, "String for "+label);
                   
                    return new Data[]{dm};
                } else {
                  throw new AlgorithmExecutionException("File does not exist!");
                }
            } catch (IOException e) {
                throw new AlgorithmExecutionException(e);
            }
        }
View Full Code Here

                Data dm = new BasicData(file, "file:text/plain");
                dm.getMetadata().put(DataProperty.LABEL, "File of "+label);
               
                return new Data[]{dm};
            } catch (IOException e) {
                throw new AlgorithmExecutionException(e);
            }
        }
View Full Code Here

                    Data dm = new BasicData(new Integer(outString.trim()), Integer.class.getName());
                    dm.getMetadata().put(DataProperty.LABEL, "Integer for "+label);
                   
                    return new Data[]{dm};
                } else {
                  throw new AlgorithmExecutionException("File does not exist!");
                }
            } catch (IOException e) {
                throw new AlgorithmExecutionException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.cishell.framework.algorithm.AlgorithmExecutionException

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.