CFEngine API

org.recommender.util
Class ItemTypeDatabaseCreator

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

public class ItemTypeDatabaseCreator
extends java.lang.Object

Describes a tool to read the Item-Type pair file in the dataset and poplulate a database (MySQL). Contains methods for parsing the data. This can either be run as a standalone tool or used as a class from another class. To use as standalone tool: make_itemtype_db "itemtypeFile" "itemtypeDBName" To use from another class: call static method createItemTypeDBFromFile with itemtypeDBName and itemtypeDataFile as args.

Since:
JDK 1.2
Version:
Version 1.0.0, 05-13-2001
Author:
Yun Wang

Field Summary
(package private) static int MAX_TOKENS
           
 
Constructor Summary
ItemTypeDatabaseCreator()
           
 
Method Summary
static void createItemTypeDBFromFile(java.lang.String itemtypeDataFile, java.lang.String itemtypeDBName)
          Create Rating database from file.
static void main(java.lang.String[] args)
          Main method, command line "Usage: make_itemtype_db " + "itemtypeDataFile [itemtypeDBName]");
static void parseString(java.lang.String str, java.lang.String table)
          Given an entry for a item-type pair, 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

ItemTypeDatabaseCreator

public ItemTypeDatabaseCreator()
Method Detail

createItemTypeDBFromFile

public static void createItemTypeDBFromFile(java.lang.String itemtypeDataFile,
                                            java.lang.String itemtypeDBName)
Create Rating database from file. First create a database using JDBC, then fill the database with data from itemtypeDataFile.

Parameters:
itemtypeDataFile -
itemtypeDBName -

parseString

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

java.sql.SQLException

main

public static void main(java.lang.String[] args)
Main method, command line "Usage: make_itemtype_db " + "itemtypeDataFile [itemtypeDBName]");


CFEngine API

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