Class DbaseAgent

java.lang.Object
  extended by se.gu.ling.trindikit.oaa.common.OAAAgent
      extended by DbaseAgent

public class DbaseAgent
extends se.gu.ling.trindikit.oaa.common.OAAAgent

A database agent, handling queries about songs. When the user has made a database file it can be modified externally. Open the file in a text editor and comment out lines by putting ** first on the line. This will make the application skip those lines if, for example, you know some lines are not correct.


Constructor Summary
DbaseAgent(java.lang.String[] args)
           
DbaseAgent(java.lang.String musicDir, java.lang.String fileName)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void makeDbase(java.lang.String musicDir, java.lang.String fileName)
          Given a directory and a file name, this method searches the directory recursively for music files.
 com.sri.oaa2.icl.IclList searchDbase(java.lang.String dbaseName, com.sri.oaa2.icl.IclStruct query)
          Searches the database and returns the answer/-s.
 
Methods inherited from class se.gu.ling.trindikit.oaa.common.OAAAgent
addSolver, addSolver, declareSolvables, disconnect, getAgentAddress, getState, handleEvent, register, setState, solve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbaseAgent

public DbaseAgent(java.lang.String[] args)

DbaseAgent

public DbaseAgent(java.lang.String musicDir,
                  java.lang.String fileName)
Method Detail

makeDbase

public void makeDbase(java.lang.String musicDir,
                      java.lang.String fileName)
Given a directory and a file name, this method searches the directory recursively for music files. Having found the music files it reads the meta information, printing it to the file to be used as a database.

Parameters:
musicDir - the directory to start search for music files
fileName - the file to be used as a database

searchDbase

public com.sri.oaa2.icl.IclList searchDbase(java.lang.String dbaseName,
                                            com.sri.oaa2.icl.IclStruct query)
Searches the database and returns the answer/-s.

Parameters:
dbaseName - what database to search
query - the search parameter so be unified
Returns:
the answer/-s as an IclList

main

public static void main(java.lang.String[] args)