Previous Topic

Next Topic

Example iTQL Shell Session

The following example illustrates a sample session using the iTQLTM Shell. You can type these commands into a running shell, substituting the machine name where your server is running for localhost as described above.

Note - You need an Internet connection to continue, as some files referenced need to be downloaded by the server.

Resolving SYSTEM http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/doc-files/log4j.dtd
from classpath...resolved.
Successfully aliased http://purl.org/dc/elements/1.1/ as dcns
Successfully aliased http://www.w3.org/1999/02/22-rdf-syntax-ns# as rdfns
Successfully aliased http://www.w3.org/2000/01/rdf-schema# as rdfsns
Successfully aliased http://kowari.org/kowari# as kowarins
Kowari Metadata Store version 1.0 Build 0.226
Command Line Interface
Copyright (C) 2001-2002 Plugged In Software Pty Ltd

iTQL> create <rmi://mysite.com/server1#dc>;
Successfully created model rmi://mysite.com/server1#dc
iTQL> load <http://purl.org/dc/elements/1.1/> into <rmi://mysite.com/server1#dc>;
Successfully loaded 81 statements from http://purl.org/dc/elements/1.1/
into rmi://mysite.com/server1#dc
iTQL> select $obj $pred from <rmi://mysite.com/server1#dc> where <dcns:title> $pred $obj;
2 columns: obj pred (5 rows)
obj=http://purl.org/dc/elements/1.1/ pred=http://www.w3.org/2000/01/rdf-schema#isDefinedBy
obj=http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
pred=http://www.w3.org/1999/02/22-rdf-syntax-ns#type
obj="A name given to the resource." pred=http://www.w3.org/2000/01/rdf-schema#comment
obj="Title" pred=http://www.w3.org/2000/01/rdf-schema#label
obj="Typically, a Title will be a name by which the resource is formally known."
pred=http://dublincore.org/2000/03/13/eor#comment
iTQL> select $subj $obj from <rmi://mysite.com/server1#dc>
where $subj <http://www.w3.org/2000/01/rdf-schema#label> $obj;
2 columns: subj obj (15 rows)
subj=http://purl.org/dc/elements/1.1/contributor obj="Contributor"
subj=http://purl.org/dc/elements/1.1/coverage obj="Coverage"
subj=http://purl.org/dc/elements/1.1/creator obj="Author/Creator"
subj=http://purl.org/dc/elements/1.1/date obj="Date"
subj=http://purl.org/dc/elements/1.1/description obj="Description"
subj=http://purl.org/dc/elements/1.1/format obj="Format"
subj=http://purl.org/dc/elements/1.1/identifier obj="Resource Identifier"
subj=http://purl.org/dc/elements/1.1/language obj="Language"
subj=http://purl.org/dc/elements/1.1/publisher obj="Publisher"
subj=http://purl.org/dc/elements/1.1/relation obj="Relation"
subj=http://purl.org/dc/elements/1.1/rights obj="Rights"
subj=http://purl.org/dc/elements/1.1/source obj="Source"
subj=http://purl.org/dc/elements/1.1/subject obj="Subject"
subj=http://purl.org/dc/elements/1.1/title obj="Title"
subj=http://purl.org/dc/elements/1.1/type obj="Resource Type"
iTQL> alias <http://www.w3.org/2000/01/rdf-schema#> as rdfs;
Successfully aliased http://www.w3.org/2000/01/rdf-schema# as rdfs
iTQL> select $subj $obj from <rmi://mysite.com/server1#dc>
where $subj <rdfs:label> $obj;
2 columns: subj obj (15 rows)
subj=http://purl.org/dc/elements/1.1/contributor obj="Contributor"
subj=http://purl.org/dc/elements/1.1/coverage obj="Coverage"
subj=http://purl.org/dc/elements/1.1/creator obj="Author/Creator"
subj=http://purl.org/dc/elements/1.1/date obj="Date"
subj=http://purl.org/dc/elements/1.1/description obj="Description"
subj=http://purl.org/dc/elements/1.1/format obj="Format"
subj=http://purl.org/dc/elements/1.1/identifier obj="Resource Identifier"
subj=http://purl.org/dc/elements/1.1/language obj="Language"
subj=http://purl.org/dc/elements/1.1/publisher obj="Publisher"
subj=http://purl.org/dc/elements/1.1/relation obj="Relation"
subj=http://purl.org/dc/elements/1.1/rights obj="Rights"
subj=http://purl.org/dc/elements/1.1/source obj="Source"
subj=http://purl.org/dc/elements/1.1/subject obj="Subject"
subj=http://purl.org/dc/elements/1.1/title obj="Title"
subj=http://purl.org/dc/elements/1.1/type obj="Resource Type"
iTQL> drop <rmi://mysite.com/server1#dc>;
Successfully dropped model rmi://mysite.com/server1#dc
iTQL> create <rmi://mysite.com/server1#foo>;
Successfully created model rmi://mysite.com/server1#foo
iTQL> select $x $y $z from <rmi://mysite.com/server1#foo> where $x $y $x;
3 columns: x y z (0 rows)
iTQL> insert <http://purl.org/dc/elements/1.1/title>
<http://www.w3.org/2000/01/rdf-schema#label> 'Title'
into <rmi://mysite.com/server1#foo>;
Successfully inserted statements into rmi://mysite.com/server1#foo
iTQL> select $x $y $z from <rmi://mysite.com/server1#foo> where $x $y $x;
2 columns: x y (1 rows)
x="Title" y=http://www.w3.org/2000/01/rdf-schema#label
iTQL> drop <rmi://mysite.com/server1#foo>;
Successfully dropped model rmi://mysite.com/server1#foo
iTQL> quit;
Quitting ITQL session
Stopping Command Line Interface

See Also

Mulgara Tutorial

System Requirements

Starting a Mulgara Semantic Store Server

iTQL

Basic iTQL Operations

Mulgara Viewer

Mulgara Sample Data

Loading Existing RDF Data

Converting Data in Relational Databases to RDF

Converting XML Data to RDF

Open Source logo

© 2001-2004 Tucana Technologies, Inc. Some rights reserved.

© 2006 The Mulgara Project. Some rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".