@ThreadSafe public class TextEventDAO extends Object implements EventDAO, Describable
EventFormat
.Constructor and Description |
---|
TextEventDAO(File file,
EventFormat format) |
Modifier and Type | Method and Description |
---|---|
static TextEventDAO |
create(File inputFile,
EventFormat format) |
static TextEventDAO |
create(File inputFile,
EventFormat format,
CompressionMode comp) |
void |
describeTo(DescriptionWriter descr)
Write this class's description to a sink.
|
static TextEventDAO |
ratings(File file,
String delim)
Open a rating DAO with the default layout and automatic compression.
|
static TextEventDAO |
ratings(File file,
String delim,
CompressionMode mode)
Open a potentially-compressed file of ratings.
|
Cursor<Event> |
streamEvents()
Stream all events.
|
<E extends Event> |
streamEvents(Class<E> type)
Stream all events of a given type.
|
<E extends Event> |
streamEvents(Class<E> type,
SortOrder order)
Stream all events of a given type in a specified order.
|
@Inject public TextEventDAO(@EventFile File file, EventFormat format)
public static TextEventDAO ratings(File file, String delim)
file
- The file.delim
- The delimiter.file
using DelimitedColumnEventFormat
.ratings(File, String, org.grouplens.lenskit.util.io.CompressionMode)
public static TextEventDAO ratings(File file, String delim, CompressionMode mode)
file
- The file to open.delim
- The delimiter.mode
- The compression mode.public static TextEventDAO create(File inputFile, EventFormat format)
public static TextEventDAO create(File inputFile, EventFormat format, CompressionMode comp)
public Cursor<Event> streamEvents()
EventDAO
streamEvents
in interface EventDAO
public <E extends Event> Cursor<E> streamEvents(Class<E> type)
EventDAO
streamEvents
in interface EventDAO
type
- The event type.public <E extends Event> Cursor<E> streamEvents(Class<E> type, SortOrder order)
EventDAO
streamEvents
in interface EventDAO
type
- The event type.order
- The order.public void describeTo(DescriptionWriter descr)
Describable
describeTo
in interface Describable
descr
- The description writer to use.