Examples of BasicData


Examples of org.cishell.framework.data.BasicData

                        if (raw != null) {
                            FileOutputStream out = new FileOutputStream(file);
                            out.write(raw);
                            out.close();
                           
                            Data dm = new BasicData(new Hashtable(),
                                    file, inFormat);
                            try {
                dm = convert[0].convert(dm);
              } catch (ConversionException e) {
                dm = null;
              }
                           
                            if (dm != null) {
                                data = dm.getData();
                            }
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
View Full Code Here

Examples of org.cishell.framework.data.BasicData

    public String formSQL() throws SQLFormationException {
      return "";
    }
   
    public Data createOutDataFromDataSource(DataSource dataSource) {
      return new BasicData(dataSource, dataSource.getClass().getName());
    }
View Full Code Here

Examples of org.cishell.framework.data.BasicData

        String key = keys.nextElement();
        labeledDatumMetadata.put(key, originalDatumMetadata.get(key));
      }

      Data labeledDatum =
        new BasicData(labeledDatumMetadata, datum.getData(), datum.getFormat());
      labeledDatumMetadata.put(DataProperty.LABEL, prefix + absoluteFile.getName());
      newData.add(labeledDatum);
    }

    return newData.toArray(new Data[0]);
View Full Code Here

Examples of org.cishell.framework.data.BasicData

        }

        public Data[] execute() {
            Integer i = new Integer(dm[0].getData().toString());          
           
            Data[] dm1 = new Data[]{ new BasicData(i, Integer.class.getName()) };
            dm1[0].getMetadata().put(DataProperty.LABEL, "My Integer: " + i);
            //dm1[0].getProperties().put(DataProperty.PARENT, dm[0]);
           
            return dm1;
        }
View Full Code Here

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

Examples of org.cishell.framework.data.BasicData

                    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

Examples of org.cishell.framework.data.BasicData

                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

Examples of org.cishell.framework.data.BasicData

    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

Examples of org.cishell.framework.data.BasicData

                    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
Copyright © 2018 www.massapi.com. 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.