Package org.cishell.framework.data

Examples of org.cishell.framework.data.BasicData


        }

        public Data[] execute() {
            String i = (String) parameters.get("org.cishell.tests.conversion1.AlgA.myInput");
           
            Data[] dm = new Data[]{ new BasicData(i, String.class.getName()) };
            dm[0].getMetadata().put(DataProperty.LABEL, "My String: " + i);
           
            return dm;
        }
View Full Code Here


                    while (string != null) {
                        outString += string;
                        string = reader.readLine();
                    }
                   
                    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!");
                }
View Full Code Here

                FileWriter fw = new FileWriter(file);
               
                fw.write(string);
                fw.close();
               
                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[][] results = new Data[testFilePaths.length][1];
    for (int ii = 0; ii < testFilePaths.length; ii++) {
      String filePath = testFilePaths[ii];
     
      results[ii] =
        new Data[] {new BasicData(new File(filePath), format)};
     
      Dictionary metadata = results[ii][0].getMetadata();
      metadata.put(DataProperty.LABEL, filePath);
    }
   
View Full Code Here

                    while (string != null) {
                        outString += string;
                        string = reader.readLine();
                    }
                   
                    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!");
                }
View Full Code Here

TOP

Related Classes of org.cishell.framework.data.BasicData

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.