CFEngine API

org.recommender.util
Class ItemDatabaseCreator

java.lang.Object
  |
  +--org.recommender.util.ItemDatabaseCreator

public class ItemDatabaseCreator
extends java.lang.Object

Describes a tool to read the Item data file in the dataset and poplulate a database (MySQL). Contains methods for parsing the Item data. This can either be run as a standalone tool or used as a class from another class. To use as standalone tool: make_user_db "itemDataFile" "itemDBName" To use from another class: call static method createItemDBFromFile with itemDBName and itemDataFile as args.

Since:
JDK 1.2
Version:
Version 1.0.0, 05-13-2001
Author:
Sameer Kadam Irwin Yoon

Field Summary
(package private) static int MAX_TOKENS
           
 
Constructor Summary
ItemDatabaseCreator()
           
 
Method Summary
static void createItemDBFromFile(java.lang.String itemDataFile, java.lang.String itemDBName)
          Create Movie database from file.
static void main(java.lang.String[] args)
          Main method, command line "Usage: make_item_db " + "itemDataFile [itemDBName]");
static void parseString(java.lang.String str, java.lang.String table)
          Given an entry for an item, parse it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_TOKENS

static final int MAX_TOKENS
See Also:
Constant Field Values
Constructor Detail

ItemDatabaseCreator

public ItemDatabaseCreator()
Method Detail

createItemDBFromFile

public static void createItemDBFromFile(java.lang.String itemDataFile,
                                        java.lang.String itemDBName)
Create Movie database from file. First create a database using JDBC, then file the database with data from movieDataFile.

Parameters:
itemDataFile -
itemDBName -

parseString

public static void parseString(java.lang.String str,
                               java.lang.String table)
                        throws java.sql.SQLException
Given an entry for an item, parse it. Here is an example entry:
      
 

java.sql.SQLException

main

public static void main(java.lang.String[] args)
Main method, command line "Usage: make_item_db " + "itemDataFile [itemDBName]");


CFEngine API

Copyright © 2003 - Oregon State University www.orst.edu