jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r795061 - /websites/staging/jena/trunk/content/jena/documentation/ontology/index.html
Date Wed, 31 Aug 2011 23:36:22 GMT
Author: buildbot
Date: Wed Aug 31 23:36:22 2011
New Revision: 795061

Log:
Staging update by buildbot

Modified:
    websites/staging/jena/trunk/content/jena/documentation/ontology/index.html

Modified: websites/staging/jena/trunk/content/jena/documentation/ontology/index.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/ontology/index.html (original)
+++ websites/staging/jena/trunk/content/jena/documentation/ontology/index.html Wed Aug 31 23:36:22 2011
@@ -257,7 +257,7 @@ perhaps lucky for the slime molds). In R
 classes, we cannot construct expressions to describe interesting
 classes. However, for many applications it is sufficient to state
 the basic vocabulary, and RDFS is perfectly well suited to this.</p>
-<p>Note also that we can both describe classes, in general terms, and I
+<p>Note also that we can both describe classes, in general terms, and we
 can describe particular <em>instances</em> of those classes. So there may
 be a particular individual Fred who is a Fish (i.e. has
 <code>rdf:type Fish</code>), and who has two eyes. His companion Freda, a
@@ -1506,48 +1506,13 @@ object: <code>myOntModel.setStrictMode( 
 <p>Finally, methods beginning <code>is...</code> (e.g. <code>isTransitiveProperty</code>)
 allow you to test whether a given property would support a given
 sub-type facet.</p>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<blockquote>
-<p>TODO watermark</p>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
-</blockquote>
 <h2 id="more_complex_class_expressions">More complex class expressions</h2>
-<p>I introduced the handling of basic, named classes above. These are
+<p>We introduced the handling of basic, named classes above. These are
 the only kind of class descriptions available in RDFS. In OWL,
 however, there are a number of additional types of class
 expression, which allow richer and more expressive descriptions of
 concepts. There are two main categories of additional class
-expression: <em>restrictions</em> and <em>Boolean expressions</em>. Let's examine
+expression: <em>restrictions</em> and <em>Boolean expressions</em>. We'll examine
 each in turn.</p>
 <h3 id="restriction_class_expressions">Restriction class expressions</h3>
 <p>A
@@ -1560,26 +1525,15 @@ fur, and birds in feathers. Thus the pro
 one case restricted to have the value <code>fur</code>, in the other to have
 the value <code>feathers</code>. This is a <em>has value restriction</em>. Six
 restriction types are currently defined by OWL:</p>
-<p>Restriction type
-Meaning
-has value
-The restricted property has exactly the given value.
-all values from
-All values of the restricted property, if it has any, are members
-of the given class.
-some values from
-The property has at least one value which is a member of the given
-class.
-cardinality
-The property has exactly <em>n</em> values, for some positive integer n.
-min cardinality
-The property has at least <em>n</em> values, for some positive integer n.
-max cardinality
-The property has at most <em>n</em> values, for some positive integer n.
-Note that in DAML+OIL terminology, an all-values-from restriction
-is a <em>toClass</em> restriction, while a some-values-from restriction is
-a <em>hasClass</em> restriction. Note also that, at present, the Jena
-ontology API has only limited support for DAML's qualified
+<p>Restriction type | Meaning
+has value | The restricted property has exactly the given value.
+all values from | All values of the restricted property, if it has any, are members of the given class.
+some values from | The property has at least one value which is a member of the given class.
+cardinality | The property has exactly <em>n</em> values, for some positive integer n.
+min cardinality | The property has at least <em>n</em> values, for some positive integer n.
+max cardinality | The property has at most <em>n</em> values, for some positive integer n.</p>
+<p>Note that, at present, the Jena
+ontology API has only limited support for OWL2 and DAML's qualified
 cardinality restrictions (i.e. <code>cardinalityQ</code>, <code>minCardinalityQ</code>
 and <code>maxCardinalityQ</code>). Qualified cardinality restrictions are
 encapsulated in the interfaces <code>CardinalityQRestriction</code>,
@@ -1588,10 +1542,8 @@ encapsulated in the interfaces <code>Car
 qualified cardinality restrictions. Since they are not part of the
 OWL 1.0 language definition, qualified cardinality restrictions are
 not supported in OWL ontologies. Qualified cardinality restrictions
-may be added to the forthcoming OWL 1.1 update, at which point it
-is likely that the Jena ontology API will be updated. Note however,
-that we are not currently making any commitment on the timescale
-for such an update.</p>
+were added to the  OWL 2 update. OWL2 support in Jena will be
+added in due course.</p>
 <p>Jena provides a number of ways of creating restrictions, or
 retrieving them from a model. Firstly, you can retrieve a general
 restriction from the model by its URI, if known.</p>
@@ -1612,9 +1564,9 @@ that the restriction applies to:</p>
 retrieving an existing restriction by name may not be possible.
 However, you can list all of the restrictions in a model and search
 for the one you want:</p>
-<div class="codehilite"><pre><span class="n">Iterator</span> <span class="n">i</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">listRestrictions</span><span class="p">();</span>
+<div class="codehilite"><pre><span class="n">Iterator</span><span class="sr">&lt;Restriction&gt;</span> <span class="n">i</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">listRestrictions</span><span class="p">();</span>
 <span class="k">while</span> <span class="p">(</span><span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">())</span> <span class="p">{</span>
-    <span class="n">Restriction</span> <span class="n">r</span> <span class="o">=</span> <span class="p">(</span><span class="n">Restriction</span><span class="p">)</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
+    <span class="n">Restriction</span> <span class="n">r</span> <span class="o">=</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
     <span class="k">if</span> <span class="p">(</span><span class="n">isTheOne</span><span class="p">(</span> <span class="n">r</span> <span class="p">))</span> <span class="p">{</span>
         <span class="sr">//</span> <span class="n">handle</span> <span class="n">the</span> <span class="n">restriction</span>
     <span class="p">}</span>
@@ -1622,13 +1574,13 @@ for the one you want:</p>
 </pre></div>
 
 
-<p>A common case is that you want the restrictions on some property
-<code>p</code>. In this case, from an object denoting <code>p</code> you can list the
+<p>A common case is that we want the restrictions on some property
+<code>p</code>. In this case, from an object denoting <code>p</code> we can list the
 restrictions that mention that property:</p>
 <div class="codehilite"><pre><span class="n">OntProperty</span> <span class="n">p</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">getProperty</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;p&quot;</span> <span class="p">);</span>
-<span class="n">Iterator</span> <span class="n">i</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">listReferringRestrictions</span><span class="p">();</span>
+<span class="n">Iterator</span><span class="sr">&lt;Restriction&gt;</span> <span class="n">i</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">listReferringRestrictions</span><span class="p">();</span>
 <span class="k">while</span> <span class="p">(</span><span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">())</span> <span class="p">{</span>
-    <span class="n">Restriction</span> <span class="n">r</span> <span class="o">=</span> <span class="p">(</span><span class="n">Restriction</span><span class="p">)</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
+    <span class="n">Restriction</span> <span class="n">r</span> <span class="o">=</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
     <span class="sr">//</span> <span class="n">now</span> <span class="n">handle</span> <span class="n">the</span> <span class="n">restriction</span> <span class="o">...</span>
 <span class="p">}</span>
 </pre></div>
@@ -1639,13 +1591,13 @@ restriction via <code>as...</code> metho
 model), or, if the information is not in the model, via
 <code>convertTo...</code> methods. For example, to convert the example
 restriction <code>r</code> from the example above to an all values from
-restriction, you can do the following:</p>
+restriction, we can do the following:</p>
 <div class="codehilite"><pre><span class="n">OntClass</span> <span class="n">c</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">createClass</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;SomeClass&quot;</span> <span class="p">);</span>
 <span class="n">AllValuesFromRestriction</span> <span class="n">avf</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">convertToAllValuesFromRestriction</span><span class="p">(</span> <span class="n">c</span> <span class="p">);</span>
 </pre></div>
 
 
-<p>To create a particular restriction <em>ab initio</em>, you can use the
+<p>To create a particular restriction <em>ab initio</em>, we can use the
 creation methods defined on <code>OntModel</code>. For example:</p>
 <div class="codehilite"><pre><span class="n">OntClass</span> <span class="n">c</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">createClass</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;SomeClass&quot;</span> <span class="p">);</span>
 <span class="n">ObjectProperty</span> <span class="n">p</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">createObjectProperty</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;p&quot;</span> <span class="p">);</span>
@@ -1655,7 +1607,7 @@ creation methods defined on <code>OntMod
 </pre></div>
 
 
-<p>Assuming that the above code fragment was using a model <code>m</code> that
+<p>Assuming that the above code fragment was using a model <code>m</code> which
 was created with the OWL language profile, it creates a instance of
 an OWL restriction that would have the following definition in
 RDF/XML:</p>
@@ -1666,7 +1618,7 @@ RDF/XML:</p>
 </pre></div>
 
 
-<p>Once you have a particular restriction object, there are methods
+<p>Once we have a particular restriction object, there are methods
 following the standard add, get, set and test naming pattern to
 access the aspects of the restriction. For example, in a camera
 ontology, we might find this definition of a class describing
@@ -1684,10 +1636,10 @@ Large-Format cameras:</p>
 
 
 <p>Here's one way to access the components of the all values from
-restriction. Assume m contains a suitable camera ontology:</p>
+restriction. Assume <code>m</code> contains a suitable camera ontology:</p>
 <div class="codehilite"><pre><span class="n">OntClass</span> <span class="n">largeFormat</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">getOntClass</span><span class="p">(</span> <span class="n">camNS</span> <span class="o">+</span> <span class="s">&quot;Large-Format&quot;</span> <span class="p">);</span>
-<span class="k">for</span> <span class="p">(</span><span class="n">Iterator</span> <span class="n">i</span> <span class="o">=</span> <span class="n">LargeFormat</span><span class="o">.</span><span class="n">listSuperClasses</span><span class="p">(</span> <span class="n">true</span> <span class="p">);</span> <span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">();</span> <span class="p">)</span> <span class="p">{</span>
-  <span class="n">OntClass</span> <span class="n">c</span> <span class="o">=</span> <span class="p">(</span><span class="n">OntClass</span><span class="p">)</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
+<span class="k">for</span> <span class="p">(</span><span class="n">Iterator</span><span class="sr">&lt;OntClass&gt;</span> <span class="n">i</span> <span class="o">=</span> <span class="n">LargeFormat</span><span class="o">.</span><span class="n">listSuperClasses</span><span class="p">(</span> <span class="n">true</span> <span class="p">);</span> <span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">();</span> <span class="p">)</span> <span class="p">{</span>
+  <span class="n">OntClass</span> <span class="n">c</span> <span class="o">=</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
 
   <span class="k">if</span> <span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">isRestriction</span><span class="p">())</span> <span class="p">{</span>
     <span class="n">Restriction</span> <span class="n">r</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">asRestriction</span><span class="p">();</span>
@@ -1704,24 +1656,24 @@ restriction. Assume m contains a suitabl
 
 
 <h3 id="boolean_class_expressions">Boolean class expressions</h3>
-<p>Most programmers are familiar with the use of Boolean operators to
+<p>Most developers are familiar with the use of Boolean operators to
 construct propositional expressions: conjunction (and), disjunction
-(or) and negation (not). OWL provides a means for construction
+(or) and negation (not). OWL provides a means for constructing
 expressions describing classes with analogous operators, by
 considering class descriptions in terms of the set of individuals
 that comprise the members of the class.</p>
-<p>Suppose we wish to say that an instance x has <code>rdf:type</code> A <strong>and</strong>
-<code>rdf:type</code> B. This means that x is both a member of the set of
-individuals in A, and in the set of individuals in B. Thus, x lies
-in the <em>intersection</em> of classes A and B. If, on the other hand, A
-is either has <code>rdf:type</code> A <strong>or</strong> B, then x must lie in the <em>union</em>
-of A and B. Finally, to say that x does <strong>not</strong> have <code>rdf:type</code> A,
-it must lie in the <em>complement</em> of A. These operations, union,
+<p>Suppose we wish to say that an instance <code>x</code> has <code>rdf:type</code> <code>A</code> <strong>and</strong>
+<code>rdf:type</code> <code>B</code>. This means that <code>x</code> is both a member of the set of
+individuals in <code>A</code>, and in the set of individuals in <code>B</code>. Thus, <code>x</code> lies
+in the <em>intersection</em> of classes <code>A</code> and <code>B</code>. If, on the other hand, <code>A</code>
+is either has <code>rdf:type</code> <code>A</code> <strong>or</strong> <code>B</code>, then <code>x</code> must lie in the <em>union</em>
+of <code>A</code> and <code>B</code>. Finally, to say that x does <strong>not</strong> have <code>rdf:type</code> <code>A</code>,
+it must lie in the <em>complement</em> of <code>A</code>. These operations, union,
 intersection and complement are the Boolean operators for
 constructing class expressions. While complement takes only a
 single argument, union and intersection must necessarily take more
 than one argument. Before continuing with constructing and using
-Boolean class expressions, I digress briefly to discuss lists.</p>
+Boolean class expressions, let's briefly to discuss lists.</p>
 <h3 id="list_expressions">List expressions</h3>
 <p>RDF originally had three container types: <code>Seq</code>, <code>Alt</code> and <code>Bag</code>.
 While useful, these are all open forms: it is not possible to say
@@ -1759,7 +1711,7 @@ the following expansion as RDF triples:<
 
 <p>Given this construction, a well formed list (one with exactly one
 <code>rdf:first</code> and <code>rdf:rest</code> per cons cell) has a precisely
-determined set of members. Incidentally, the same list in N3/Turtle
+determined set of members. Incidentally, the same list in Turtle
 is even more compact:</p>
 <div class="codehilite"><pre><span class="p">:</span><span class="n">example</span>
     <span class="p">:</span><span class="n">p</span> <span class="p">(</span> <span class="p">:</span><span class="n">A</span> <span class="p">:</span><span class="n">B</span> <span class="p">)</span><span class="o">.</span>
@@ -1767,13 +1719,12 @@ is even more compact:</p>
 
 
 <p>Although lists are defined in the generic RDF model in Jena, they
-are extensively used by the ontology API so I mention them here.
-Full details of the methods defined on the
-<a href="/jena/documentation/javadoc/com/hp/hpl/jena/rdf/model/RDFList.html"><code>RDFList</code></a>
-class are available in the Jena Javadoc.</p>
-<p>A number of means of constructing lists is defined in
+are extensively used by the ontology API so we mention them here.
+Full details of the methods defined are in the
+<a href="/jena/documentation/javadoc/com/hp/hpl/jena/rdf/model/RDFList.html"><code>RDFList javadoc</code></a>.</p>
+<p>Various means of constructing lists are defined in
 <a href="/jena/documentation/javadoc/com/hp/hpl/jena/rdf/model/Model.html"><code>Model</code></a>, as
-variants on <code>createList</code>. For example, you can construct a list of
+variants on <code>createList</code>. For example, we can construct a list of
 three classes as follows:</p>
 <div class="codehilite"><pre><span class="n">OntModel</span> <span class="n">m</span> <span class="o">=</span> <span class="n">ModelFactory</span><span class="o">.</span><span class="n">createOntModel</span><span class="p">();</span>
 <span class="n">OntClass</span> <span class="n">c0</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">createClass</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;c0&quot;</span> <span class="p">);</span>
@@ -1784,7 +1735,7 @@ three classes as follows:</p>
 </pre></div>
 
 
-<p>Alternatively, you can build a list one element at at time:</p>
+<p>Alternatively, we can build a list one element at at time:</p>
 <div class="codehilite"><pre><span class="n">OntModel</span> <span class="n">m</span> <span class="o">=</span> <span class="n">ModelFactory</span><span class="o">.</span><span class="n">createOntModel</span><span class="p">();</span>
 <span class="n">RDFList</span> <span class="n">cs</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">createList</span><span class="p">();</span> <span class="sr">//</span> <span class="n">Cs</span> <span class="n">is</span> <span class="n">empty</span>
 <span class="n">cs</span> <span class="o">=</span> <span class="n">cs</span><span class="o">.</span><span class="n">cons</span><span class="p">(</span> <span class="n">m</span><span class="o">.</span><span class="n">createClass</span><span class="p">(</span> <span class="n">NS</span> <span class="o">+</span> <span class="s">&quot;c0&quot;</span> <span class="p">)</span> <span class="p">);</span>
@@ -1795,17 +1746,17 @@ three classes as follows:</p>
 
 <p>Note that these two approaches end with the classes in the lists in
 opposite orders, since the <code>cons</code> operation adds a new list cell to
-the front of the list. Thus the second list will run c2 to c0. In
+the front of the list. Thus the second list will run <code>c2</code> to <code>c0</code>. In
 the ontology operations we are discussing here, the order of values
 in the list is not considered significant.</p>
-<p>Once the list has been constructed or obtained from the model (a
-resource which is a cell in a list sequence will accept
-<code>.as( RDFList.class )</code>),
+<p>Finally, a resource which is a cell in a list sequence will accept
+<code>.as( RDFList.class )</code></p>
+<p>Once the list has been created or obtained from the model,
 <a href="/jena/documentation/javadoc/com/hp/hpl/jena/rdf/model/RDFList.html"><code>RDFList</code></a>
 methods may be used to access members of the list, iterate over the
 list, and so forth. For example:</p>
 <div class="codehilite"><pre><span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span> <span class="s">&quot;List has &quot;</span> <span class="o">+</span> <span class="n">myRDFList</span><span class="o">.</span><span class="n">size</span><span class="p">()</span> <span class="o">+</span> <span class="s">&quot; members:&quot;</span> <span class="p">);</span>
-<span class="k">for</span> <span class="p">(</span><span class="n">Iterator</span> <span class="n">i</span> <span class="o">=</span> <span class="n">myRDFList</span><span class="o">.</span><span class="n">iterator</span><span class="p">();</span> <span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">();</span> <span class="p">)</span> <span class="p">{</span>
+<span class="k">for</span> <span class="p">(</span><span class="n">Iterator</span><span class="sr">&lt;RDFNode&gt;</span> <span class="n">i</span> <span class="o">=</span> <span class="n">myRDFList</span><span class="o">.</span><span class="n">iterator</span><span class="p">();</span> <span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">();</span> <span class="p">)</span> <span class="p">{</span>
   <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">()</span> <span class="p">);</span>
 <span class="p">}</span>
 </pre></div>
@@ -1814,8 +1765,8 @@ list, and so forth. For example:</p>
 <h3 id="intersection_union_and_complement_class_expressions">Intersection, union and complement class expressions</h3>
 <p>Given Jena's ability to construct lists, building intersection and
 union class expressions is straightforward. The <code>create</code> methods on
-OntModel allow you to construct an intersection or union directly.
-Alternatively, given an existing OntClass, you can use the
+OntModel allow us to construct an intersection or union directly.
+Alternatively, given an existing OntClass, we can use the
 <code>convertTo...</code> methods to construct facet representing the more
 specialised expressions. For example, we can define the class of UK
 industry-related conferences as the intersection of conferences
@@ -1838,14 +1789,14 @@ the XML declaration:</p>
 
 
 <p>Or, more compactly in N3/Turtle:</p>
-<div class="codehilite"><pre><span class="p">:</span><span class="n">UKIndustrialConference</span> <span class="n">a</span> <span class="n">owl:Class</span>
-    <span class="p">;</span> <span class="n">owl:intersectionOf</span> <span class="p">(</span>
-       <span class="p">[</span><span class="n">a</span> <span class="n">owl:Restriction</span>
-        <span class="p">;</span> <span class="n">owl:onProperty</span> <span class="p">:</span><span class="n">hasLocation</span>
-        <span class="p">;</span> <span class="n">owl:hasValue</span> <span class="p">:</span><span class="n">united_kingdom</span><span class="p">]</span>
-       <span class="p">[</span><span class="n">a</span> <span class="n">owl:Restriction</span>
-        <span class="p">;</span> <span class="n">owl:onProperty</span> <span class="p">:</span><span class="n">hasPart</span>
-        <span class="p">;</span> <span class="n">owl:someValuesFrom</span> <span class="p">:</span><span class="n">IndustryTrack</span><span class="p">]</span>
+<div class="codehilite"><pre><span class="p">:</span><span class="n">UKIndustrialConference</span> <span class="n">a</span> <span class="n">owl:Class</span> <span class="p">;</span>
+    <span class="n">owl:intersectionOf</span> <span class="p">(</span>
+       <span class="p">[</span><span class="n">a</span> <span class="n">owl:Restriction</span> <span class="p">;</span>
+          <span class="n">owl:onProperty</span> <span class="p">:</span><span class="n">hasLocation</span> <span class="p">;</span>
+          <span class="n">owl:hasValue</span> <span class="p">:</span><span class="n">united_kingdom</span><span class="p">]</span>
+       <span class="p">[</span><span class="n">a</span> <span class="n">owl:Restriction</span> <span class="p">;</span>
+          <span class="n">owl:onProperty</span> <span class="p">:</span><span class="n">hasPart</span> <span class="p">;</span>
+          <span class="n">owl:someValuesFrom</span> <span class="p">:</span><span class="n">IndustryTrack</span><span class="p">]</span>
       <span class="p">)</span>
 </pre></div>
 
@@ -1876,13 +1827,12 @@ that <code>m</code> is a model into whic
 </pre></div>
 
 
-<p>Given the similarity between union and intersection class
-expressions, rather than separate methods to set the components of
-the expression, Jena defines a common super-class
+<p>Union and intersection class expressions are very similar, so
+Jena defines a common super-class
 <a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/BooleanClassDescription.html"><code>BooleanClassDescription</code></a>.
 This class provides access to the <em>operands</em> to the expression. In
-the above example, the operands are the two restrictions. The
-<code>BooleanClassDescription</code> class allows you to set the operands
+the intersection example above, the operands are the two restrictions. The
+<code>BooleanClassDescription</code> class allows us to set the operands
 <em>en masse</em> by supplying a list, or to be added or deleted one at a
 time.</p>
 <p>Complement class expressions are very similar. The principal
@@ -1894,7 +1844,7 @@ class. Recall that a class is a set of i
 to define the members of the <em>implicitly</em>: for example, "the class
 of UK conferences". Sometimes it is convenient to define a class
 <em>explicitly</em>, by stating the individuals the class contains. An
-<em><a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/EnumeratedClass.html">enumerated class</a></em>
+<a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/EnumeratedClass.html">enumerated class</a>
 is exactly the class whose members are the given individuals. For
 example, we know that the class of PrimaryColours contains exactly
 red, green and blue, and no others.</p>
@@ -1931,18 +1881,22 @@ following:</p>
 </pre></div>
 
 
+<p>An OWL <code>DataRange</code> is similar to an enumerated class, except that the members
+of the <code>DataRange</code> are literal values, such as integers, dates or strings. See the
+<a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/DataRange.html"><code>DataRange</code> javadoc</a>
+for more details.</p>
 <h3 id="listing_classes">Listing classes</h3>
-<p>In many applications, you will need to inspect the set of classes
+<p>In many applications, we need to inspect the set of classes
 in an ontology. The <code>list...</code> methods on <code>OntModel</code> provide a variety
 of means of listing types of class. The methods available include:</p>
-<div class="codehilite"><pre><span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listEnumeratedClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listUnionClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listComplementClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listIntersectionClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listRestrictions</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listNamedClasses</span><span class="p">();</span>
-<span class="n">public</span> <span class="n">ExtendedIterator</span> <span class="n">listHierarchyRootClasses</span><span class="p">();</span>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;OntClass&gt;</span> <span class="n">listClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;EnumeratedClass&gt;</span> <span class="n">listEnumeratedClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;UnionClass&gt;</span> <span class="n">listUnionClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;ComplementClass&gt;</span> <span class="n">listComplementClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;IntersectionClass&gt;</span> <span class="n">listIntersectionClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;Restriction&gt;</span> <span class="n">listRestrictions</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;OntClass&gt;</span> <span class="n">listNamedClasses</span><span class="p">();</span>
+<span class="n">public</span> <span class="n">ExtendedIterator</span><span class="sr">&lt;OntClass&gt;</span> <span class="n">listHierarchyRootClasses</span><span class="p">();</span>
 </pre></div>
 
 
@@ -1967,7 +1921,7 @@ returned from the <code>list...</code> m
 store is a database. This is necessary so that any state (e.g. the
 database connection resources) can be released. Closing happens
 automatically when the <code>hasNext()</code> method on the iterator returns
-false. If your code does not iterate all the way to the end of the
+<code>false</code>. If your code does not iterate all the way to the end of the
 iterator, you should call the <code>close()</code> method explicitly. Note
 also that the values returned by these iterators will depend on the
 asserted data and the reasoner being used. For example, if the
@@ -1980,7 +1934,7 @@ separately, perform the <code>listClasse
 methods on the base model only, or on a model with no reasoner
 attached.</p>
 <h2 id="instances_or_individuals">Instances or individuals</h2>
-<p>In OWL Full (and in DAML+OIL) any value can be an individual &ndash; and
+<p>In OWL Full any value can be an individual &ndash; and
 thus the subject of triples in the RDF graph other than ontology
 declarations. In OWL Lite and DL, the language terms and the
 instance data that the application is working with are kept
@@ -2020,10 +1974,10 @@ convenience: OWL and RDFS denote class m
 <code>rdf:type</code> are defined on <code>OntResource</code>. You may use either
 approach interchangeably.</p>
 <h2 id="ontology_meta-data">Ontology meta-data</h2>
-<p>In OWL and DAML+OIL, but not RDFS, meta-data about the ontology
+<p>In OWL, but not RDFS, meta-data about the ontology
 itself is encoded as properties on an individual of class
-<code>owl:Ontology</code> or <code>daml:Ontology</code> as appropriate. By convention,
-the URI of this individual is the URI of the ontology document
+<code>owl:Ontology</code>. By convention,
+the URI of this individual is the URL, or web address, of the ontology document
 itself. In the XML serialisation, this is typically shown as:</p>
 <div class="codehilite"><pre><span class="nt">&lt;owl:Ontology</span> <span class="na">rdf:about=</span><span class="s">&quot;&quot;</span><span class="nt">&gt;</span>
 <span class="nt">&lt;/owl:Ontology&gt;</span>
@@ -2038,39 +1992,53 @@ in the XML preamble. The base URI can al
 reading the document via Jena's Model API (see the <code>read()</code> methods
 on <a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/OntModel.html"><code>OntModel</code></a>
 for reference).</p>
-<p>You can attach various meta-data statements to this object to
+<p>We can attach various meta-data statements to this object to
 indicate attributes of the ontology as a whole. The Java object
 <code>Ontology</code> represents this special instance, and uses the standard
 add, set, get, list, test and delete pattern to provide access to
 the following attributes:</p>
-<p>Attribute
-Meaning
-backwardCompatibleWith
-Names a prior version of this ontology that this version is
-compatible with.
-incompatibleWith
-Names a prior version of this ontology that this version is not
-compatible with
-priorVersion
-Names a prior version of this ontology.
-imports
-Names an ontology whose definitions this ontology includes
-In addition to these attributes, the Ontology element typically
+<table>
+<thead>
+<tr>
+<th>Attribute</th>
+<th>Meaning</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>backwardCompatibleWith</td>
+<td>Names a prior version of this ontology that this version is compatible with.</td>
+</tr>
+<tr>
+<td>incompatibleWith</td>
+<td>Names a prior version of this ontology that this version is not compatible with</td>
+</tr>
+<tr>
+<td>priorVersion</td>
+<td>Names a prior version of this ontology.</td>
+</tr>
+<tr>
+<td>imports</td>
+<td>Names an ontology whose definitions this ontology includes</td>
+</tr>
+</tbody>
+</table>
+<p>In addition to these attributes, the Ontology element typically
 contains common meta-data properties, such as comment, label and
 version information.</p>
 <p>In the Jena API, the ontology's metadata properties can be accessed
 through the
 <a href="/jena/documentation/javadoc/com/hp/hpl/jena/ontology/Ontology.html"><code>Ontology</code></a>
-interface. Suppose I wish to know the list of URI's that the
-ontology imports. First I must obtain the resource representing the
+interface. Suppose we wish to know the list of URI's that the
+ontology imports. First we must obtain the resource representing the
 ontology itself:</p>
 <div class="codehilite"><pre><span class="n">String</span> <span class="n">base</span> <span class="o">=</span> <span class="o">...</span><span class="p">;</span> <span class="sr">//</span> <span class="n">the</span> <span class="n">base</span> <span class="n">URI</span> <span class="n">of</span> <span class="n">the</span> <span class="n">ontology</span>
 <span class="n">OntModel</span> <span class="n">m</span> <span class="o">=</span> <span class="o">...</span><span class="p">;</span>  <span class="sr">//</span> <span class="n">the</span> <span class="n">model</span> <span class="n">containing</span> <span class="n">the</span> <span class="n">ontology</span> <span class="n">statements</span>
 <span class="n">Ontology</span> <span class="n">ont</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">getOntology</span><span class="p">(</span> <span class="n">base</span> <span class="p">);</span>
 
 <span class="sr">//</span> <span class="n">now</span> <span class="n">list</span> <span class="n">the</span> <span class="n">ontology</span> <span class="n">imports</span>
-<span class="k">for</span> <span class="p">(</span><span class="n">Iterator</span> <span class="n">i</span> <span class="o">=</span> <span class="n">ont</span><span class="o">.</span><span class="n">listImports</span><span class="p">();</span> <span class="n">i</span><span class="o">.</span><span class="n">hasNext</span><span class="p">();</span> <span class="p">)</span> <span class="p">{</span>
-    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span> <span class="s">&quot;Ontology &quot;</span> <span class="o">+</span> <span class="n">base</span> <span class="o">+</span> <span class="s">&quot; imports &quot;</span> <span class="o">+</span> <span class="n">i</span><span class="o">.</span><span class="k">next</span><span class="p">()</span> <span class="p">);</span>
+<span class="k">for</span> <span class="p">(</span><span class="n">String</span> <span class="n">imp</span> <span class="p">:</span> <span class="n">ont</span><span class="o">.</span><span class="n">listImportedOntologyURIs</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span> <span class="s">&quot;Ontology &quot;</span> <span class="o">+</span> <span class="n">base</span> <span class="o">+</span> <span class="s">&quot; imports &quot;</span> <span class="o">+</span> <span class="n">imp</span> <span class="p">);</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -2096,12 +2064,13 @@ useful to list the ontology resources in
 
 
 <p>A common practice is also to use the Ontology element to attach
-Dublin Core metadata to the ontology document. Jena provides a copy
-of the Dublin Core vocabulary, in <code>com.hp.hpl.jena.vocabulary.DC</code>.
+<a href="http://dublincore.org/">Dublin Core metadata</a>
+to the ontology document. Jena provides a copy
+of the Dublin Core vocabulary, in <code>com.hp.hpl.jena.vocabulary.DCTerms</code>.
 To attach a statement saying that the ontology was authored by John
 Smith, we can say:</p>
 <div class="codehilite"><pre><span class="n">Ontology</span> <span class="n">ont</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">getOntology</span><span class="p">(</span> <span class="n">baseURI</span> <span class="p">);</span>
-<span class="n">ont</span><span class="o">.</span><span class="n">addProperty</span><span class="p">(</span> <span class="n">DC</span><span class="o">.</span><span class="n">creator</span><span class="p">,</span> <span class="s">&quot;John Smith&quot;</span> <span class="p">);</span>
+<span class="n">ont</span><span class="o">.</span><span class="n">addProperty</span><span class="p">(</span> <span class="n">DCTerms</span><span class="o">.</span><span class="n">creator</span><span class="p">,</span> <span class="s">&quot;John Smith&quot;</span> <span class="p">);</span>
 </pre></div>
 
 
@@ -2145,16 +2114,16 @@ capability in Jena exists to allow just 
 and used.</p>
 <p>For a complete and thorough description of Jena's inference
 capabilities, please see the
-<a href="../inference/index.html">reasoner documentation</a>. This section of
+<a href="../inference/index.html">reasoner documentation TODO</a>. This section of
 of the ontology API documentation is intended to serve as only a
 brief guide and overview.</p>
 <p>Recall from the introduction that the reasoners in Jena operate by
-making it appear that triples <em>entailed</em> by the inference algorithm
+making it appear that triples <em>entailed</em> by the inference engine
 are part of the model in just the same way as the asserted triples
 (see Figure 2). The underlying architecture allows the reasoner to
 be part of the same Java virtual machine (as is the case with the
 built-in rule-based reasoners), or in a separate process on the
-local computer, or even a remote machine. Of course, each of these
+local computer, or even a remote computer. Of course, each of these
 choices will have different characteristics of what reasoning
 capabilities are supported, and what the implications for
 performance are.</p>
@@ -2192,7 +2161,7 @@ calling inference-specific methods on an
 not contain a reasoner will have unpredictable results. Typically
 these methods will have no effect or return null, but you should
 not rely on this behaviour.</p>
-<p>In general, inference models will add a lot of additional
+<p>In general, inference models will add many additional
 statements to a given model, including the axioms appropriate to
 the ontology language. This is typically not something you will
 want in the output when the model is serialized, so
@@ -2216,30 +2185,6 @@ of the ontology model:</p>
 <p>See also the note on
 <a href="common-problems.html#aBox-tBox">combining a-box and t-box data</a>
 using the OntModel.</p>
-<h2 id="working_with_damloil_ontologies">Working with DAML+OIL ontologies</h2>
-<p><strong>Jena 2.5 update</strong> With effect from release 2.5 of Jena, the
-legacy DAML+OIL API was deprecated, and has been removed from the
-2.6 release. The effect of this is that users of DAML+OIL using the
-legacy API (i.e. the classes in <code>com.hp.hpl.jena.ontology.daml</code>)
-should move their projects either to work with OWL, or at least to
-work with the DAML+OIL profile of the standard <code>OntModel</code>. The
-DAML+OIL <code>OntModel</code> profile will continue to be supported.</p>
-<p>Generally speaking, we recommend that developers who want to work
-on Semantic Web applications should use RDFS or
-<a href="http://www.w3.org/2004/OWL/">OWL</a>, as their ontology language. OWL
-has had the benefit of a more rigorous design and significant input
-to its design from researchers with insights into the design of
-efficient reasoning algorithms. Nevertheless, there remains some
-legacy ontology data on the Semantic Web today encoded in
-<a href="http://www.daml.org">DAML+OIL</a>, the precursor to OWL. Jena 2
-currently supports ontology processing in DAML+OIL as well as OWL
-and RDFS. However, DAML reasoning using the built-in Jena reasoners
-is more restricted than is the case with OWL.</p>
-<p>Since Jena 2.6, the ontology API (as described in this document) is
-the only available route for processing DAML data. Using the
-language profile, the ontology API can handle RDFS, OWL and DAML
-sources with equal ease. Thus, OntClass can be used to represent a
-DAML class, an OWL class or an RDFS class.</p>
 <h2 id="working_with_persistent_ontologies">Working with persistent ontologies</h2>
 <p>A common way to work with ontology data is to load the ontology
 axioms and instances at run-time from a set of source documents.
@@ -2252,11 +2197,11 @@ This saves the overhead of loading the m
 that you can store RDF models significantly larger than the
 computer's main memory, but at the expense of a higher overhead (a
 database interaction) to retrieve and update RDF data from the
-model. In this section I show how to use the ontology API with
+model. In this section we briefly discuss using the ontology API with
 Jena's persistent database models.</p>
 <p>For information on setting-up and accessing the database models
-themselves, see the <a href="../DB/index.html">DB documentation</a>. I do not
-cover this aspect in this section. For a method of using a
+themselves, see the <a href="../DB/index.html">DB documentation</a>.
+For one method of using a
 persistent database to manage ontology imports, see
 <a href="http://www.iandickinson.me.uk/articles/jena-tip-db-import/">this article</a>.</p>
 <p>There are two somewhat separate requirements for persistently
@@ -2286,7 +2231,7 @@ it as the base model when constructing a
 
 
 <p>Here we assume that the <code>getMaker()</code> method returns a suitably
-initialized<code>ModelMaker</code> that will open the connection to the
+initialized <code>ModelMaker</code> that will open the connection to the
 database. This step only creates a persistent model named with the
 ontology URI. To initialise the content, we must either add
 statements to the model using the OntModel API, or do a one-time
@@ -2298,7 +2243,7 @@ read from a document:</p>
 <p>Once this step is completed, the model contents may be accessed in
 future without needing to read again.</p>
 <p>If the Customers ontology imports other ontologies, using
-<code>owl:imports</code> or <code>daml:imports</code>, the Jena Ontology API will build a
+<code>owl:imports</code>, the Jena Ontology API will build a
 union model containing the closure of the imports. Even if the base
 model is persistent, the predefined <code>OntModelSpec</code> objects only
 specify memory models to contain the imported ontologies, since
@@ -2338,7 +2283,7 @@ data in-memory, then store that into a d
 by the run-time application. Such an off-line processing
 architecture will clearly not be applicable to every application
 problem.</p>
-<p>A <a href="../examples/persistent-ont-model/index.html">sample program</a>
+<p>A <a href="../examples/persistent-ont-model/index.html">sample program TODO</a>
 shows the above steps combined, to create an ontology in which both
 base model and imports are stored in a persistent database.</p>
 <h2 id="experimental_ontology_tools">Experimental ontology tools</h2>



Mime
View raw message