All Downloads are FREE. Search and download functionalities are using the official Maven repository.

timeBench.data.io.AbstractTemporalDatasetWriter Maven / Gradle / Ivy

Go to download

TimeBench, a flexible, easy-to-use, and reusable software library written in Java that provides foundational data structures and algorithms for time- oriented data in Visual Analytics.

The newest version!
package timeBench.data.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import prefuse.data.io.DataIOException;
import timeBench.data.TemporalDataset;

/**
 * Abstract base class implementation of the TemporalDatasetWriter interface.
 * Provides implementations for all but the
 * {@link timeBench.data.io.TemporalDatasetWriter#writeData(TemporalDataset,OutputStream)}
 * method.
 * 
 * Based on {@link prefuse.data.io.AbstractGraphWriter}.
 * 
 * @author Alexander Rind
 */
public abstract class AbstractTemporalDatasetWriter implements
        TemporalDatasetWriter {

    @Override
    public void writeData(TemporalDataset tmpds, String filename)
            throws DataIOException {
        writeData(tmpds, new File(filename));
    }

    @Override
    public void writeData(TemporalDataset tmpds, File f) throws DataIOException {
        try {
            writeData(tmpds, new FileOutputStream(f));
        } catch (FileNotFoundException e) {
            throw new DataIOException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy