<html>
<head>
<title>Comments on OWL-API</title>
<!--style type="text/css">@import url(style.css);</style-->
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body bgcolor="#ffffff">

<h1 class="titre">Comments on OWL-API</h1>

<p>Note: these notes are based on the version 1.0 (15/10/2003)
of the OWL API.
Some things have changed since then and these notes have not have been
updated.</p>
<p><font color="red">There is now a better and up to date introduction on the
<a href="http://owl.man.ac.uk/api/readme.html">OWL API web site</a>.</font></p>
<p>The current 1.2 alignement API works correctly
with the version 1.2 (09/03/2004) of the OWL API. The version
  available under anonymous CVS works with version (21/03/2005) of
  the OWL API.</p>

<h2>Where to get it?</h2>

<p><a
      href="http://sourceforge.net/projects/owlapi"><tt>http://sourceforge.net/projects/owlapi</tt></a></p>
<p>The code is partly documented and this can be read in
  the <tt>javadoc</tt> directory. This 
  <a href="http://potato.cs.man.ac.uk/papers/cooking03.pdf">paper</a>
  is a must have read to understand the philosophy behind this API.</p>

<h2>What is in the package</h2>
<p>There are two packages: owlbin and owlsrc. They are
  complementary, as can be noted when looking at their directories:
<pre>
owl-bin:
drwxrwxr-x  18 euzenat  unknown   612 Dec  2 14:23 javadoc
   => documentation for API and all the code.
drwxrwxr-x  14 euzenat  unknown   476 Dec  2 14:24 lib
   => set of Jar files to be used for running applications
-rwxrwxr-x   1 euzenat  unknown   594 Dec  2 14:47 processor
   => a shell script for running the processor example
-rw-rw-r--   1 euzenat  unknown  1312 Oct 15 10:24 readme-bin.html
   => instructions for running it (see next item).
</pre>
and 
<pre>
owl-src:
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 api (*)
    => API source and tests
drwxrwxr-x    7 euzenat  unknown   238 Dec  6 13:52 build
    => build results (see below for its architecture)
-rw-rw-r--    1 euzenat  unknown  9827 Oct 14 18:10 common.xml
-rw-rw-r--    1 euzenat  unknown  4702 Oct 14 18:10 dependencies.png
    => picture for the readme.html
-rw-rw-r--    1 euzenat  unknown  2305 Oct 14 18:10 example-build.xml
    => seems to be just a build file pattern.
drwxrwxr-x    4 euzenat  unknown   136 Dec  6 13:30 examples (*)
    => example uses (this is only the Processor.java class)
drwxrwxr-x    8 euzenat  unknown   272 Dec  6 13:30 ext
    => contains libraries required for building and using owlapi
       (dig, getopt, junit, log4j, rdfapi, servlet).
-rw-rw-r--    1 euzenat  unknown  1333 Oct 14 18:10 ext.xml
    => ant build file include.
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 impl (*)
    => One implementation of the API.
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 inference (*)
    => Inferencing addition to the API.
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 io (*)
    => Rendering methods from the API.
-rw-rw-r--    1 euzenat  unknown   157 Oct 14 18:10 license.txt
    => LGPL.
-rw-rw-r--    1 euzenat  unknown  3554 Oct 14 18:10 modules.xml
-rw-rw-r--    1 euzenat  unknown  1066 Oct 14 18:10 names.xml
    => These are ant build include files.
drwxrwxr-x    3 euzenat  unknown   102 Dec  6 13:30 owlapi
    => Contains the and master build file build.xml
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 owltest
    => Junit tests?
drwxrwxr-x    4 euzenat  unknown   136 Dec  6 13:30 rdfparser (*)
    => OWL/RDF parser and renderer.
-rw-rw-r--    1 euzenat  unknown  1312 Oct 15 10:14 readme-bin.html
    => Readme file on how to use the binary package.
-rw-rw-r--    1 euzenat  unknown  3605 Oct 14 18:10 readme.html
    => Readme file on how to use the sources.
drwxrwxr-x  106 euzenat  unknown  3604 Dec  6 13:30 resources
    => Contains the complete W3C OWL test set.
drwxrwxr-x    4 euzenat  unknown   136 Dec  6 13:30 servlet (*)
    => An example of a servlet loading an OWL/RDF ontology and
      diagnosing the OWL sub language it uses.
drwxrwxr-x    5 euzenat  unknown   170 Dec  6 13:30 validation (*)
    => A tool diagnosing the the OWL sub language used by an ontology.
</pre>
The only intersection is the <tt>readme-bin.html</tt> file.
</p>
<p>The directories marked with a (*) corresponds to the sections of
  the package containing real code. They usually contain
  a <tt>src</tt> directory<!-- and <tt>build.xml</tt> file-->.
  These directories will generate a
  corresponding directory in the build process (see below).</p>
<p>The missing files in src can be generated by rebuilding owl-api!
  (see below).</p>
<h2>Running examples</h2>
<p>
The <tt>processor</tt> example parses a OWL/RDF file whose URI is
given as argument and generates an output which can be:
<dl>
<dt>--abstract -a</dt><dd>Produce OWL Abstract Syntax</dd>
<dt>--tptp -t</dt><dd>Produce TPTP</dd>
<dt>--warn -w</dt><dd>Report warnings & errors</dd>
<dt>--renderer=className -r</dt><dd>Use the given class for output.</dd>
<dt>--impl=className -i</dt><dd>Use the given class as the default implementation of OWLConnection.</dd>
<dt>--validate[=lite|dl] -v</dt><dd>Validate. If no level is given, validates as DL.</dd>
<dt>--help -?</dt><dd>Print this message</dd>
</dl>
</p>
<p>For instance:
<pre>
$ ./processor -a file://&lt;yourpath>/owl/resources/transitive2.owl
[Namespaces: 
  rdf   = http://www.w3.org/1999/02/22-rdf-syntax-ns#
  xsd   = http://www.w3.org/2001/XMLSchema#
  rdfs  = http://www.w3.org/2000/01/rdf-schema#
  owl   = http://www.w3.org/2002/07/owl#
  a     = http://www.example.org/ontology#
]

Ontology(

 annotation(rdfs:comment [An example OWL ontology^^http://www.w3.org/2001/XMLSchema#string])

 ObjectProperty(a:p Transitive Functional)

)
</pre>
or
<pre>
$ ./processor --renderer=org.semanticweb.owl.io.owl_rdf.Renderer file://&lt;yourpath>/owl/resources/transitive2.owl
&lt;?Xml version="1.0"?>
&lt;!DOCTYPE owl [
&lt;!ENTITY owl  "http://www.w3.org/2002/07/owl#" >
&lt;!ENTITY xsd  "http://www.w3.org/2000/10/XMLSchema#" >
&lt;!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
&lt;!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
]>
&lt;rdf:RDF
 xmlns:rdf      ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:rdfs     ="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:owl      ="http://www.w3.org/2002/07/owl#"
 xmlns:a        ="http://www.example.org/ontology#"
>
&lt;!-- Need to support further ontology metadata, import still missing -->
        &lt;owl:Ontology rdf:about="file:///Volumes/Skratsh/JAVA/owlapi/owl/resources/transitive2.owl" />
        &lt;owl:ObjectProperty rdf:about="http://www.example.org/ontology#p">
                &lt;rdf:type rdf:resource="&amp;owl;TransitiveProperty" />
                &lt;rdf:type rdf:resource="&amp;owl;FunctionalProperty" />
        &lt;/owl:ObjectProperty>



&lt;/rdf:RDF>
</pre>
</p>
<p><b>Beware</b>: the interface requires an URL (not a filename) and
  is very sensitive to any potential problem with them.</p>
<h2>Rebuilding OWLAPI</h2>
<p>Can be build by:
<pre>
$ cd owlapi
$ ant 
    => compiles everything
$ ant run.test
    => runs unit tests (requires ant junit extension)
$ ant javadoc
    => generates documentation (done with compile?).
</pre>
The results are generated within the <tt>build</tt> directory. It
contains a number of directories corresponding the the various
sections of the package. Each of them contains the following
structure:
<pre>
drwxrwxr-x   3 euzenat  unknown       102 Dec  6 13:55 class
    => Java .class files
drwxrwxr-x  14 euzenat  unknown       476 Dec  6 13:55 javadoc
    => The documentation
drwxrwxr-x   3 euzenat  unknown       102 Dec  6 13:55 lib
    => one Jar archive bearing the name of the section.
</pre>
The <tt>javadoc</tt> and <tt>lib</tt> directories of the binary
      package contains the "union" of the files found in theses.
</p>
<p>The binary distribution itself can be regenerated by using the "distribution.bin"
  ant switch.
<pre>
$ ant distribution.bin
</pre>
</p>

<address>
<small>
<hr />
<center>http://alignapi.gforge.inria.fr/owlapi.html</center>
<hr />
$Id$
</small>
</address>
</body>
</html>