Examples of DataReader


Examples of org.apache.ddlutils.io.DataReader

  protected Database insertData(Database model, String dataXml)
      throws DatabaseOperationException
  {
    try
    {
      DataReader dataReader = new DataReader();

      dataReader.setModel(model);
      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
View Full Code Here

Examples of org.apache.ddlutils.io.DataReader

  protected Database insertData(String dataXml)
      throws DatabaseOperationException
  {
    try
    {
      DataReader dataReader = new DataReader();

      dataReader.setModel(model);
      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
View Full Code Here

Examples of org.apache.ddlutils.io.DataReader

        platform.setPassword( passwd );
        platform.createTables( dbModel, true, true );
       
        // Insert the seed data to database
        DataToDatabaseSink sink = new DataToDatabaseSink( platform, dbModel );
        DataReader reader = new DataReader();
        reader.setModel( dbModel );
        reader.setSink( sink );
       

        InputStream seedDataStream = this.getClass().getClassLoader().getResourceAsStream( "photovault_seed_data.xml" );
        try {
            reader.parse( seedDataStream );
        } catch (SAXException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
       
        if ( seedDataResource != null ) {
            seedDataStream = this.getClass().getClassLoader().getResourceAsStream( seedDataResource );
            try {
                reader.parse( seedDataStream );
            } catch (SAXException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
View Full Code Here

Examples of org.apache.sanselan.formats.psd.datareaders.DataReader

            // break;
        default:
            throw new ImageReadException("Unknown Mode: "
                    + imageContents.header.Mode);
        }
        DataReader fDataReader;
        switch (imageContents.Compression)
        {
        case 0:
            fDataReader = new UncompressedDataReader(dataParser);
            break;
        case 1:
            fDataReader = new CompressedDataReader(dataParser);
            break;
        default:
            throw new ImageReadException("Unknown Compression: "
                    + imageContents.Compression);
        }
        {
            InputStream is = null;

            try
            {
                is = getInputStream(byteSource, PSD_SECTION_IMAGE_DATA);
                fDataReader.readData(is, result, imageContents, this);

                fDataReader.dump();
                // is.
                // ImageContents imageContents = readImageContents(is);
                // return imageContents;
            } finally
            {
View Full Code Here

Examples of org.apache.sanselan.formats.psd.datareaders.DataReader

      // break;
    default:
      throw new ImageReadException("Unknown Mode: "
          + imageContents.header.Mode);
    }
    DataReader fDataReader;
    switch (imageContents.Compression) {
    case 0:
      fDataReader = new UncompressedDataReader(dataParser);
      break;
    case 1:
      fDataReader = new CompressedDataReader(dataParser);
      break;
    default:
      throw new ImageReadException("Unknown Compression: "
          + imageContents.Compression);
    }
    {
      InputStream is = null;

      try {
        is = getInputStream(byteSource, PSD_SECTION_IMAGE_DATA);
        fDataReader.readData(is, result, imageContents, this);

        fDataReader.dump();
        // is.
        // ImageContents imageContents = readImageContents(is);
        // return imageContents;
      } finally {
        try {
View Full Code Here

Examples of org.apache.sanselan.formats.psd.datareaders.DataReader

      // break;
    default:
      throw new ImageReadException("Unknown Mode: "
          + imageContents.header.Mode);
    }
    DataReader fDataReader;
    switch (imageContents.Compression)
    {
    case 0:
      fDataReader = new UncompressedDataReader(dataParser);
      break;
    case 1:
      fDataReader = new CompressedDataReader(dataParser);
      break;
    default:
      throw new ImageReadException("Unknown Compression: "
          + imageContents.Compression);
    }
    {
      InputStream is = null;

      try
      {
        is = getInputStream(byteSource, PSD_SECTION_IMAGE_DATA);
        fDataReader.readData(is, result, imageContents, this);

        fDataReader.dump();
        // is.
        // ImageContents imageContents = readImageContents(is);
        // return imageContents;
      } finally
      {
View Full Code Here

Examples of org.apache.sanselan.formats.tiff.datareaders.DataReader

                directory, photometricInterpretation, bitsPerPixel,
                bitsPerSample, predictor, samplesPerPixel, width, height);

        TiffImageData imageData = directory.getTiffImageData();

        DataReader dataReader = imageData.getDataReader(entries,
                photometricInterpreter, bitsPerPixel, bitsPerSample, predictor,
                samplesPerPixel, width, height, compression);

        dataReader.readImageData(result);

        photometricInterpreter.dumpstats();

        return result;
    }
View Full Code Here

Examples of org.apache.sanselan.formats.tiff.datareaders.DataReader

        directory, photometricInterpretation, bitsPerPixel,
        bitsPerSample, predictor, samplesPerPixel, width, height);

    TiffImageData imageData = directory.getTiffImageData();

    DataReader dataReader = imageData.getDataReader(entries,
        photometricInterpreter, bitsPerPixel, bitsPerSample, predictor,
        samplesPerPixel, width, height, compression);

    dataReader.readImageData(result);

    photometricInterpreter.dumpstats();

    return result;
  }
View Full Code Here

Examples of org.apache.sanselan.formats.tiff.datareaders.DataReader

        directory, photometricInterpretation, bitsPerPixel,
        bitsPerSample, predictor, samplesPerPixel, width, height);

    TiffImageData imageData = directory.getTiffImageData();

    DataReader dataReader = imageData.getDataReader(entries,
        photometricInterpreter, bitsPerPixel, bitsPerSample, predictor,
        samplesPerPixel, width, height, compression);

    dataReader.readImageData(result);

    photometricInterpreter.dumpstats();

    return result;
  }
View Full Code Here

Examples of org.apache.sqoop.etl.io.DataReader

    @Override
    public void run() {
      LOG.info("SqoopOutputFormatLoadExecutor consumer thread is starting");
      try {
        DataReader reader = new OutputFormatDataReader();

        Configuration conf = null;
        if (!isTest) {
          conf = context.getConfiguration();
          loaderName = conf.get(JobConstants.JOB_ETL_LOADER);
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.