Create a thesaurus in the remote server.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub thcreate( _ ByVal thes As NetricsThesaurus _ ) _ Implements INetricsServerInterface.thcreate |
C# |
---|
public void thcreate( NetricsThesaurus thes ) |
C++ |
---|
public: void thcreate( NetricsThesaurus thes ) sealed |
J# |
---|
public void thcreate( NetricsThesaurus thes ) |
JScript |
---|
public
function thcreate( thes : NetricsThesaurus ) |
Parameters
- thes
- The NetricsThesaurus object to create on the remote server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods.
Implements
INetricsServerInterface.thcreate
Exceptions
Exception Type | Condition |
---|---|
NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING) |
Example
This sample shows how to create a thesaurus in a TIBCO Patterns Engine.
![]() | |
---|---|
using NetricsServerInterface; class MyClass { private static NetricsServerInterface.NetricsServerInterface si = null; public static void Main() { try { String host = "localhost"; int port = 5051; si = new NetricsServerInterface.NetricsServerInterface(host, port); // Thesaurus input csv file String file = "c:\\temp\\nicknames.csv"; // Thesaurus name String thesaurus = "nicknames"; // Use default encoding which is LATIN1 specified by the null NetricsThesaurus thes = new NetricsThesaurus(thesaurus, file, null); si.thcreate(thes); Console.WriteLine("Thesaurus created"); } catch (NetricsException e) { Console.Write(e.getErrorDescription() + "\n"); } } } |