Package org.cishell.framework.data

Examples of org.cishell.framework.data.BasicData


    Data Data = (Data) fileData[0];
    String format = Data.getFormat();
    File actualFile = (File) Data.getData();
    try {
      String filePath = actualFile.getCanonicalPath();
      Data result = new BasicData(filePath, format);
      return new Data[] { result };
    } catch (IOException e) {
      this.logger.log(LogService.LOG_ERROR, "Could not get file path " +
          "from file " + actualFile, e);
      return null;
View Full Code Here


                FileWriter fw = new FileWriter(file);
               
                fw.write(i.toString());
                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

   
    putIfValueNotNull(metadata, DataProperty.TYPE, type);
    putIfValueNotNull(metadata, DataProperty.PARENT, parent);
    putIfValueNotNull(metadata, DataProperty.LABEL, label);
   
    return new BasicData(metadata, object, format);
  }
View Full Code Here

        }
       
        Dictionary dict = new Hashtable();
        dict.put(DataProperty.LABEL, "Weee!!!");
       
        return new Data[] {new BasicData(dict, "Weee!!!", String.class.getName())};
    }
View Full Code Here

       
        if (properties == null) {
            properties = new Hashtable();
        }
       
        Data dm = new BasicData(properties, dataFile, format);
       
        return registerDataModel(dm);
    }
View Full Code Here

            }
              
            String outFormat =
              (String) getProperties().get(AlgorithmProperty.OUT_DATA);
           
            return new BasicData(newProperties, result, outFormat);
        } else {
            return null;
        }
    }
View Full Code Here

                        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

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

        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

        }

        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

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.