Package uk.org.ogsadai.activity

Examples of uk.org.ogsadai.activity.ActivityTerminatedException


    } catch (PipeClosedException e) {
       iterativeStageComplete();
    } catch (PipeIOException e) {
      throw new ActivityPipeProcessingException(e);
    } catch (PipeTerminatedException e) {
      throw new ActivityTerminatedException();
   
   
  }
View Full Code Here


    {
        throw new ActivityPipeProcessingException(e);
    }
    catch (PipeTerminatedException e)
    {
        throw new ActivityTerminatedException();
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  finally
  {
View Full Code Here

      {
      throw new ActivityPipeProcessingException(e);
    }
    catch (PipeTerminatedException e)
      {
      throw new ActivityTerminatedException();
      }
    catch (PipeClosedException e)
    {
        // Consumer does not want any more data, just stop.
    }
View Full Code Here

        {
            throw new ActivityPipeProcessingException(e);
        }
        catch (PipeTerminatedException e)
        {
            throw new ActivityTerminatedException();
        }
  
  }
View Full Code Here

    try{
      mOutput.write(selectedFeature);
    }
    catch (PipeTerminatedException e)
      {
      throw new ActivityTerminatedException();
      }
    catch (PipeClosedException e)
    {
        // Consumer does not want any more data, just stop.
    }
View Full Code Here

        {
            throw new ActivityPipeProcessingException(e);
        }
        catch (PipeTerminatedException e)
        {
            throw new ActivityTerminatedException();
        }
   
  }
View Full Code Here

       {
           throw new ActivityProcessingException(e);
       }
       catch (PipeTerminatedException e)
       {
           throw new ActivityTerminatedException();
       }
       catch (PipeClosedException e)
       {
           mIsProcessing = false;
       }
View Full Code Here

        {
          throw new ActivityProcessingException(e);
        }
        catch (PipeTerminatedException e)
        {
          throw new ActivityTerminatedException();
        }
        metadataSent = true;
      }
    }

    // retrieve the classifier
    block = inputs[1].read();
    if (block != ControlBlock.NO_MORE_DATA)
    {
      classifier = (Classifier)block;
      featuresMatrix = classifier.getFeaturesMatrix();
      classType = classifier.getClassType();

      LOG.debug("featuresMatrix size: " + featuresMatrix.length + " ; [0] " + featuresMatrix[0]);
      LOG.debug("classType size: " + classType.length + " ; [0] " + classType[0]);
    }

    block = inputs[0].read();
    if (block != ControlBlock.NO_MORE_DATA)
    {
      if(block instanceof Tuple){

        Tuple tuple = (Tuple) block;
       
        // read the feature
        double[] data = (double[]) tuple.getObject(0);

        LOG.debug("features to be classified: size " + data.length + " ; [0] " + data[0]);
        classification = KNNclassify(data,featuresMatrix,classType,NumberOfNeighbour);

        LOG.debug("classification: " + classification);
          List elements = new ArrayList();
          elements.add(classification);
          Tuple tupleC = new SimpleTuple(elements);
        try{
          mOutput.write(tupleC);
        }
        catch (PipeTerminatedException e)
        {
          throw new ActivityTerminatedException();
        }
        catch (PipeClosedException e)
        {
          // Consumer does not want any more data, just stop.
        }
View Full Code Here

    {
      throw new ActivityProcessingException(e);
    }
    catch (PipeTerminatedException e)
    {
      throw new ActivityTerminatedException();
    }
  }
View Full Code Here

        iterativeStageComplete();
      }
    }
    catch (PipeTerminatedException e)
      {
      throw new ActivityTerminatedException();
      }
    catch (PipeClosedException e)
    {
        // Consumer does not want any more data, just stop.
    }
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.activity.ActivityTerminatedException

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.