org.mymedialite.io
Class TimedRatingData

java.lang.Object
  extended by org.mymedialite.io.TimedRatingData

public class TimedRatingData
extends java.lang.Object

Class that offers methods for reading in rating data with time information.


Method Summary
static ITimedRatings read(java.io.BufferedReader reader, IEntityMapping user_mapping, IEntityMapping item_mapping, boolean ignore_first_line)
          Read in rating data from a TextReader.
static ITimedRatings read(java.lang.String filename, IEntityMapping user_mapping, IEntityMapping item_mapping, boolean ignore_first_line)
          Read in rating data from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static ITimedRatings read(java.lang.String filename,
                                 IEntityMapping user_mapping,
                                 IEntityMapping item_mapping,
                                 boolean ignore_first_line)
                          throws java.lang.Exception
Read in rating data from a file.

Parameters:
filename - the name of the file to read from
user_mapping - mapping object for user IDs
item_mapping - mapping object for item IDs
ignore_first_line - if true, ignore the first line
Returns:
the rating data
Throws:
java.io.FileNotFoundException
java.lang.Exception

read

public static ITimedRatings read(java.io.BufferedReader reader,
                                 IEntityMapping user_mapping,
                                 IEntityMapping item_mapping,
                                 boolean ignore_first_line)
                          throws java.lang.Exception
Read in rating data from a TextReader.

Parameters:
reader - the to read from
user_mapping - mapping object for user IDs
item_mapping - mapping object for item IDs
ignore_first_line - if true, ignore the first line
Returns:
the rating data
Throws:
java.text.ParseException
java.lang.Exception