Examples of DataReader


Examples of com.xmlcalabash.io.DataStore.DataReader

        } else {
            properties = new Properties();
            try {
                String base = pURI.toASCIIString();
                DataStore store = runtime.getDataStore();
                store.readEntry(pFn, base, ACCEPT_TEXT, null, new DataReader() {
                    public void load(URI id, String media, InputStream stream,
                            long len) throws IOException {
                        properties.load(stream);
                    }
                });
View Full Code Here

Examples of com.xmlcalabash.io.DataStore.DataReader

    }

    private void doFile(String href, String base) {
        try {
            DataStore store = runtime.getDataStore();
            store.readEntry(href, base, "application/xml, text/xml, */*", overrideContentType, new DataReader() {
                public void load(URI id, String contentType, InputStream bodyStream, long len)
                        throws IOException {
                    // FIXME: Is ISO-8859-1 the right default?
                    String charset = HttpUtils.getCharset(contentType, "ISO-8859-1");

View Full Code Here

Examples of de.mpi.rgblab.data.DataReader

      throws IOException {
    // read the inputfile
    Vector<Vector<Double>> inputData = new Vector<Vector<Double>>();
    Vector<Integer> class_label = new Vector<Integer>();

    DataReader fileReader = new DataReader(inputFile);

    fileReader.get_data(inputData);
    fileReader.get_class_label(class_label);

    // transform into screen coordinates
    Dimension windowSize = Toolkit.getDefaultToolkit().getScreenSize();
    Vector<Vector<Integer>> scaled_pixelsMatrix = new Vector<Vector<Integer>>();
    ImageResizer.scale_data_2_screen_res(inputData, scaled_pixelsMatrix,
View Full Code Here

Examples of de.mpi.rgblab.data.DataReader

    // read the input files
    Comparator comp = new DataComparator();
    Vector<Vector<Double>> inputData = new Vector<Vector<Double>>();
    Vector<Integer> class_label = new Vector<Integer>();

    DataReader fileReader = new DataReader(inputFile);
    // "usa_houshold_and_income_distribution.dat");

    fileReader.get_data(inputData);
    fileReader.get_class_label(class_label);
    for (int i = 0; i < inputData.size(); i++) {
      Vector<Double> tmp = inputData.get(i);
      tmp.add((Double) class_label.get(i).doubleValue());
      inputData.set(i, tmp);
    }
View Full Code Here

Examples of de.mpi.rgblab.data.DataReader

    Vector<Vector<Double>> inputData = new Vector<Vector<Double>>();
    Vector<Integer> class_label = new Vector<Integer>();
    Vector<ColorModel> rgbColors = new Vector<ColorModel>();

    // read the input data
    DataReader fileReader = new DataReader(inputFile);
    fileReader.get_data(inputData);
    fileReader.get_class_label(class_label);

    rgbColors = ColorReader.getColorsAsColorModel(colorsFile);

    // copy the the vector to an array
    ColorModel[] my_rgbColor = new ColorModel[rgbColors.size()];
View Full Code Here

Examples of de.mpi.rgblab.data.DataReader

    Vector<Vector<Double>> inputData = new Vector<Vector<Double>>();
    Vector<Integer> class_label = new Vector<Integer>();
    Vector<ColorModel> rgbColors = new Vector<ColorModel>();

    // read the input data
    DataReader fileReader = new DataReader(inputFile);
    fileReader.get_data(inputData);
    fileReader.get_class_label(class_label);

    rgbColors = ColorReader.getColorsAsColorModel(colorsFile);

    // copy the the vector to an array
    ColorModel[] my_rgbColor = new ColorModel[rgbColors.size()];
View Full Code Here

Examples of de.mpi.rgblab.data.DataReader

    //
    Vector<ColorModel> rgbColors = new Vector<ColorModel>();
    //
    // init the map
    // Add the map component
    DataReader fileReader = new DataReader(inputFile);

    fileReader.get_data(inputData);
    fileReader.get_class_label(class_label);
    //
    rgbColors = ColorReader.getColorsAsColorModel(colorsFile);
    //
    // ColorModel[] my_rgbColor = new ColorModel[rgbColors.size()];
    // for (int i = 0; i < rgbColors.size(); i++) {
View Full Code Here

Examples of krati.io.DataReader

    if (!_file.exists() || _file.length() == 0) {
      return;
    }
   
    Chronos c = new Chronos();
    DataReader r = IOFactory.createDataReader(_file, _type);
   
    try {
      r.open();
      r.position(DATA_START_POSITION);
     
      for (int i = 0; i < _arrayLength; i++) {
        intArray.set(i, r.readInt());
      }
     
      _log.info(_file.getName() + " loaded in " + c.getElapsedTime());
    } finally {
      r.close();
    }
  }
View Full Code Here

Examples of net.sf.uadetector.datareader.DataReader

    Check.notNull(charset, "charset");
    Check.notNull(dataUrl, "dataUrl");
    Check.notNull(fallback, "fallback");
    Check.notNull(versionUrl, "versionUrl");

    final DataReader reader = new XmlDataReader();
    final DataStore fallbackDataStore = readCacheFileAsFallback(reader, cacheFile, charset, fallback);
    return new CachingXmlDataStore(reader, dataUrl, versionUrl, charset, cacheFile, fallbackDataStore);
  }
View Full Code Here

Examples of net.sourceforge.marathon.util.DataReader

    }

    public DataReader getDataReader(String fileName) throws IOException {
        if(failMessage != null)
            failX(failMessage);
        return new DataReader(fileName, JavaRuntime.getInstance().getScript());
    }
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.