Package uk.org.ogsadai.activity.io

Examples of uk.org.ogsadai.activity.io.ListIterator


  mMetadataOutputBlockWriter = getOutput(METADATA);

   
    String filename=(String)iterationData[0];
   
    ListIterator parameters = (ListIterator)iterationData[1];
   
    parametersMap=extractParameters(parameters);
  
   
    outmap=(HashMap)((AbstractWaveformDecimation)this.userDefinedProcess).Decimate(filename, Integer.parseInt((String)parametersMap.get(FACTOR)), this.getActivityDescriptor().getInstanceName().getLocalPart()+count, "./","./");
View Full Code Here


    mOutputBlockWriter = getOutput(OUTPUT_DATA);
  mMetadataOutputBlockWriter = getOutput(METADATA);

  
    String filename=(String)iterationData[0];
    ListIterator parameters = (ListIterator)iterationData[1];
   
    //parametersMap=extractParameters(parameters);
   
  
   
View Full Code Here

      throws ActivityProcessingException, ActivityTerminatedException,
      ActivityUserException {
    try{
   
    
    ListIterator dataMetadata =  (ListIterator)iterationData[0];
    BlockWriter outputDataWriter = getOutput(DATA);
    BlockWriter outputMetadataWriter = getOutput(METADATA);
    String info;
   
     // extract activity parameters
     while( (info = (String)dataMetadata.nextValue()) != null)
       {
           outputMetadataWriter.write(info);
             info = (String)dataMetadata.nextValue();
         outputDataWriter.write(info);
        
 
       }
    
View Full Code Here

    mOutputBlockWriter = getOutput(OUTPUT_DATA);
  mMetadataOutputBlockWriter = getOutput(METADATA);

  
    String filename=(String)iterationData[0];
    ListIterator parameters = (ListIterator)iterationData[1];
   
    parametersMap=extractParameters(parameters);
   
  
   
View Full Code Here

       
        Map<Integer, List<Object>> nominalValues = new HashMap<Integer, List<Object>>();
        for (int i=4; i<iterationInputs.length; i++)
        {
         
            ListIterator iterator = (ListIterator)iterationInputs[i];
            List<Object> values = new ArrayList<Object>();
            Object value;
            while ((value = iterator.nextValue()) != null)
            {
                values.add(value);
            }
            nominalValues.put(indexes.get(i-4), values);
        }
View Full Code Here

        (ListIterator) iterationInputs[2], metadata,
        INPUT_COLUMN_INDICES);

    Map<Integer, List<Object>> nominalValues = new HashMap<Integer, List<Object>>();
    for (int i = 3; i < iterationInputs.length; i++) {
      ListIterator iterator = (ListIterator) iterationInputs[i];
      List<Object> values = new ArrayList<Object>();
      Object value;
      while ((value = iterator.nextValue()) != null) {
        values.add(value);
      }
      nominalValues.put(indexes.get(i - 3), values);
    }
    return nominalValues;
View Full Code Here

        List<Integer> indexes = TupleUtilities.getColumnIndexes(
                (ListIterator)iterationInputs[3], metadata, INPUT_COLUMN_INDICES);
        Map<Integer, List<Object>> nominalValues = new HashMap<Integer, List<Object>>();
        for (int i=4; i<iterationInputs.length; i++)
        {
            ListIterator iterator = (ListIterator)iterationInputs[i];
            List<Object> values = new ArrayList<Object>();
            Object value;
            while ((value = iterator.nextValue()) != null)
            {
                values.add(value);
            }
            nominalValues.put(indexes.get(i-4), values);
        }
View Full Code Here

       Map<Integer, List<Object>> nominalValues = new HashMap<Integer, List<Object>>();
       List<List<Object>> sequences = new ArrayList<List<Object>>();
         for (int i=5; i<iterationInputs.length; i++)
         {
           
              ListIterator iterator = (ListIterator)iterationInputs[i];
              List<Object> values = new ArrayList<Object>();
              Object value;
              while ((value = iterator.nextValue()) != null)
              {
                  values.add(value);
              }
              sequences.add(values);
         }         
View Full Code Here

       Map<Integer, List<Object>> nominalValues = new HashMap<Integer, List<Object>>();
       List<List<Object>> sequences = new ArrayList<List<Object>>();
         for (int i=4; i<iterationInputs.length; i++)
         {
           
              ListIterator iterator = (ListIterator)iterationInputs[i];
              List<Object> values = new ArrayList<Object>();
              Object value;
              while ((value = iterator.nextValue()) != null)
              {
                  values.add(value);
              }
              sequences.add(values);
         }         
View Full Code Here

    protected void processIteration(Object[] iterationData)
            throws ActivityProcessingException, ActivityTerminatedException,
            ActivityUserException
    {
        TupleListIterator tupleList = (TupleListIterator) iterationData[0];
        ListIterator columnList = (ListIterator) iterationData[1];
        ListIterator methodsList = (ListIterator) iterationData[2];
        ListIterator causeList = (ListIterator) iterationData[3];
        ListIterator parameterList = (ListIterator) iterationData[4];
        PMMLDocument pmml = (PMMLDocument) iterationData[5];

        Integer column;
        while ((column = (Integer) columnList.nextValue()) != null)
        {
            String method = (String) methodsList.nextValue();
            String cause = (String) causeList.nextValue();
            Object[] parameters = (Object[]) parameterList.nextValue();

            if (method == null || cause == null || parameters == null)
            {
                throw new ActivityUserException(
                        new UnmatchedInputException(
                                new String[] {
                                        INPUT_COLUMNS,
                                        INPUT_METHODS,
                                        INPUT_CAUSE,
                                        INPUT_PARAMETERS },
                                new Object[] {
                                        column, method, cause, parameters }));
            }

            DPPMethodForColumn methodForColumn = loadMethod(
                    column.intValue(),
                    method,
                    cause,
                    parameters,
                    pmml.getPMML());
            mColumnMethods.put(column, methodForColumn);
        }

        if (methodsList.nextValue() != null
                || causeList.nextValue() != null
                || parameterList.nextValue() != null)
        {
            throw new ActivityUserException(
                    new UnmatchedInputException(
                            new String[] {
                                    INPUT_COLUMNS,
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.activity.io.ListIterator

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.