mulgara - semantic store

skip navigation

SHOW SITE NAV
fixed
fluid
straight

iTQL Shell

The iTQLTM shell is a console-based, interactive shell, allowing users to issue iTQL commands to Mulgara. Alternatively, multiple commands can be executed sequentially using iTQL script files.

The interpreter supports several command line options that make working with large numbers of queries easier. You can run the shell as a stand-alone application (packaged in a fully-self-contained executable JAR file), or invoke it directly via API calls. iTQL commands sent to the iTQL interpreter return results directly to the console, whereas iTQL commands sent via the communication methods listed above return answers as native Java objects (in the case of direct API calls) or in XML.

You must have the correct version of JavaTM software installed in order to run Mulgara and the iTQL shell. You can check the version you have installed by typing at a command line:

$ java -version

Something similar to the following should display:

java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

If the above does not display, add <JAVA_HOME>/bin, where <JAVA_HOME> is the location where J2SETM is installed, to your PATH (in the appropriate way for your shell).

Note - You must use J2SE 1.4.2 or higher. Mulgara does not run on beta 2 or prior.

How you start the iTQL shell depends on your platform. To start the iTQL shell from a:

Starting iTQL with the executable jar file allows you to pass arguments to the shell, changing the way iTQL operates. See the iTQL Shell Options section for more information about these arguments.

After starting iTQL, a message similar to the following displays:

iTQL Command Line Interface
copyright (C) 2001-2004 Tucana Technologies Inc.

Type "help ;", then enter for help.

iTQL>

The last line is the iTQL prompt. This is where you issue iTQL commands.

To display a list of iTQL commands:

iTQL>help;

To display detailed help for a particular command:

iTQL>help command;

Where command is the name of the iTQL command.

The following example queries a model named documents on a Mulgara server on the machine mysite.com to find the URLs and titles of all documents.

iTQL>select $url $title
from <rmi://mysite.com/server1#documents>
where ($url $y <http://mulgara.org/mulgara/Document#Document> )
and ( $url <http://mulgara.org/mulgara/Document#hasHtml> $node )
and ( $node <http://mulgara.org/mulgara/tool/HtmlExtractor#title> $title );

Note - iTQL supports the AND and OR operators as well as standards such as XML namespaces and URIs.

The following is an example of submitting the above query to the iTQL shell.

iTQL>select $url $title
from rmi://mysite.com/server1#documents
where ($url $y <http://mulgara.org/mulgara/Document#Document> )
and ( $url <http://mulgara.org/mulgara/Document#hasHtml> $node )
and ( $node <http://mulgara.org/mulgara/tool/HtmlExtractor#title> $title ) ;

2 columns: url title (2 rows)
url=http://mulgara.org/projects/mulgara/data/docs/doc95.htm
title="Expect lower rate of gain in the value of homes"
url=http://mulgara.org/projects/mulgara/data/docs/doc49.htm
title="District Court refuses to certify class alleging notice violations"

Valid XHTML 1.0 TransitionalValid CSS 3.0!