GraphBuilder Interface Reference

This is the interface from which all AIML action operations will take place. More...

Inheritance diagram for GraphBuilder:

NetworkGraphBuilder

List of all members.

Public Member Functions

void AddCustomTagLibrary (string library)
 Adds a custom AIML tag library which should be a separate compiled .dll (Windows) or .so (Linux).
void AddDirectory (string directory, string userId, string botId, string endUserId)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectory (string directory)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryUnlessAlreadyAdded (string directory, string userId, string botId, string endUserId)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryUnlessAlreadyAdded (string directory)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryWithFilesEndingInRegularExpression (string directory, string regularExpression, string userId, string botId, string endUserId)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryWithFilesEndingInRegularExpression (string directory, string regularExpression)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded (string directory, string regularExpression, string userId, string botId, string endUserId)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded (string directory, string regularExpression)
 Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().
void AddFile (string file, string userId, string botId, string endUserId)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph().
void AddFile (string file)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph().
void AddFileUnlessAlreadyAdded (string file, string userId, string botId, string endUserId)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph() unless the file as already been added to the embedded database.
void AddFileUnlessAlreadyAdded (string file)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph() unless the file as already been added to the embedded database.
void AddString (string stringContainingAIML, string userId, string botId, string endUserId)
 Add a string containing AIML to the internal queue for latter processing by GraphBuilder.createGraph().
void AddString (string stringContainingAIML)
 Add a string containing AIML to the internal queue for latter processing by GraphBuilder.createGraph().
string CallSystemCommand (string command)
 This method acts the same as calling the AIML XML tag "System" by sending the command to the operating system and returning the output of the command.
void CreateGraph (string userId, string botId, string endUserId)
 Creates the embedded database structures needed to be able to query AIML through GraphBuilder.getResponse().
void CreateGraph ()
 Creates the embedded database structures needed to be able to query AIML through GraphBuilder.getResponse().
string[] GetAIMLFileList (string userId, string botId, string endUserId)
 Returns an array of the currently loaded AIML files in the embedded database.
string[] GetAIMLFileList ()
 Returns an array of the currently loaded AIML files in the embedded database.
int GetAIMLFileListSize (string userId, string botId, string endUserId)
 Returns the number of the currently loaded AIML files in the embedded database.
int GetAIMLFileListSize ()
 Returns the number of the currently loaded AIML files in the embedded database.
string[] GetAIMLStringList (string userId, string botId, string endUserId)
 Returns an array of the currently loaded AIML strings in the embedded database.
string[] GetAIMLStringList ()
 Returns an array of the currently loaded AIML strings in the embedded database.
int GetAIMLStringListSize (string userId, string botId, string endUserId)
 Returns the number of the currently loaded AIML strings in the embedded database.
int GetAIMLStringListSize ()
 Returns the number of the currently loaded AIML strings in the embedded database.
string[] GetBotIds (string userId)
 Returns an array of all the bot id's of a particular user in the embedded database.
int GetBotIdsSize (string userId)
 Returns the number of bot id's for a particular user in the embedded database.
string GetBotPredicate (string name, string userId, string botId, string endUserId)
 Gets a bot predicate inside of the AIML embedded database in the same way that a AIML "Bot" tag does.
string GetBotPredicate (string name)
 Gets a bot predicate inside of the AIML embedded database in the same way that a AIML "Bot" tag does.
string[] GetBotPredicates (string userId, string botId, string endUserId)
 Returns an array of all the bot predicates in the embedded database.
string[] GetBotPredicates ()
 Returns an array of all the bot predicates in the embedded database.
int GetBotPredicatesSize (string userId, string botId, string endUserId)
 Returns the number of bot predicates in the embedded database.
int GetBotPredicatesSize ()
 Returns the number of bot predicates in the embedded database.
string[] GetEndUserIds (string userId, string botId)
 Returns an array of all the end user id's of a particular user and a particular bot of that user in the embedded database.
int GetEndUserIdsSize (string userId, string botId)
 Returns the number of end user id's of a particular user and a particular bot of that user in the embedded database.
string GetId ()
 Gets the id the same way the AIML tag "Id" does.
string GetPredicate (string name, string userId, string botId, string endUserId)
 Gets a predicate inside of the AIML embedded database in the same way that a AIML "Get" tag does.
string GetPredicate (string name)
 Gets a predicate inside of the AIML embedded database in the same way that a AIML "Get" tag does.
string[] GetPredicates (string userId, string botId, string endUserId)
 Returns an array of all the predicates in the embedded database.
string[] GetPredicates ()
 Returns an array of all the predicates in the embedded database.
int GetPredicatesSize (string userId, string botId, string endUserId)
 Returns the number of predicates in the embedded database.
int GetPredicatesSize ()
 Returns the number of predicates in the embedded database.
string GetPreviousBotResponse (int previousBotResponse, int sentence, string userId, string botId, string endUserId)
 Returns a previous RebeccaAIML response.
string GetPreviousBotResponse (int previousBotResponse, int sentence)
 Returns a previous RebeccaAIML response.
string GetPreviousUserInput (int previousUserInput, int sentence, string userId, string botId, string endUserId)
 Returns a previous RebeccaAIML user input.
string GetPreviousUserInput (int previousUserInput, int sentence)
 Returns a previous RebeccaAIML user input.
string GetResponse (string input, string userId, string botId, string endUserId)
 Queries the AIML internal embedded database structures with conversational input and returns the AIML response.
string GetResponse (string input)
 Queries the AIML internal embedded database structures with conversational input and returns the AIML response.
int GetSize (string userId, string botId, string endUserId)
 Returns the number of AIML categories loaded.
int GetSize ()
 Returns the number of AIML categories loaded.
string GetThat (string userId, string botId, string endUserId)
 This returns the current that.
string GetThat ()
 This returns the current that.
string GetTopic (string userId, string botId, string endUserId)
 This returns the current topic.
string GetTopic ()
 This returns the current topic.
string[] GetUserIds ()
 Returns an array of all the user id's in the embedded database.
int GetUserIdsSize ()
 Returns the number of user id's in the embedded database.
string GetVersion ()
 Returns the version of RebeccaAIML.
void ParsePropertiesFile (string fileName, string userId, string botId, string endUserId)
 Parses a properties file and calls GraphBuilder.setBotPredicate() for each property encountered.
void ParsePropertiesFile (string fileName)
 Parses a properties file and calls GraphBuilder.setBotPredicate() for each property encountered.
void ParseSentenceSplitterFile (string fileName)
 Parses a sentence splitter file and calls GraphBuilder.setSentenceSplitter() for sentence splitters during run time.
void ParseSubstitutionFile (string fileName)
 Parses a substitution file and calls setXXXXSubstitution methods for substitutions during runtime.
bool PredicateMatch (string predicateName, string aimlPattern, string userId, string botId, string endUserId)
 Checks if the predicateName matches the aimlPattern and returns true or false accordingly.
bool PredicateMatch (string predicateName, string aimlPattern)
 Checks if the predicateName matches the aimlPattern and returns true or false accordingly.
void PrintEntireDatabase ()
 Prints the entire contents of the embedded database as strings on standard out.
void RemoveBot (string userId, string botId)
 Removes a user's bot from the embedded database.
void RemoveBotPredicate (string name, string userId, string botId, string endUserId)
 Removes a bot predicate from the embedded database.
void RemoveBotPredicate (string name)
 Removes a bot predicate from the embedded database.
void RemoveCustomTagLibrary (string library)
 Removes a custom AIML tag library which should be a separate compiled .dll (Windows) or .so (Linux).
void RemoveDirectory (string directory, string userId, string botId, string endUserId)
 Add directory of AIML files to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveDirectory (string directory)
 Add directory of AIML files to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveEndUser (string userId, string botId, string endUserId)
 Removes an end user from the embedded database.
void RemoveFile (string file, string userId, string botId, string endUserId)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveFile (string file)
 Add one AIML file to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveGraph (string userId, string botId, string endUserId)
 Removes requested embedded database structures from the embedded database.
void RemoveGraph ()
 Removes requested embedded database structures from the embedded database.
void RemovePredicate (string name, string userId, string botId, string endUserId)
 Removes a predicate from the embedded database.
void RemovePredicate (string name)
 Removes a predicate from the embedded database.
void RemoveString (string stringContainingAIML, string userId, string botId, string endUserId)
 Add a string containing AIML to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveString (string stringContainingAIML)
 Add a string containing AIML to the internal queue for latter processing by GraphBuilder.removeGraph().
void RemoveUser (string userId)
 Removes a user from the embedded database.
void SetAddStringAIMLFooter (string aimlFooter)
 Sets the string that is automatically attached to the the end of the string sent to GraphBuilder.addString() to help form a correct XML document in memory.
void SetAddStringAIMLHeader (string aimlHeader)
 Sets the string that is automatically attached to the the beginning of the string sent to GraphBuilder.addString() to help form a correct XML document in memory.
void SetAIMLSchema (string schema)
 Sets the xsd schema for validating AIML XML files.
void SetAIMLValidation (bool trueOrFalse)
 Sets whether to use AIML validation from the xsd given at GraphBuilder.setAIMLSchema() or not.
void SetBotConfigurationSchema (string schema)
 Sets the bot configuration schema to be used with parsing a RebeccaAIML configuration file.
void SetBotConfigurationValidation (bool trueOrFalse)
 Sets XML Validation with the xml schema files from GraphBuilder.setBotConfigurationSchema() and GraphBuilder.setCommonTypesSchema().
void SetBotPredicate (string name, string value, string userId, string botId, string endUserId)
 Sets a bot predicate inside of the AIML embedded database.
void SetBotPredicate (string name, string value)
 Sets a bot predicate inside of the AIML embedded database.
void SetCallBacks (CallBacks callback)
 Sets the subclass of CallBacks to use for RebeccaAIML callbacks.
void SetCommonTypesSchema (string schema)
 Sets the common types schema for validating RebeccaAIML configuration files.
void SetGenderSubstitution (string find, string replace)
 Sets a gender substitution for AIML tag "Gender".
void SetInputSubstitution (string find, string replace)
 Sets a input substitution for the input that goes into GraphBuilder.getResponse().
void SetPerson2Substitution (string find, string replace)
 Sets a person2 substitution for AIML tag "Person2".
void SetPersonSubstitution (string find, string replace)
 Sets a person substitution for AIML tag "Person".
void SetPredicate (string name, string value, string userId, string botId, string endUserId)
 Sets a predicate inside of the AIML embedded database in the same way that a AIML "Set" tag does.
void SetPredicate (string name, string value)
 Sets a predicate inside of the AIML embedded database in the same way that a AIML "Set" tag does.
void SetSentenceSplitter (string splitter)
 Adds a sentence splitter to distinguish the end of a sentence.
void SetThat (string that, string userId, string botId, string endUserId)
 This allows you to hand set the current that.
void SetThat (string that)
 This allows you to hand set the current that.
void SetTopic (string topic, string userId, string botId, string endUserId)
 This allows you to hand set the current topic.
void SetTopic (string topic)
 This allows you to hand set current topic.
void SetUserIdBotIdEndUserId (string userId, string botId, string endUserId)
 Sets the user id, bot id, and end user id for all calls to methods that do not have user id, bot id, and bot id arguments.
void StoreGossip (string gossip)
 Stores gossip the same way the AIML tag "Gossip" does.
void SynchronizeDatabase ()
 Synchronizes the in memory data to the embedded database.


Detailed Description

This is the interface from which all AIML action operations will take place.

This class provides all the operations from loading the AIML tag data from files into the embedded database to querying the AIML data in the embedded database with user input to get back the response.

Use AimlFacade or NetworkAimlFacade to create the concrete representation of this interface and for getting a handle to this interface.

How to use this interface:

Instantiate a AimlFacade object or NetworkAimlFacade. Call AimlFacade.getGraphBuilder() or NetworkAimlFacade.getNetworkGraphBuilder() to get a reference to this interface.

Optionally, at this point you can create an instance of a CallBacks subclass and call GraphBuilder.setCallBacks() with the address of your subclass. GraphBuilder WILL NOT manage the memory of your CallBacks subclass. You are responsible for managing the memory of your subclass. You can omit this step if you do not wish to log the AIML gossip tags and if you do not want informative or error handling routines during the load and runtime of RebeccaAIML.

Setup any xsd's for validation of AIML tags through GraphBuilder.setAIMLSchema(). Activate validation by calling GraphBuilder.setAIMLValidation(). Optionally if you are sure that your AIML files are AIML XML compliant/correct you can omit this step. However, if you do omit this step and have illegal AIML tags in your files, then the illegal AIML XML tags will cause RebeccaAIML to abort through an exception or crash altogether. Or in C++ terms, the behavior of RebeccaAIML is undefined.

Setup any xsd's for validation of configuration files for Substitution, Sentence Splitters, and Bot properties. Those methods would be GraphBuilder.setCommonTypesSchema() and GraphBuilder.setBotConfigurationSchema(). The provided xsd's that should be used are bot-configuration.xsd and common-types.xsd. Activate both schema's through GraphBuilder.setBotConfigurationValidation().

Parse RebeccaAIML configuration files through the methods GraphBuilder.parseSubstitutionFile(), GraphBuilder.parsePropertiesFile(), and GraphBuilder.parseSentenceSplitterFile() with their respective XML files. Provided sample configuration files are bots.xml, properties.xml, sentence-splitters.xml, and substitutions.xml. Optionally, you can omit this step or augment it by directly calling GraphBuilder.setSentenceSplitter(), GraphBuilder.setPersonSubstitution(), GraphBuilder.setPerson2Substitution(), GraphBuilder.setGenderSubstitution(), GraphBuilder.setBotPredicate() with the appropriate values.

Call GraphBuilder.addFile() to add one file at a time or call GraphBuilder.addDirectory() to add an entire directory with AIML XML files. Optionally, you can call GraphBuilder.addFileUnlessAlreadyAdded() or GraphBuilder.addDirectoryUnlessAlreadyAdded(). This will only add the files or directories if they haven't already been added to the embedded database. This latter mechanism is preferred as it will cut down on unnesessarily embedded database bot brain. Call GraphBuilder.createGraph() to begin the parsing of the AIML files which creates the embedded database structure. Call GraphBuilder.getResponse() to query the AIML data structures with input to get RebeccaAIML's bot response back.

When your program exits, you will not have to re-add any of your files you previously have added as the embedded database has them stored. It is a good programming practice to use GraphBuilder.addFileUnlessAlreadyAdded() or GraphBuilder.addDirectoryUnlessAlreadyAdded() to avoid redundantly re-adding files and/or directories that have already been added. If you want to remove a file or directory you can use GraphBuilder.removeFile() or GraphBuilder.removeDirectory() to remove either a single file or an entire directory with AIML XML files. Call GraphBuilder.removeGraph() to begin the parsing of the AIML files to remove them from the embedded database.

RebeccaAIML supports multi-user, multi-bot, and multi-endUser. A user is a person or entity which creates 1 to many different bots. A bot is a collection of AIML files and bot predicates that have been added to the embedded database for querying by end users. A end user is someone who queries a user's bot for responses. A end user has regular predicates that define certain aspects such as their name. RebeccaAIML can have as many different users, bots, and end users as you would want. They all share the same embedded database for all their activities concurrently. You either set your user, bot, and end user id through GraphBuilder.setUserIdBotIdEndUserId() or directly call each method tacking on the user id, bot id, and end user id as arguments. Any time a method is called with a new user id, bot id, or end user id which didn't previously exist, RebeccaAIML will create the user, bot, and/or end user in the embedded database. You can use GraphBuilder.removeUser(), GraphBuilder.removeBot(), and GraphBuilder.removeEndUser() to remove any that you have added. If you do not set the user id, bot id, and end user id, RebeccaAIML will by default assign the string value of, "default" for all three.


Member Function Documentation

void AddCustomTagLibrary ( string  library  ) 

Adds a custom AIML tag library which should be a separate compiled .dll (Windows) or .so (Linux).

The .dll or .so that has the custom AIML tags must conform to the proper format. The proper format is that the .dll/.so should have a class that inherits from CustomTags in it. Also the two global C functions of CustomTags *rebeccaAIMLLoadCustomTags() and rebeccaAIMLRemoveCustomTags(CustomTagsImpl *customTags) must be present. rebeccaAIMLLoadCustomTags returns a new instance of the class that inherits from CustomTags and rebeccaAIMLRemoveCustomTags takes a CustomTags argument and deletes the object. If both of these C functions cannot be found, an exception will be thrown.

Parameters:
library The name of the library without the extension of .dll or .so on the end.
Exceptions:
Exception This will throw a FileNotFoundException if the .dll or .so does not exist on the file system and it will throw a generic Exception if it cannot load the .dll or .so

void AddDirectory ( string  directory,
string  userId,
string  botId,
string  endUserId 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the directory of AIML files regardless of whether or not they have already been added to the embedded database, consider using GraphBuilder.addDirectoryUnlessAlreadyAdded() instead. Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectory("/someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectory("../../someDir", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addDirectory("C:\\someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectory("C:/someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectory("..\\..\\someDir", "myUser", "myBot", "myEndUser");
       

Parameters:
directory The AIML directory to add to the internal queue.
userId The id of the user you want to add a directory to.
botId The id of the bot this directory of files belongs to.
endUserId The id of the end user that is adding this list of files from this directory.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectory ( string  directory  ) 

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the directory of AIML files regardless of whether or not they have already been added to the embedded database, consider using GraphBuilder.addDirectoryUnlessAlreadyAdded() instead. Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectory("/someDir");
       builder.addDirectory("../../someDir");
       

Some examples that only work under Windows.

       builder.addDirectory("C:\\someDir");
       builder.addDirectory("C:/someDir");
       builder.addDirectory("..\\..\\someDir");
       

Parameters:
directory The AIML directory to add to the internal queue.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryUnlessAlreadyAdded ( string  directory,
string  userId,
string  botId,
string  endUserId 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

This should be preferred over GraphBuilder.addDirectory() as it will prevent you from re-adding your directory of files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your directory of files will be added to the embedded database bot brain if it does not exist, but it will not be re-added those files after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryUnlessAlreadyAdded("/someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectoryUnlessAlreadyAdded("../../someDir", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addDirectoryUnlessAlreadyAdded("C:\\someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectoryUnlessAlreadyAdded("C:/someDir", "myUser", "myBot", "myEndUser");
       builder.addDirectoryUnlessAlreadyAdded("..\\..\\someDir", "myUser", "myBot", "myEndUser");
       

Parameters:
directory The AIML directory to add to the internal queue.
userId The id of the user you want to add a directory to.
botId The id of the bot this directory of files belongs to.
endUserId The id of the end user that is adding this list of files from this directory.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryUnlessAlreadyAdded ( string  directory  ) 

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

This should be preferred over GraphBuilder.addDirectory() as it will prevent you from re-adding your directory of files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your directory of files will be added to the embedded database bot brain if it does not exist, but it will not be re-added those files after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryUnlessAlreadyAdded("/someDir");
       builder.addDirectoryUnlessAlreadyAdded("../../someDir");
       

Some examples that only work under Windows.

       builder.addDirectoryUnlessAlreadyAdded("C:\\someDir");
       builder.addDirectoryUnlessAlreadyAdded("C:/someDir");
       builder.addDirectoryUnlessAlreadyAdded("..\\..\\someDir");
       

Parameters:
directory The AIML directory to add to the internal queue.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryWithFilesEndingInRegularExpression ( string  directory,
string  regularExpression,
string  userId,
string  botId,
string  endUserId 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the directory of AIML files regardless of whether or not they have already been added to the embedded database, consider using GraphBuilder.addDirectoryUnlessAlreadyAdded() instead. Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryWithFilesEndingInRegularExpression("/someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpression("../../someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addDirectoryWithFilesEndingInRegularExpression("C:\\someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpression("C:/someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpression("..\\..\\someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
directory The AIML directory to add to the internal queue.
userId The id of the user you want to add a directory to.
botId The id of the bot this directory of files belongs to.
endUserId The id of the end user that is adding this list of files from this directory.
regularExpression The regular expression which defines what a AIML file is within the directory. The default is all files which end in ".aiml".
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryWithFilesEndingInRegularExpression ( string  directory,
string  regularExpression 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the directory of AIML files regardless of whether or not they have already been added to the embedded database, consider using GraphBuilder.addDirectoryUnlessAlreadyAdded() instead. Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryWithFilesEndingInRegularExpression("/someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpression("../../someDir", ".*\\.aiml");
       

Some examples that only work under Windows.

       builder.addDirectoryWithFilesEndingInRegularExpression("C:\\someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpression("C:/someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpression("..\\..\\someDir", ".*\\.aiml");
       

Parameters:
directory The AIML directory to add to the internal queue.
regularExpression The regular expression which defines what a AIML file is within the directory. The default is all files which end in ".aiml".
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded ( string  directory,
string  regularExpression,
string  userId,
string  botId,
string  endUserId 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

This should be preferred over GraphBuilder.addDirectory() as it will prevent you from re-adding your directory of files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your directory of files will be added to the embedded database bot brain if it does not exist, but it will not be re-added those files after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("/someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("../../someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("C:\\someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("C:/someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("..\\..\\someDir", ".*\\.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
directory The AIML directory to add to the internal queue.
userId The id of the user you want to add a directory to.
botId The id of the bot this directory of files belongs to.
endUserId The id of the end user that is adding this list of files from this directory.
regularExpression The regular expression which defines what a AIML file is within the directory. The default is all files which end in ".aiml".
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded ( string  directory,
string  regularExpression 
)

Add entire directory of AIML files to the internal queue for latter processing by GraphBuilder.createGraph().

This should be preferred over GraphBuilder.addDirectory() as it will prevent you from re-adding your directory of files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your directory of files will be added to the embedded database bot brain if it does not exist, but it will not be re-added those files after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to only use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("/someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("../../someDir", ".*\\.aiml");
       

Some examples that only work under Windows.

       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("C:\\someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("C:/someDir", ".*\\.aiml");
       builder.addDirectoryWithFilesEndingInRegularExpressionUnlessAlreadyAdded("..\\..\\someDir", ".*\\.aiml");
       

Parameters:
directory The AIML directory to add to the internal queue.
regularExpression The regular expression which defines what a AIML file is within the directory. The default is all files which end in ".aiml".
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception

void AddFile ( string  file,
string  userId,
string  botId,
string  endUserId 
)

Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the file regardless of whether or not it has already been added to the embedded database, consider using GraphBuilder.addFileUnlessAlreadyAdded() instead. Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addFile("/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFile("../../someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addFile("C:\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFile("C:/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFile("..\\..\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
file The AIML file to add to the internal queue.
userId The id of the user you want to add a file to.
botId The id of the bot this file belongs to.
endUserId The id of the end user that is adding this file.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void AddFile ( string  file  ) 

Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph().

Since this will add the file regardless of whether or not it has already been added to the embedded database, consider using GraphBuilder.addFileUnlessAlreadyAdded() instead.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addFile("/someDir/someFile.aiml");
       builder.addFile("../../someDir/someFile.aiml");
       

Some examples that only work under Windows.

       builder.addFile("C:\\someDir\\someFile.aiml");
       builder.addFile("C:/someDir/someFile.aiml");
       builder.addFile("..\\..\\someDir\\someFile.aiml");
       

Parameters:
file The AIML file to add to the internal queue.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void AddFileUnlessAlreadyAdded ( string  file,
string  userId,
string  botId,
string  endUserId 
)

Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph() unless the file as already been added to the embedded database.

This should be preferred over GraphBuilder.addFile() as it will prevent you from re-adding your files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your file will be added to the embedded database bot brain if it does not exist, but it will not be re-added after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addFileUnlessAlreadyAdded("/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFileUnlessAlreadyAdded("../../someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.addFileUnlessAlreadyAdded("C:\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFileUnlessAlreadyAdded("C:/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.addFileUnlessAlreadyAdded("..\\..\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
file The AIML file to add to the internal queue.
userId The id of the user you want to add a file to.
botId The id of the bot this file belongs to.
endUserId The id of the end user that is adding this file.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void AddFileUnlessAlreadyAdded ( string  file  ) 

Add one AIML file to the internal queue for latter processing by GraphBuilder.createGraph() unless the file as already been added to the embedded database.

This should be preferred over GraphBuilder.addFile() as it will prevent you from re-adding your files needlessly to the embedded database bot brain multiple times. This is also a convenient method to use at the initialization of your program as it will guarantee that your file will be added to the embedded database bot brain if it does not exist, but it will not be re-added after your program is shut down and restarted since it has already been added once.

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.addFileUnlessAlreadyAdded("/someDir/someFile.aiml");
       builder.addFileUnlessAlreadyAdded("../../someDir/someFile.aiml");
       

Some examples that only work under Windows.

       builder.addFileUnlessAlreadyAdded("C:\\someDir\\someFile.aiml");
       builder.addFileUnlessAlreadyAdded("C:/someDir/someFile.aiml");
       builder.addFileUnlessAlreadyAdded("..\\..\\someDir\\someFile.aiml");
       

Parameters:
file The AIML file to add to the internal queue.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void AddString ( string  stringContainingAIML,
string  userId,
string  botId,
string  endUserId 
)

Add a string containing AIML to the internal queue for latter processing by GraphBuilder.createGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal embedded data structures in the embedded database separate for convenience.

A quick example would be:

       builder.addString
       (
         "<category>"
         "<pattern>test aiml string</pattern>"
         "<template>it simply works!</template>"
         "</category>"
       );
     

By default a AIML Header attached to the beginning of your string is:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <aiml version="1.0.1" xmlns="http://alicebot.org/2001/AIML-1.0.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://alicebot.org/2001/AIML-1.0.1 http://aitools.org/aiml/schema/AIML.xsd">
     

and a AIML Footer attached to the end of your string is:

     </aiml>
     

These are automatically attached to the beginning and end of your string for you to form a correct XML document in memory. If you want to change either of these two values use GraphBuilder.setAddStringAIMLHeader() and GraphBuilder.setAddStringAIMLFooter()

Parameters:
stringContainingAIML The string that contains the AIML to add to the internal queue.
userId The id of the user you want to add a file to.
botId The id of the bot this file belongs to.
endUserId The id of the end user that is adding this file.
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void AddString ( string  stringContainingAIML  ) 

Add a string containing AIML to the internal queue for latter processing by GraphBuilder.createGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.addFile() and/or GraphBuilder.addDirectory() and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), GraphBuilder.addDirectoryUnlessAlreadyAdded(), call GraphBuilder.createGraph() to parse and build the RebeccaAIML embedded database structures.

Since parsing and building the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually creating the internal embedded database structures separate for convenience.

A quick example would be:

       builder.addString
       (
         "<category>"
         "<pattern>test aiml string</pattern>"
         "<template>it simply works!</template>"
         "</category>"
       );
     

By default a AIML Header attached to the beginning of your string is:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <aiml version="1.0.1" xmlns="http://alicebot.org/2001/AIML-1.0.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://alicebot.org/2001/AIML-1.0.1 http://aitools.org/aiml/schema/AIML.xsd">
     

and a AIML Footer attached to the end of your string is:

     </aiml>
     

These are automatically attached to the beginning and end of your string for you to form a correct XML document in memory. If you want to change either of these two values use GraphBuilder.setAddStringAIMLHeader() and GraphBuilder.setAddStringAIMLFooter()

Parameters:
stringContainingAIML The string that contains the AIML to add to the internal queue.
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

string CallSystemCommand ( string  command  ) 

This method acts the same as calling the AIML XML tag "System" by sending the command to the operating system and returning the output of the command.

For example, if under dos you call this method with the string "dir" it will return a string with the full directory listing.

Likewise if under unix you call this method with the string "ls" it will return a string with the full directory listing.

Parameters:
command The string of the command to send to the underlying operating system.
Returns:
Returns the output of the Operating System after it executes the string.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void CreateGraph ( string  userId,
string  botId,
string  endUserId 
)

Creates the embedded database structures needed to be able to query AIML through GraphBuilder.getResponse().

After files from GraphBuilder.addFile(), and/or GraphBuilder.addDirectory(), and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), and other RebeccaAIML setups have taken place this method should be called to create the internal data structures needed to perform an AIML query.

Parameters:
userId The id of the user you want to create the embedded database structures for.
botId The id of the user's bot you want to create the embedded database structures for.
endUserId The id of the end user that is requesting the createGraph.
Exceptions:
XMLErrorException A possible XMLErrorException can occur through either illegal AIML tags or through a bad initialization of the internal XML engine.
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void CreateGraph (  ) 

Creates the embedded database structures needed to be able to query AIML through GraphBuilder.getResponse().

After files from GraphBuilder.addFile(), and/or GraphBuilder.addDirectory(), and/or GraphBuilder.addString(), and/or GraphBuilder.addFileUnlessAlreadyAdded(), and/or GraphBuilder.addDirectoryUnlessAlreadyAdded(), and other RebeccaAIML setups have taken place this method should be called to create the internal data structures needed to perform an AIML query.

Exceptions:
XMLErrorException A possible XMLErrorException can occur through either illegal AIML tags or through a bad initialization of the internal XML engine.
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetAIMLFileList ( string  userId,
string  botId,
string  endUserId 
)

Returns an array of the currently loaded AIML files in the embedded database.

Call this to get an array of the AIML files you have loaded into the embedded database.

Parameters:
userId The user to get the AIML files of.
botId The bot to get the AIML files against.
endUserId The end user requesting to get the AIML files.
Returns:
Returns an array of the AIML files currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetAIMLFileList (  ) 

Returns an array of the currently loaded AIML files in the embedded database.

Call this to get an array of the AIML files you have loaded into the embedded database.

Returns:
Returns an array of the AIML files currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetAIMLFileListSize ( string  userId,
string  botId,
string  endUserId 
)

Returns the number of the currently loaded AIML files in the embedded database.

Call this to get how many AIML files you have loaded in the embedded database.

Parameters:
userId The user to get the number of AIML files.
botId The bot to get the number of AIML files against.
endUserId The end user requesting to get the AIML file size.
Returns:
Returns the number of AIML files currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetAIMLFileListSize (  ) 

Returns the number of the currently loaded AIML files in the embedded database.

Call this to get how many AIML files you have loaded in the embedded database.

Returns:
Returns the number of AIML files currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetAIMLStringList ( string  userId,
string  botId,
string  endUserId 
)

Returns an array of the currently loaded AIML strings in the embedded database.

Call this to get an array of the AIML strings you have loaded into the embedded database.

Parameters:
userId The user to get the AIML strings of.
botId The bot to get the AIML strings against.
endUserId The end user requesting to get the AIML strings.
Returns:
Returns an array of the AIML strings currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetAIMLStringList (  ) 

Returns an array of the currently loaded AIML strings in the embedded database.

Call this to get an array of the AIML strings you have loaded into the embedded database.

Returns:
Returns an array of the AIML strings currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetAIMLStringListSize ( string  userId,
string  botId,
string  endUserId 
)

Returns the number of the currently loaded AIML strings in the embedded database.

Call this to get how many AIML strings you have loaded in the embedded database.

Parameters:
userId The user to get the number of AIML strings.
botId The bot to get the number of AIML strings against.
endUserId The end user requesting to get the AIML string size.
Returns:
Returns the number of AIML strings currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetAIMLStringListSize (  ) 

Returns the number of the currently loaded AIML strings in the embedded database.

Call this to get how many AIML strings you have loaded in the embedded database.

Returns:
Returns the number of AIML strings currently loaded in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetBotIds ( string  userId  ) 

Returns an array of all the bot id's of a particular user in the embedded database.

Call this to get an array of the bot id's of a particular user.

Parameters:
userId The user of this bot.
Returns:
Returns an array of all the bot id's of a particular user in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetBotIdsSize ( string  userId  ) 

Returns the number of bot id's for a particular user in the embedded database.

Call this to get the number of bot id's of a particular user.

Parameters:
userId The user of this bot.
Returns:
Returns the number of bot id's for a particular user.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetBotPredicate ( string  name,
string  userId,
string  botId,
string  endUserId 
)

Gets a bot predicate inside of the AIML embedded database in the same way that a AIML "Bot" tag does.

This method is called usually whenever the AIML tag "Bot" is encountered to retrieve a predicate name's value, but it is exposed here so that the user of RebeccaAIML api may also get predicates the same way.

Parameters:
name The name of the predicate to get the value of from the embedded database.
userId The user you are getting the bot predicate for.
botId The bot you are getting the bot predicate against.
endUserId The end user you are getting the bot predicate for.
Returns:
Returns the value of the predicate's name or empty string if the predicate name does not exist in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetBotPredicate ( string  name  ) 

Gets a bot predicate inside of the AIML embedded database in the same way that a AIML "Bot" tag does.

This method is called usually whenever the AIML tag "Bot" is encountered to retrieve a predicate name's value, but it is exposed here so that the user of RebeccaAIML api may also get predicates the same way.

Parameters:
name The name of the predicate to get the value of from the embedded database.
Returns:
Returns the value of the predicate's name or empty string if the predicate name does not exist in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetBotPredicates ( string  userId,
string  botId,
string  endUserId 
)

Returns an array of all the bot predicates in the embedded database.

Call this to get an array of all the bot predicates you have loaded into the embedded database.

Parameters:
userId The user to get the bot predicates of.
botId The bot to get the bot predicates against.
endUserId The end user requesting to get the bot predicates.
Returns:
Returns an array of all the bot predicates in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetBotPredicates (  ) 

Returns an array of all the bot predicates in the embedded database.

Call this to get an array of all the bot predicates you have loaded into the embedded database.

Returns:
Returns an array of all the bot predicates in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetBotPredicatesSize ( string  userId,
string  botId,
string  endUserId 
)

Returns the number of bot predicates in the embedded database.

Call this to get the number of all the bot predicates you have loaded into the embedded database.

Parameters:
userId The user to get the predicates of.
botId The bot to get the predicates against.
endUserId The end user requesting to get the bot predicates.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetBotPredicatesSize (  ) 

Returns the number of bot predicates in the embedded database.

Call this to get the number of all the bot predicates you have loaded into the embedded database.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetEndUserIds ( string  userId,
string  botId 
)

Returns an array of all the end user id's of a particular user and a particular bot of that user in the embedded database.

Call this to get an array of the end user id's of a particular user and a particular bot of that user.

Parameters:
userId The user of this end user.
botId The bot in which this end user belongs to.
Returns:
Returns an array of all the end user id's of a particular user and a particular bot of that user in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetEndUserIdsSize ( string  userId,
string  botId 
)

Returns the number of end user id's of a particular user and a particular bot of that user in the embedded database.

Call this to get the number of end user id's of a particular user and a particular bot of that user in the embedded database.

Parameters:
userId The user this end user.
botId The bot in which this end user belongs to.
Returns:
Returns the number of end user id's of a particular user and a particular bot of that user in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetId (  ) 

Gets the id the same way the AIML tag "Id" does.

This will return the userId set by GraphBuilder.setUserIdBotIdEndUserId().

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPredicate ( string  name,
string  userId,
string  botId,
string  endUserId 
)

Gets a predicate inside of the AIML embedded database in the same way that a AIML "Get" tag does.

This method is called usually whenever the AIML tag "Get" is encountered to retrieve a predicate name's value, but it is exposed here so that the user of RebeccaAIML api may also get predicates the same way.

Parameters:
name The name of the predicate to get the value of from the AIML embedded database.
userId The user you are getting the predicate for.
botId The bot you are getting the predicate for.
endUserId The end user you are getting the predicate against.
Returns:
Returns the value of the predicate's name or empty string if the predicate name does not exist in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPredicate ( string  name  ) 

Gets a predicate inside of the AIML embedded database in the same way that a AIML "Get" tag does.

This method is called usually whenever the AIML tag "Get" is encountered to retrieve a predicate name's value, but it is exposed here so that the user of RebeccaAIML api may also get predicates the same way.

Parameters:
name The name of the predicate to get the value of from the AIML embedded database.
Returns:
Returns the value of the predicate's name or empty string if the predicate name does not exist in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetPredicates ( string  userId,
string  botId,
string  endUserId 
)

Returns an array of all the predicates in the embedded database.

Call this to get an array of all the predicates you have loaded into the embedded database.

Parameters:
userId The user to get the predicates of.
botId The bot to get the predicates of.
endUserId The end user to get the predicates against.
Returns:
Returns an array of all the predicates in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetPredicates (  ) 

Returns an array of all the predicates in the embedded database.

Call this to get an array of all the predicates you have loaded into the embedded database.

Returns:
Returns an array of all the predicates in the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetPredicatesSize ( string  userId,
string  botId,
string  endUserId 
)

Returns the number of predicates in the embedded database.

Call this to get the number of all the predicates you have loaded into the embedded database.

Parameters:
userId The user to get the predicates of.
botId The bot to get the predicates of.
endUserId The end user to get the predicates against.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetPredicatesSize (  ) 

Returns the number of predicates in the embedded database.

Call this to get the number of all the predicates you have loaded into the embedded database.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPreviousBotResponse ( int  previousBotResponse,
int  sentence,
string  userId,
string  botId,
string  endUserId 
)

Returns a previous RebeccaAIML response.

Retrieve a previous RebeccaAIML bot response returned from GraphBuilder.getResponse(). Useful for debugging or informative purposes, or to put other AI logic besides just using AIML tags.

Parameters:
previousBotResponse The index of the previous Bot Response to retrieve.
sentence Which sentence of the previous bot response to retrieve.
userId The user id to get the previous bot response of.
botId The bot to get the previous bot response against.
endUserId The end user requesting the previous bot response.
Returns:
Returns the previous Bot Response.
Exceptions:
IllegalArgumentException If the previousBotResponse or sentence is out of range.
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPreviousBotResponse ( int  previousBotResponse,
int  sentence 
)

Returns a previous RebeccaAIML response.

Retrieve a previous RebeccaAIML bot response returned from GraphBuilder.getResponse(). Useful for debugging or informative purposes, or to put other AI logic besides just using AIML tags.

Parameters:
previousBotResponse The index of the previous Bot Response to retrieve.
sentence Which sentence of the previous bot response to retrieve.
Returns:
Returns the previous Bot Response.
Exceptions:
IllegalArgumentException If the previousBotResponse or sentence is out of range.
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPreviousUserInput ( int  previousUserInput,
int  sentence,
string  userId,
string  botId,
string  endUserId 
)

Returns a previous RebeccaAIML user input.

Retrieve a previous RebeccaAIML user input fed as an argument into GraphBuilder.getResponse(). Useful for debugging or informative purposes, or to put other AI logic besides just using AIML tags.

Parameters:
previousUserInput The index of the previous user input to retrieve.
sentence Which sentence of the previous user input to retrieve.
userId The user to get the previous response against.
botId The bot id to get the previous response of.
endUserId The end user requesting the previous response.
Returns:
Returns the previous user input.
Exceptions:
IllegalArgumentException If the previous user input or sentence is out of range.
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetPreviousUserInput ( int  previousUserInput,
int  sentence 
)

Returns a previous RebeccaAIML user input.

Retrieve a previous RebeccaAIML user input fed as an argument into GraphBuilder.getResponse(). Useful for debugging or informative purposes, or to put other AI logic besides just using AIML tags.

Parameters:
previousUserInput The index of the previous user input to retrieve.
sentence Which sentence of the previous user input to retrieve.
Returns:
Returns the previous user input.
Exceptions:
IllegalArgumentException If the previous user input or sentence is out of range.
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetResponse ( string  input,
string  userId,
string  botId,
string  endUserId 
)

Queries the AIML internal embedded database structures with conversational input and returns the AIML response.

This is the method which ultimately you want to call after setup to query the AIML brain/embedded database structure and get back a response.

Parameters:
input The human conversational input separated by the sentence splitters you setup from either from configuration file or GraphBuilder.setSentenceSplitter().
userId The id of the user you want to query.
botId The id of the user's bot you want the response from.
endUserId The id of the end user that is making the query to the bot.
Returns:
Returns the AIML response to the human conversation.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetResponse ( string  input  ) 

Queries the AIML internal embedded database structures with conversational input and returns the AIML response.

This is the method which ultimately you want to call after setup to query the AIML brain/embedded database structure and get back a response.

Parameters:
input The human conversational input separated by the sentence splitters you setup from either from configuration file or GraphBuilder.setSentenceSplitter().
Returns:
Returns the AIML response to the human conversation.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetSize ( string  userId,
string  botId,
string  endUserId 
)

Returns the number of AIML categories loaded.

Parameters:
userId The user to get the size of.
botId The bot of the user to get the size against.
endUserId The end user requesting the size of the bot.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetSize (  ) 

Returns the number of AIML categories loaded.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetThat ( string  userId,
string  botId,
string  endUserId 
)

This returns the current that.

This is a more advanced feature that not a lot of people will find useful. It returns the AIML data structure's current internal that. However, this is provided in case you want to do testing or get the internal that yourself for debugging purposes.

Parameters:
userId The id of the user you want to get the internal AIML that from.
botId The id of the user's bot you want to get the internal AIML that from.
endUserId The id of the end user that is getting the internal AIML that.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetThat (  ) 

This returns the current that.

This is a more advanced feature that not a lot of people will find useful. It returns the AIML data structure's current internal that. However, this is provided in case you want to do testing or get the internal that yourself for debugging purposes.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetTopic ( string  userId,
string  botId,
string  endUserId 
)

This returns the current topic.

This is a more advanced feature that not a lot of people will find useful. This returns the current internal topic. However, this is provided in case you want to do testing or get the internal topic yourself for debugging purposes.

Parameters:
userId The id of the user you want to get the internal AIML topic from.
botId The id of the user's bot you want to get the internal AIML topic from.
endUserId The id of the end user that is getting the internal AIML topic.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetTopic (  ) 

This returns the current topic.

This is a more advanced feature that not a lot of people will find useful. This returns the current internal topic. However, this is provided in case you want to do testing or get the internal topic yourself for debugging purposes.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string [] GetUserIds (  ) 

Returns an array of all the user id's in the embedded database.

Call this to get an array of the user id's of users which have interacted with the embedded database.

Returns:
Returns an array of the user id's of all the users that have interacted with the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

int GetUserIdsSize (  ) 

Returns the number of user id's in the embedded database.

Call this to get the number of user id's of users which have interacted with the embedded database.

Returns:
Returns the number of user id's which have interacted with the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

string GetVersion (  ) 

Returns the version of RebeccaAIML.

Returns:
The version of RebeccaAIML.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void ParsePropertiesFile ( string  fileName,
string  userId,
string  botId,
string  endUserId 
)

Parses a properties file and calls GraphBuilder.setBotPredicate() for each property encountered.

Look at the sample xml file properties.xml and the xsd bot-configuration.xsd for an idea of how to write bot properties configuration files. More than likely you'll want to just use the sample xml file provided. Feel free to add to it for your own custom bot properties to it.

Under the covers, as the xml engine parses the bot properties xml file, it calls GraphBuilder.setBotPredicate() for each property it finds.

Parameters:
fileName The name of the bot property file.
userId The user to parse the properties file for.
botId The bot to parse the properties against and for.
endUserId The end user requesting to parse a properties file.
Exceptions:
XMLErrorException This will be thrown if an XML error is encountered.
FileNotFoundException If the file does not exist
Exception Any underlying exceptions from other methods it might call will be wrapped in this.

void ParsePropertiesFile ( string  fileName  ) 

Parses a properties file and calls GraphBuilder.setBotPredicate() for each property encountered.

Look at the sample xml file properties.xml and the xsd bot-configuration.xsd for an idea of how to write bot properties configuration files. More than likely you'll want to just use the sample xml file provided. Feel free to add to it for your own custom bot properties to it.

Under the covers, as the xml engine parses the bot properties xml file, it calls GraphBuilder.setBotPredicate() for each property it finds.

Parameters:
fileName The name of the bot property file.
Exceptions:
XMLErrorException This will be thrown if an XML error is encountered.
FileNotFoundException If the file does not exist
Exception Any underlying exceptions from other methods it might call will be wrapped in this.

void ParseSentenceSplitterFile ( string  fileName  ) 

Parses a sentence splitter file and calls GraphBuilder.setSentenceSplitter() for sentence splitters during run time.

Look at the sample xml file sentence-splitters.xml and the xsd bot-configuration.xsd for an idea of how to write sentence splitter configuration files. More than likely you'll want to just use the sample xml file provided. Feel free to add to it for your own custom sentence splitters to it. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

Under the covers, as the xml engine parses the sentence splitter xml file, it calls GraphBuilder.setSentenceSplitter() for each sentence splitter it finds.

Parameters:
fileName The name of the sentence splitter file.
Exceptions:
XMLErrorException This will be thrown if an XML error is encountered.
FileNotFoundException If the file does not exist
Exception Any underlying exceptions from other methods it might call will be wrapped in this.

void ParseSubstitutionFile ( string  fileName  ) 

Parses a substitution file and calls setXXXXSubstitution methods for substitutions during runtime.

Look at the sample xml file substitutions.xml and the xsd bot-configuration.xsd for an idea of how to write substitution files. More than likely you'll want to just use the sample xml file provided. Feel free to add to it for your own custom substitutions. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

Under the covers, as the xml engine parses the substitution xml file and calls GraphBuilder.setInputSubstitution(), GraphBuilder.setGenderSubstitution(), GraphBuilder.setPersonSubstitution(), and GraphBuilder.setPerson2Substitution() based upon the start tags inside of the xml file.

Parameters:
fileName The name of the substitution file.
Exceptions:
XMLErrorException This will be thrown if an XML error is encountered.
FileNotFoundException If the file does not exist
Exception Any underlying exceptions from other methods it might call will be wrapped in this.

bool PredicateMatch ( string  predicateName,
string  aimlPattern,
string  userId,
string  botId,
string  endUserId 
)

Checks if the predicateName matches the aimlPattern and returns true or false accordingly.

This is mostly for just debugging purposes for the user to check against condition AIML tags since, internally, the condition AIML tags use this same method when encountered at runtime during a GraphBuilder.getResponse().

Parameters:
predicateName The variable name to check a AIML pattern against.
aimlPattern The AIML pattern to check against variable name to see if the two match.
userId The user you are matching against.
botId The bot of the user you are matching against.
endUserId The end user requesting the match.
Returns:
Returns true if the AIML pattern matches the predicateName otherwise returns false.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

bool PredicateMatch ( string  predicateName,
string  aimlPattern 
)

Checks if the predicateName matches the aimlPattern and returns true or false accordingly.

This is mostly for just debugging purposes for the user to check against condition AIML tags since, internally, the condition AIML tags use this same method when encountered at runtime during a GraphBuilder.getResponse().

Parameters:
predicateName The variable name to check a AIML pattern against.
aimlPattern The AIML pattern to check against variable name to see if the two match.
Returns:
Returns true if the AIML pattern matches the predicateName otherwise returns false.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void PrintEntireDatabase (  ) 

Prints the entire contents of the embedded database as strings on standard out.

This is mainly used for debugging and sending in-depth bug reports.

void RemoveBot ( string  userId,
string  botId 
)

Removes a user's bot from the embedded database.

This causes all the bot's end users to be removed, all of the bot's loaded AIML files to be removed through calls to GraphBuilder.removeGraph(), and all of the bot's predicates to be removed along with all the bot's end users' predicates.

Parameters:
userId The user which owns this bot.
botId The bot to remove
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveBotPredicate ( string  name,
string  userId,
string  botId,
string  endUserId 
)

Removes a bot predicate from the embedded database.

Parameters:
name The name of the bot predicate to remove from the embedded database.
userId The user to remove the bot predicate from.
botId The bot the predicate is removed against.
endUserId The end user requesting the bot predicate be removed.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveBotPredicate ( string  name  ) 

Removes a bot predicate from the embedded database.

Parameters:
name The name of the bot predicate to remove from the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveCustomTagLibrary ( string  library  ) 

Removes a custom AIML tag library which should be a separate compiled .dll (Windows) or .so (Linux).

The .dll or .so that has the custom AIML tags must conform to the proper format. The proper format is that the .dll/.so should have a class that inherits from CustomTags in it. Also the two global C functions of CustomTags *rebeccaAIMLLoadCustomTags() and rebeccaAIMLRemoveCustomTags(CustomTagsImpl *customTags) must be present. rebeccaAIMLLoadCustomTags returns a new instance of the class that inherits from CustomTags and rebeccaAIMLRemoveCustomTags takes a CustomTags argument and deletes the object. If both of these C functions cannot be found, an exception will be thrown.

Parameters:
library The name of the library without the extension of .dll or .so on the end.
Exceptions:
Exception This will throw a FileNotFoundException if the .dll or .so was never loaded in the first place. It will throw a generic Exception if it cannot unload the .dll or .so

void RemoveDirectory ( string  directory,
string  userId,
string  botId,
string  endUserId 
)

Add directory of AIML files to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal data embedded database structures separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.removeDirectory("/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeDirectory("../../someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.removeDirectory("C:\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeDirectory("C:/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeDirectory("..\\..\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
directory The AIML directory to add to the internal queue for removal from the embedded database.
userId The id of the user you want to remove a directory from.
botId The id of the bot this directory belongs to.
endUserId The id of the end user that is removing this directory.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found, this method will throw a DirectoryNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveDirectory ( string  directory  ) 

Add directory of AIML files to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal data embedded database structures separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.removeDirectory("/someDir/someFile.aiml");
       builder.removeDirectory("../../someDir/someFile.aiml");
       

Some examples that only work under Windows.

       builder.removeDirectory("C:\\someDir\\someFile.aiml");
       builder.removeDirectory("C:/someDir/someFile.aiml");
       builder.removeDirectory("..\\..\\someDir\\someFile.aiml");
       

Parameters:
directory The AIML directory to add to the internal queue for removal from the embedded database.
Exceptions:
IllegalArgumentException If the regular expression is an invalid regular expression
DirectoryNotFoundException If the directory is not found, this method will throw a DirectoryNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveEndUser ( string  userId,
string  botId,
string  endUserId 
)

Removes an end user from the embedded database.

This causes the end user and all the end users's predicates to be removed from the embedded database.

Parameters:
userId The user to remove the end user from.
botId The bot the end user is removed from.
endUserId The end user to remove.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveFile ( string  file,
string  userId,
string  botId,
string  endUserId 
)

Add one AIML file to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.removeFile("/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeFile("../../someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       

Some examples that only work under Windows.

       builder.removeFile("C:\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeFile("C:/someDir/someFile.aiml", "myUser", "myBot", "myEndUser");
       builder.removeFile("..\\..\\someDir\\someFile.aiml", "myUser", "myBot", "myEndUser");
       

Parameters:
file The AIML file to add to the internal queue for latter removal from the embedded database.
userId The id of the user you want to remove a file to.
botId The id of the bot this file belongs to.
endUserId The id of the end user that is removing this file.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveFile ( string  file  ) 

Add one AIML file to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded data base structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal data structures in the embedded database separate for convenience.

Both relative and absolute paths are allowed. Although you can use Windows paths it's recommended to try to use unix paths to be cross platform. Windows paths will only work on Windows. Unix paths will work both on unix's and under Windows.

Examples that work under both Unix and Windows:

       builder.removeFile("/someDir/someFile.aiml");
       builder.removeFile("../../someDir/someFile.aiml");
       

Some examples that only work under Windows.

       builder.removeFile("C:\\someDir\\someFile.aiml");
       builder.removeFile("C:/someDir/someFile.aiml");
       builder.removeFile("..\\..\\someDir\\someFile.aiml");
       

Parameters:
file The AIML file to add to the internal queue for latter removal from the embedded database.
Exceptions:
FileNotFoundException If the file is not found, this method will throw a FileNotFoundException.
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveGraph ( string  userId,
string  botId,
string  endUserId 
)

Removes requested embedded database structures from the embedded database.

After files from GraphBuilder.removeFile(), and/or GraphBuilder.removeDirectory(), and/or GraphBuilder.removeString(), have been added to the internal queue, this method should be called to remove the embedded database structures.

Parameters:
userId The id of the user you want to remove the embedded database structures from.
botId The id of the user's bot you want to remove the embedded database structures from.
endUserId The id of the end user that is requesting the removeGraph.
Exceptions:
XMLErrorException A possible XMLErrorException can occur through either illegal AIML tags or through a bad initialization of the internal XML engine.
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveGraph (  ) 

Removes requested embedded database structures from the embedded database.

After files from GraphBuilder.removeFile(), and/or GraphBuilder.removeDirectory(), and/or GraphBuilder.removeString(), have been added to the internal queue, this method should be called to remove the embedded database structures.

Exceptions:
XMLErrorException A possible XMLErrorException can occur through either illegal AIML tags or through a bad initialization of the internal XML engine.
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemovePredicate ( string  name,
string  userId,
string  botId,
string  endUserId 
)

Removes a predicate from the embedded database.

Parameters:
name The name of the predicate to remove from the embedded database.
userId The user to remove the predicate from.
botId The bot to remove the predicate from.
endUserId The end user the predicate is removed against.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemovePredicate ( string  name  ) 

Removes a predicate from the embedded database.

Parameters:
name The name of the predicate to remove from the embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void RemoveString ( string  stringContainingAIML,
string  userId,
string  botId,
string  endUserId 
)

Add a string containing AIML to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal embedded data structures in the embedded database separate for convenience.

A quick example would be:

       builder.removeString
       (
         "<category>"
         "<pattern>test aiml string</pattern>"
         "<template>it simply works!</template>"
         "</category>",
         "MyUser",
         "MyBot",
         "MyEndUser"
       );
     

By default a AIML Header attached to the beginning of your string is:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <aiml version="1.0.1" xmlns="http://alicebot.org/2001/AIML-1.0.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://alicebot.org/2001/AIML-1.0.1 http://aitools.org/aiml/schema/AIML.xsd">
     

and a AIML Footer attached to the end of your string is:

     </aiml>
     

These are automatically attached to the beginning and end of your string for you to form a correct XML document in memory. If you want to change either of these two values use GraphBuilder.setAddStringAIMLHeader() and GraphBuilder.setAddStringAIMLFooter()

Parameters:
stringContainingAIML The string that contains the AIML to add to the internal queue for removal from the embedded database.
userId The id of the user you want to remove the string from.
botId The id of the bot this string belongs to.
endUserId The id of the end user that is removing this string.
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveString ( string  stringContainingAIML  ) 

Add a string containing AIML to the internal queue for latter processing by GraphBuilder.removeGraph().

Once all the the files you want to be parsed have been added to the internal queue by GraphBuilder.removeFile() and/or GraphBuilder.removeDirectory() and/or GraphBuilder.removeString(), call GraphBuilder.removeGraph() to parse and remove the file(s) from the RebeccaAIML embedded database structures.

Since parsing and removing from the embedded database structures is expensive, it's best to keep the functionality for queuing files and the functionality for actually removing from the internal embedded data structures in the embedded database separate for convenience.

A quick example would be:

       builder.removeString
       (
         "<category>"
         "<pattern>test aiml string</pattern>"
         "<template>it simply works!</template>"
         "</category>"
       );
     

By default a AIML Header attached to the beginning of your string is:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <aiml version="1.0.1" xmlns="http://alicebot.org/2001/AIML-1.0.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://alicebot.org/2001/AIML-1.0.1 http://aitools.org/aiml/schema/AIML.xsd">
     

and a AIML Footer attached to the end of your string is:

     </aiml>
     

These are automatically attached to the beginning and end of your string for you to form a correct XML document in memory. If you want to change either of these two values use GraphBuilder.setAddStringAIMLHeader() and GraphBuilder.setAddStringAIMLFooter()

Parameters:
stringContainingAIML The string that contains the AIML to add to the internal queue for removal from the embedded database.
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void RemoveUser ( string  userId  ) 

Removes a user from the embedded database.

This causes all of the user's bots to be removed. Which means all of the user's bots' end users will be removed, all of the bots' loaded AIML files will be removed through calls to GraphBuilder.removeGraph(), and all of the bots' predicates will be removed along with all of the bots' end users' predicates.

Parameters:
userId The user to remove.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetAddStringAIMLFooter ( string  aimlFooter  ) 

Sets the string that is automatically attached to the the end of the string sent to GraphBuilder.addString() to help form a correct XML document in memory.

The default string set when Rebecca starts is:

     </aiml>
     
Parameters:
aimlFooter The string to change which is automatically attached to the end of the string sent to GraphBuilder.addString()
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void SetAddStringAIMLHeader ( string  aimlHeader  ) 

Sets the string that is automatically attached to the the beginning of the string sent to GraphBuilder.addString() to help form a correct XML document in memory.

The default string set when Rebecca starts is:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <aiml version="1.0.1" xmlns="http://alicebot.org/2001/AIML-1.0.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://alicebot.org/2001/AIML-1.0.1 http://aitools.org/aiml/schema/AIML.xsd">
     

Parameters:
aimlHeader The string to change which is automatically attached to the beginning of the string sent to GraphBuilder.addString()
Exceptions:
Exception If an underlying method throws an exception, it will be wrapped and thrown as a Exception.

void SetAIMLSchema ( string  schema  ) 

Sets the xsd schema for validating AIML XML files.

Parameters:
schema The xsd schema for validating AIML XML files.
Exceptions:
FileNotFoundException If the schema file is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetAIMLValidation ( bool  trueOrFalse  ) 

Sets whether to use AIML validation from the xsd given at GraphBuilder.setAIMLSchema() or not.

By default if this is not called, then the AIML validation will not be used even if GraphBuilder.setAIMLSchema() has been called with a valid xsd.

Parameters:
trueOrFalse By default true. Set this to true to use validation and false to not use validation.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetBotConfigurationSchema ( string  schema  ) 

Sets the bot configuration schema to be used with parsing a RebeccaAIML configuration file.

This should be used in conjunction with GraphBuilder.setCommonTypesSchema() and one of the parseConfiguration methods of: GraphBuilder.parseSubstitutionFile(), GraphBuilder.parsePropertiesFile(), and GraphBuilder.parseSentenceSplitterFile() with their respective XML files. Provided sample configuration files are bots.xml, properties.xml, sentence-splitters.xml, and substitutions.xml.

Parameters:
schema The schema for validating RebeccaAIML configuration files.
Exceptions:
FileNotFoundException This will be thrown if the file is not found.
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetBotConfigurationValidation ( bool  trueOrFalse  ) 

Sets XML Validation with the xml schema files from GraphBuilder.setBotConfigurationSchema() and GraphBuilder.setCommonTypesSchema().

By default if this is not called, then the validation will not be used even if GraphBuilder.setBotConfigurationSchema() and GraphBuilder.setCommonTypesSchema() has been called with a valid xsd.

Parameters:
trueOrFalse True to turn on validation and false to turn off validation.
Exceptions:
This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetBotPredicate ( string  name,
string  value,
string  userId,
string  botId,
string  endUserId 
)

Sets a bot predicate inside of the AIML embedded database.

This is the only means to set a bot Predicate so that during a GraphBuilder.getResponse() the "Bot" AIML tag returns the predicate set here. After this method is called setting up a new predicate with a value, any AIML "Bot" tags latter encountered querying the predicate name will return the value which was set here.

Parameters:
name The name of the predicate to put into the AIML embedded database.
value The value of the predicate name to put into the AIML embedded database.
userId The user you are getting the bot predicate for.
botId The bot you are getting the bot predicate against.
endUserId The end user you are getting the bot predicate for.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetBotPredicate ( string  name,
string  value 
)

Sets a bot predicate inside of the AIML embedded database.

This is the only means to set a bot Predicate so that during a GraphBuilder.getResponse() the "Bot" AIML tag returns the predicate set here. After this method is called setting up a new predicate with a value, any AIML "Bot" tags latter encountered querying the predicate name will return the value which was set here.

Parameters:
name The name of the predicate to put into the AIML embedded database.
value The value of the predicate name to put into the AIML embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetCallBacks ( CallBacks  callback  ) 

Sets the subclass of CallBacks to use for RebeccaAIML callbacks.

SubClass CallBacks with your own custom subclass and then instantiate it. Call this method with the address of your instantiated class. This method *WILL NOT* try to deallocate the memory of your instantiated subclass. You are responsible for the memory management of it.

Parameters:
callback The address of the instantiation of your subclass.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetCommonTypesSchema ( string  schema  ) 

Sets the common types schema for validating RebeccaAIML configuration files.

This has to be set in conjuction with GraphBuilder.setBotConfigurationSchema.

Parameters:
schema The schema for validating RebeccaAIML configuration files.
Exceptions:
FileNotFoundException If the schema file is not found
Exception If an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetGenderSubstitution ( string  find,
string  replace 
)

Sets a gender substitution for AIML tag "Gender".

Gender AIML tag is to replace all occurrences of one gender with that of another. So, this provided method allows the gender substitutions to be set. None are hardcoded internally for the "Gender" AIML tag. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

A simple example to use this would be:

setGenderSubstitution("he", "she");

Now, when the gender tag is encountered it will replace all occurrences of "he" with "she".

Take note that the first argument to this method accepts regular expressions which make this method more robust. For example, it is more robust to use the word boundary "\b" as in:

setGenderSubstitution("\bhe\b", "she");

Now, "he" will only be substituted for "she" when there is a white space character on each side.

Parameters:
find A regular expression to search for inside of the "Gender" AIML tag.
replace The text to replace with. This is NOT a regular expression.
Exceptions:
IllegalArgumentException will be thrown if the first argument is a illegal regular expression.
Exception Will be called from any underlying exceptions from other methods it might call.

void SetInputSubstitution ( string  find,
string  replace 
)

Sets a input substitution for the input that goes into GraphBuilder.getResponse().

Substitutions are good so as to not write duplicate AIML. Note that this will not be stored in the AIML embedded datbase and that this will have to be called at initialization of your program at startup each time.

A simple example of using this would be:

setInputSubstitution("it's", "it is");

Now, if the input is:

GraphBuilder.getResponse("It's a great day");

The input will be substituted internally for "It is a great day". Take note that the first argument to this method accepts regular expressions which make this method more robust. For example, it is more robust to use the word boundary "\b" as in:

setInputSubstitution("\bit's\b", "it is");

Now, "it's" will only be substituted for "it is" when there is a white space character on each side.

See GraphBuilder.parseSubstitutionFile(), a convenience method for parsing a provided substitution file.

Parameters:
find A regular expression to search for in the input of GraphBuilder.getResponse().
replace The text to replace with. This is NOT a regular expression.
Exceptions:
IllegalArgumentException will be thrown if the first argument is a illegal regular expression.
Exception Will be called from any underlying exceptions from other methods it might call.

void SetPerson2Substitution ( string  find,
string  replace 
)

Sets a person2 substitution for AIML tag "Person2".

From the AIML specification:

The "Person2" AIML tag is to replace words with first-person aspect in the result of processing the contents of the person2 element with words with the grammatically-corresponding second-person aspect; and replace words with second-person aspect in the result of processing the contents of the person2 element with words with the grammatically-corresponding first-person aspect. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

A simple example to use this would be:

setPersonSubstitution("with you ", "with me");

Now when the "Person2" tag is encountered it will replace all occurrences of "with you" with "with me".

Take note that the first argument to this method accepts regular expressions which make this method more robust. For example, it is more robust to use the word boundary "\b" as in:

setGenderSubstitution("\bwith you\b", "with me");

Now, "with you" will only be substituted for "with me" when there is a white space character on each side.

Parameters:
find A regular expression to search for inside of the "Person2" AIML tag.
replace The text to replace with. This is NOT a regular expression.
Exceptions:
IllegalArgumentException will be thrown if the first argument is a illegal regular expression.
Exception Will be called from any underlying exceptions from other methods it might call.

void SetPersonSubstitution ( string  find,
string  replace 
)

Sets a person substitution for AIML tag "Person".

From the AIML specification:

The "Person" AIML tag is to replace words with first-person aspect in the result of processing the contents of the person element with words with the grammatically-corresponding third-person aspect; and replace words with third-person aspect in the result of processing the contents of the person element with words with the grammatically-corresponding first-person aspect. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

A simple example to use this would be:

setPersonSubstitution("he was ", "I was");

Now when the "Person" tag is encountered it will replace all occurrences of "he was" with "I was".

Take note that the first argument to this method accepts regular expressions which make this method more robust. For example, it is more robust to use the word boundary "\b" as in:

setGenderSubstitution("\bhe was\b", "I was");

Now, "he was" will only be substituted for "I was" when there is a white space character on each side.

Parameters:
find A regular expression to search for inside of the "Person" AIML tag.
replace The text to replace with. This is NOT a regular expression.
Exceptions:
IllegalArgumentException will be thrown if the first argument is a illegal regular expression.
Exception Will be called from any underlying exceptions from other methods it might call.

void SetPredicate ( string  name,
string  value,
string  userId,
string  botId,
string  endUserId 
)

Sets a predicate inside of the AIML embedded database in the same way that a AIML "Set" tag does.

This method is called usually whenever the AIML tag "Set" is encountered to set a predicate to a value, but it is exposed here so that the user of RebeccaAIML api may also set predicates the same way. After this method is called setting up a new predicate with a value, any AIML "Get" tags latter encountered querying the predicate name will return the value which was set here.

Parameters:
name The name of the predicate to put into the AIML embedded database.
value The value of the predicate name to put into the AIML embedded database.
userId The user you are using to set the predicate for.
botId The bot you are using to set the predicate for.
endUserId The end user you are setting the predicate against.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetPredicate ( string  name,
string  value 
)

Sets a predicate inside of the AIML embedded database in the same way that a AIML "Set" tag does.

This method is called usually whenever the AIML tag "Set" is encountered to set a predicate to a value, but it is exposed here so that the user of RebeccaAIML api may also set predicates the same way. After this method is called setting up a new predicate with a value, any AIML "Get" tags latter encountered querying the predicate name will return the value which was set here.

Parameters:
name The name of the predicate to put into the AIML embedded database.
value The value of the predicate name to put into the AIML embedded database.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetSentenceSplitter ( string  splitter  ) 

Adds a sentence splitter to distinguish the end of a sentence.

Each time this is called with a character or string, that character or string is added as a sentence splitter. Sentence splitters are used internally to distinguish the end of a sentence. See GraphBuilder.parseSentenceSplitterFile() for a convenience method for parsing an example sentence splitter file provided. Note that this will not be stored in the AIML embedded database and that this will have to be called at initialization of your program at startup each time.

Parameters:
splitter The character or string to be added as a splitter.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetThat ( string  that,
string  userId,
string  botId,
string  endUserId 
)

This allows you to hand set the current that.

This is a more advanced feature that not a lot of people will find useful. It sets the internal that which is done automatically by RebeccaAiml. However, this is provided in case you want to do testing or set the internal that yourself.

Parameters:
that The internal AIML that in which you can set yourself if you really want to.
userId The id of the user you want to set the internal AIML that to.
botId The id of the user's bot you want to set the internal AIML that to.
endUserId The id of the end user that is setting the internal AIML that.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetThat ( string  that  ) 

This allows you to hand set the current that.

This is a more advanced feature that not a lot of people will find useful. It sets the internal that which is done automatically by RebeccaAiml. However, this is provided in case you want to do testing or set the internal that yourself.

Parameters:
that The internal AIML that in which you can set yourself if you really want to.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetTopic ( string  topic,
string  userId,
string  botId,
string  endUserId 
)

This allows you to hand set the current topic.

This is a more advanced feature that not a lot of people will find useful. It sets the internal topic which is done automatically by RebeccaAiml. However, this is provided in case you want to do testing or set the internal topic yourself.

Parameters:
topic The internal AIML topic in which you can set yourself if you really want to.
userId The id of the user you want to set the internal AIML topic to.
botId The id of the user's bot you want to set the internal AIML topic to.
endUserId The id of the end user that is setting the internal AIML topic.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetTopic ( string  topic  ) 

This allows you to hand set current topic.

This is a more advanced feature that not a lot of people will find useful. It sets the internal topic which is done automatically by RebeccaAiml. However, this is provided in case you want to do testing or set the internal topic yourself.

Parameters:
topic The internal AIML topic in which you can set yourself if you really want to.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SetUserIdBotIdEndUserId ( string  userId,
string  botId,
string  endUserId 
)

Sets the user id, bot id, and end user id for all calls to methods that do not have user id, bot id, and bot id arguments.

If this is never called, and methods without user id's, bot id's, and end user id's are called than by default the user id, bot id, and end user id of "default" will be used.

Parameters:
userId The user id to set
botId The bot id to set
endUserId The end user id to set
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void StoreGossip ( string  gossip  ) 

Stores gossip the same way the AIML tag "Gossip" does.

This under the covers will just call the callback CallBacks.storeGossip(). If no callback is set through GraphBuilder.setCallBacks() this does nothing.

Parameters:
gossip The textual gossip to store.
Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.

void SynchronizeDatabase (  ) 

Synchronizes the in memory data to the embedded database.

The database is synchronized on a regular basis but this is provided if at any given point you want to ensure all in memory data structures are flushed to disk at a particular point. On a normal program exit the database will be synchronized so calling this before a normal program exit isn't necessary.

Exceptions:
Exception This will not directly throw an exception but if an underlying method throws an exception, it will be wrapped and thrown as an Exception.


The documentation for this interface was generated from the following file:
Generated on Mon Aug 27 12:26:46 2007 for RebeccaAIML by  doxygen 1.5.3